From 20d6e9da8a8dba612780ebf66fe1d0bf10aa5e0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Fri, 13 Feb 2026 02:32:41 +0000 Subject: [PATCH 1/2] Highlight in red name of failed test when showing output --- src/ParallelTestRunner.jl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ParallelTestRunner.jl b/src/ParallelTestRunner.jl index 2e1e633..a8b0b97 100644 --- a/src/ParallelTestRunner.jl +++ b/src/ParallelTestRunner.jl @@ -1115,7 +1115,13 @@ function runtests(mod::Module, args::ParsedArgs; # print the output generated by each testset for (testname, result, output, start, stop) in results if !isempty(output) - println(io_ctx.stdout, "\nOutput generated during execution of '$testname':") + print(io_ctx.stdout, "\nOutput generated during execution of '") + if result isa Exception || anynonpass(result.value) + printstyled(io_ctx.stdout, testname; color=:red) + else + printstyled(io_ctx.stdout, testname; color=:normal) + end + println(io_ctx.stdout, "':") lines = collect(eachline(IOBuffer(output))) for (i,line) in enumerate(lines) From d2dfdca12c81ba90b131a5fff9da5ba861199c95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Fri, 13 Feb 2026 02:33:16 +0000 Subject: [PATCH 2/2] Use `printstyled` in more places --- src/ParallelTestRunner.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ParallelTestRunner.jl b/src/ParallelTestRunner.jl index a8b0b97..fc13cc0 100644 --- a/src/ParallelTestRunner.jl +++ b/src/ParallelTestRunner.jl @@ -1229,9 +1229,9 @@ function runtests(mod::Module, args::ParsedArgs; print(io_ctx.stdout, c.output) end if !anynonpass(o_ts) - println(io_ctx.stdout, " \033[32;1mSUCCESS\033[0m") + printstyled(io_ctx.stdout, " SUCCESS\n"; bold=true, color=:green) else - println(io_ctx.stderr, " \033[31;1mFAILURE\033[0m\n") + printstyled(io_ctx.stderr, " FAILURE\n\n"; bold=true, color=:red) if VERSION >= v"1.13.0-DEV.1033" Test.print_test_errors(io_ctx.stdout, o_ts) else