Skip to content

Commit

Permalink
turn on for Base.runtests
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Mar 9, 2025
1 parent 7d34202 commit 149657f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/testdefs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ using Test, Random

function runtests(name, path, isolate=true; seed=nothing)
old_print_setting = Test.TESTSET_PRINT_ENABLE[]
old_record_passes = get(ENV, "JULIA_TEST_RECORD_PASSES", nothing)
Test.TESTSET_PRINT_ENABLE[] = false
ENV["JULIA_TEST_RECORD_PASSES"] = Base.get_bool_env("CI", false)
# remove all hint_handlers, so that errorshow tests are not changed by which packages have been loaded on this worker already
# packages that call register_error_hint should also call this again, and then re-add any hooks they want to test
empty!(Base.Experimental._hint_handlers)
Expand Down Expand Up @@ -97,6 +99,12 @@ function runtests(name, path, isolate=true; seed=nothing)
Test.TESTSET_PRINT_ENABLE[] = old_print_setting
ex isa TestSetException || rethrow()
return Any[ex]
finally
if old_record_passes === nothing
delete!(ENV, "JULIA_TEST_RECORD_PASSES")
else
ENV["JULIA_TEST_RECORD_PASSES"] = old_record_passes
end
end
end

Expand Down

0 comments on commit 149657f

Please sign in to comment.