mirror of
https://github.com/julia-actions/julia-runtest.git
synced 2026-02-12 02:56:55 +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())
|
global_logger(GitHubActionsLogger())
|
||||||
include("test_logger.jl")
|
include("test_logger.jl")
|
||||||
pop!(LOAD_PATH)
|
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
|
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
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user