Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions stdlib/REPL/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
7 changes: 7 additions & 0 deletions stdlib/Test/src/Test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
Expand All @@ -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))
Expand Down Expand Up @@ -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
Expand Down
Loading