mirror of
https://github.com/julia-actions/julia-runtest.git
synced 2026-02-12 11:06:54 +08:00
hide the harness stack trace on failure (#116)
This commit is contained in:
@@ -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)
|
||||
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
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user