Skip to content

Commit 2e367af

Browse files
committed
print out debug for REPL tests
1 parent daa0b9e commit 2e367af

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

stdlib/REPL/test/runtests.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
# Make a copy of the original environment
44
original_env = copy(ENV)
55

6+
using Test
7+
8+
Test.print_testset_name = true
9+
610
module PrecompilationTests
711
include("precompilation.jl")
812
end
@@ -23,6 +27,8 @@ module TerminalMenusTest
2327
include("TerminalMenus/runtests.jl")
2428
end
2529

30+
Test.print_testset_name = false
31+
2632
# Restore the original environment
2733
for k in keys(ENV)
2834
if !haskey(original_env, k)

stdlib/Test/src/Test.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1729,6 +1729,7 @@ function insert_toplevel_latestworld(@nospecialize(tests))
17291729
return ret
17301730
end
17311731

1732+
print_testset_name::Bool = false
17321733
"""
17331734
Generate the code for a `@testset` with a function call or `begin`/`end` argument
17341735
"""
@@ -1754,6 +1755,9 @@ function testset_beginend_call(args, tests, source)
17541755
# finally removing the testset and giving it a chance to take
17551756
# action (such as reporting the results)
17561757
ex = quote
1758+
if print_testset_name
1759+
println("STARTED TESTSET ", $desc)
1760+
end
17571761
_check_testset($testsettype, $(QuoteNode(testsettype.args[1])))
17581762
local ret
17591763
local ts = if ($testsettype === $DefaultTestSet) && $(isa(source, LineNumberNode))
@@ -1791,6 +1795,9 @@ function testset_beginend_call(args, tests, source)
17911795
pop_testset()
17921796
ret = finish(ts)
17931797
end
1798+
if print_testset_name
1799+
println("FINISHED TESTSET ", $desc)
1800+
end
17941801
ret
17951802
end
17961803
# preserve outer location if possible

0 commit comments

Comments
 (0)