Skip to content

Commit

Permalink
hide the harness stack trace on failure (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth authored Jul 9, 2024
1 parent cee4ae9 commit 0c52394
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions test_harness.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,27 @@ if parse(Bool, ENV["ANNOTATE"]) && v"1.8pre" < VERSION < v"1.9.0-beta3"
global_logger(GitHubActionsLogger())
include("test_logger.jl")
pop!(LOAD_PATH)
TestLogger.test(; kwargs...)
try
TestLogger.test(; kwargs...)
catch e
if e isa Pkg.Types.PkgError
# don't show the stacktrace of the test harness because it's not useful
showerror(stderr, e)
exit(1)
else
rethrow()
end
end
else
Pkg.test(; kwargs...)
try
Pkg.test(; kwargs...)
catch e
if e isa Pkg.Types.PkgError
# don't show the stacktrace of the test harness because it's not useful
showerror(stderr, e)
exit(1)
else
rethrow()
end
end
end

0 comments on commit 0c52394

Please sign in to comment.