@@ -652,7 +652,7 @@ function do_test(result::ExecutionResult, orig_expr)
652652 @assert isa (result, Threw)
653653 testres = Error (:test_error , orig_expr, result. exception, result. backtrace:: Vector{Any} , result. source)
654654 end
655- isa (testres, Pass) || ccall ( :jl_breakpoint , Cvoid, (Any,), result)
655+ isa (testres, Pass) || trigger_test_failure_break ( result)
656656 record (get_testset (), testres)
657657end
658658
@@ -1317,6 +1317,9 @@ macro testset(args...)
13171317 end
13181318end
13191319
1320+ trigger_test_failure_break (@nospecialize (err)) =
1321+ ccall (:jl_test_failure_breakpoint , Cvoid, (Any,), err)
1322+
13201323"""
13211324Generate the code for a `@testset` with a function call or `begin`/`end` argument
13221325"""
@@ -1360,6 +1363,7 @@ function testset_beginend_call(args, tests, source)
13601363 err isa InterruptException && rethrow ()
13611364 # something in the test block threw an error. Count that as an
13621365 # error in this test set
1366+ trigger_test_failure_break (err)
13631367 record (ts, Error (:nontest_error , Expr (:tuple ), err, Base. current_exceptions (), $ (QuoteNode (source))))
13641368 finally
13651369 copy! (RNG, oldrng)
@@ -1435,6 +1439,7 @@ function testset_forloop(args, testloop, source)
14351439 err isa InterruptException && rethrow ()
14361440 # Something in the test block threw an error. Count that as an
14371441 # error in this test set
1442+ trigger_test_failure_break (err)
14381443 record (ts, Error (:nontest_error , Expr (:tuple ), err, Base. current_exceptions (), $ (QuoteNode (source))))
14391444 end
14401445 end
0 commit comments