From 0520b80a106e8e60c1f00234ed77dba196f74c32 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Thu, 29 Feb 2024 21:38:38 -0500 Subject: [PATCH] fix InteractiveUtils call in Base.runtests on failure (#53525) Noticed in CI that `Base.runtests(["fail"])` fails here instead of throwing the correct error later, since #53326. (cherry picked from commit 95f54c4dcb58e4f15f53f8a13a930db8e035ea89) --- base/util.jl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/base/util.jl b/base/util.jl index 847d89e895af4..c91f04e8baf96 100644 --- a/base/util.jl +++ b/base/util.jl @@ -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