Skip to content

Commit

Permalink
Fix rr.
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt committed Dec 16, 2024
1 parent 2e7e1c3 commit 14962a2
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions scripts/evaluate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ print("\n\n", '#'^80, "\n# Set-up\n#\n\n")

t0 = cpu_time()

# we install PkgEval dependencies in a separate environment
try
Pkg.DEFAULT_IO[] = devnull
Pkg.activate("pkgeval"; shared=true)
finally
Pkg.DEFAULT_IO[] = nothing
end

deps = String[]

if config.goal === :test
Expand All @@ -31,11 +39,13 @@ if config.rr == RREnabled
println(io, "pushfirst!(LOAD_PATH, $(repr(Base.ACTIVE_PROJECT[])))")

# this code is essentially what --bug-report from InteractiveUtils does
println(io, "using BugReporting")
println(io, "ENV[\"ENABLE_GDBLISTENER\"] = \"1\"")
println(io, "println(\"Switching execution to under rr\")")
println(io, "BugReporting.make_interactive_report(\"rr-local\", ARGS)")
println(io, "exit(0)")
println(io, """
using BugReporting
ENV["ENABLE_GDBLISTENER"] = "1"
println("Switching execution to under rr")
BugReporting.make_interactive_report("rr-local", ARGS)
exit(0)
""")
end
end

Expand All @@ -44,9 +54,6 @@ if !isempty(deps)
Pkg.DEFAULT_IO[] = io
try
println("Installing PkgEval dependencies (", join(deps, ", "), ")...")

# we install PkgEval dependencies in a separate environment
Pkg.activate("pkgeval"; shared=true)
Pkg.add(deps)
catch
# something went wrong installing PkgEval's dependencies
Expand Down

0 comments on commit 14962a2

Please sign in to comment.