diff --git a/src/run.jl b/src/run.jl index 1c9ef899..f8eacc1d 100644 --- a/src/run.jl +++ b/src/run.jl @@ -349,7 +349,7 @@ function run_sandboxed_test(install::String, pkg; do_depwarns=false, rr=false, k print("\n\n", '#'^80, "\n# Testing: $(now())\n#\n\n") - if haskey(ENV, "_RR_TRACE_DIR") + if get(ENV, "PKGEVAL_RR", "false") == "true" Pkg.test(ARGS[1]; julia_args=`--bug-report=rr-local`) else Pkg.test(ARGS[1]) @@ -363,7 +363,7 @@ function run_sandboxed_test(install::String, pkg; do_depwarns=false, rr=false, k Base.show_backtrace(stdout, catch_backtrace()) println() - if haskey(ENV, "_RR_TRACE_DIR") + if get(ENV, "PKGEVAL_RR", "false") == "true" print("\n\n", '#'^80, "\n# BugReporting post-processing: $(now())\n#\n\n") # pack-up our rr trace. this is expensive, so we only do it for failures. @@ -373,8 +373,9 @@ function run_sandboxed_test(install::String, pkg; do_depwarns=false, rr=false, k Pkg.add("BugReporting") try using BugReporting - trace_dir = BugReporting.find_latest_trace("/traces") - BugReporting.compress_trace(trace_dir, "/traces/$(ARGS[1]).tar.zst") + trace_dir = BugReporting.default_rr_trace_dir() + trace = BugReporting.find_latest_trace(trace_dir) + BugReporting.compress_trace(trace, "/traces/$(ARGS[1]).tar.zst") println("\nBugReporting succeeded") catch err print("\nBugReporting failed: ") @@ -399,7 +400,7 @@ function run_sandboxed_test(install::String, pkg; do_depwarns=false, rr=false, k trace_dir = mktempdir() trace_file = joinpath(trace_dir, "$(pkg.name).tar.zst") mounts["/traces"] = trace_dir - env["_RR_TRACE_DIR"] = "/traces" + env["PKGEVAL_RR"] = "true" haskey(ENV, "PKGEVAL_RR_BUCKET") || @warn maxlog=1 "PKGEVAL_RR_BUCKET not set; will not be uploading rr traces" end