diff --git a/stdlib/REPL/test/runtests.jl b/stdlib/REPL/test/runtests.jl index d3eb6b9964981..102dad7ceee70 100644 --- a/stdlib/REPL/test/runtests.jl +++ b/stdlib/REPL/test/runtests.jl @@ -3,6 +3,10 @@ # Make a copy of the original environment original_env = copy(ENV) +using Test + +Test.print_testset_name = true + module PrecompilationTests include("precompilation.jl") end @@ -23,6 +27,8 @@ module TerminalMenusTest include("TerminalMenus/runtests.jl") end +Test.print_testset_name = false + # Restore the original environment for k in keys(ENV) if !haskey(original_env, k) diff --git a/stdlib/Test/src/Test.jl b/stdlib/Test/src/Test.jl index 091e2c4394abe..5822fcd71d9a4 100644 --- a/stdlib/Test/src/Test.jl +++ b/stdlib/Test/src/Test.jl @@ -1729,6 +1729,7 @@ function insert_toplevel_latestworld(@nospecialize(tests)) return ret end +print_testset_name::Bool = false """ Generate the code for a `@testset` with a function call or `begin`/`end` argument """ @@ -1754,6 +1755,9 @@ function testset_beginend_call(args, tests, source) # finally removing the testset and giving it a chance to take # action (such as reporting the results) ex = quote + if print_testset_name + println("STARTED TESTSET ", $desc) + end _check_testset($testsettype, $(QuoteNode(testsettype.args[1]))) local ret local ts = if ($testsettype === $DefaultTestSet) && $(isa(source, LineNumberNode)) @@ -1791,6 +1795,9 @@ function testset_beginend_call(args, tests, source) pop_testset() ret = finish(ts) end + if print_testset_name + println("FINISHED TESTSET ", $desc) + end ret end # preserve outer location if possible