Skip to content

Commit

Permalink
fix InteractiveUtils call in Base.runtests on failure (#53525)
Browse files Browse the repository at this point in the history
Noticed in CI that `Base.runtests(["fail"])` fails here instead of
throwing the correct error later, since #53326.
  • Loading branch information
vtjnash authored Mar 1, 2024
1 parent 2501e37 commit 95f54c4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions base/util.jl
Original file line number Diff line number Diff line change
Expand Up @@ -694,11 +694,9 @@ function runtests(tests = ["all"]; ncores::Int = ceil(Int, Sys.CPU_THREADS / 2),
nothing
catch
buf = PipeBuffer()
original_load_path = copy(Base.LOAD_PATH); empty!(Base.LOAD_PATH); pushfirst!(Base.LOAD_PATH, "@stdlib")
let InteractiveUtils = Base.require_stdlib(Base, :InteractiveUtils)
let InteractiveUtils = Base.require_stdlib(PkgId(UUID(0xb77e0a4c_d291_57a0_90e8_8db25a27a240), "InteractiveUtils"))
@invokelatest InteractiveUtils.versioninfo(buf)
end
empty!(Base.LOAD_PATH); append!(Base.LOAD_PATH, original_load_path)
error("A test has failed. Please submit a bug report (https://github.com/JuliaLang/julia/issues)\n" *
"including error messages above and the output of versioninfo():\n$(read(buf, String))")
end
Expand Down

0 comments on commit 95f54c4

Please sign in to comment.