Skip to content

Commit

Permalink
Record in the default directory.
Browse files Browse the repository at this point in the history
It's presumably on the same filesystem as most of the depot,
resulting in better deleted file handling by rr.
  • Loading branch information
maleadt committed Jul 26, 2022
1 parent 3a9844f commit 02d53f4
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/run.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand All @@ -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.
Expand All @@ -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: ")
Expand All @@ -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
Expand Down

0 comments on commit 02d53f4

Please sign in to comment.