Skip to content
Open
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
12 changes: 9 additions & 3 deletions src/ParallelTestRunner.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this could be limited to result isa Exception? Test failures should already be displayed somewhere else, but it's the output of crashed jobs which is more important to quickly find.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So with

Suggested change
if result isa Exception || anynonpass(result.value)
if result isa Exception

we'd have

Image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I like it the way it currently is (failures also red)

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)
Expand Down Expand Up @@ -1223,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
Expand Down