Skip to content

Commit e5cabc0

Browse files
turn on for Base.runtests
1 parent 5f69436 commit e5cabc0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/testdefs.jl

+8
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ using Test, Random
44

55
function runtests(name, path, isolate=true; seed=nothing)
66
old_print_setting = Test.TESTSET_PRINT_ENABLE[]
7+
old_record_passes = get(ENV, "JULIA_TEST_RECORD_PASSES", nothing)
78
Test.TESTSET_PRINT_ENABLE[] = false
9+
ENV["JULIA_TEST_RECORD_PASSES"] = Base.get_bool_env("CI", false)
810
# remove all hint_handlers, so that errorshow tests are not changed by which packages have been loaded on this worker already
911
# packages that call register_error_hint should also call this again, and then re-add any hooks they want to test
1012
empty!(Base.Experimental._hint_handlers)
@@ -97,6 +99,12 @@ function runtests(name, path, isolate=true; seed=nothing)
9799
Test.TESTSET_PRINT_ENABLE[] = old_print_setting
98100
ex isa TestSetException || rethrow()
99101
return Any[ex]
102+
finally
103+
if old_record_passes === nothing
104+
delete!(ENV, "JULIA_TEST_RECORD_PASSES")
105+
else
106+
ENV["JULIA_TEST_RECORD_PASSES"] = old_record_passes
107+
end
100108
end
101109
end
102110

0 commit comments

Comments
 (0)