Skip to content

Commit

Permalink
Squash error output from processes we expect to error
Browse files Browse the repository at this point in the history
  • Loading branch information
staticfloat committed Jun 24, 2022
1 parent 99649ab commit 178d6f4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions test/cmdlineargs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ end

# Returns true if the given command errors, but doesn't signal
function errors_not_signals(cmd::Cmd)
p = run(ignorestatus(cmd))
p = run(pipeline(ignorestatus(cmd); stdout=devnull, stderr=devnull))
return errors_not_signals(p)
end
errors_not_signals(p::Base.Process) = process_exited(p) && !Base.process_signaled(p) && !success(p)
Expand Down Expand Up @@ -678,7 +678,6 @@ let exename = `$(Base.julia_cmd().exec[1]) -t 1`
@test !occursin("EXCEPTION_ACCESS_VIOLATION", s)
end
@test errors_not_signals(p)
@test !Base.process_signaled(p)
@test p.exitcode == 1
end
end
Expand All @@ -689,7 +688,6 @@ let exename = `$(Base.julia_cmd().exec[1]) -t 1`
@test s == "ERROR: System image file failed consistency check: maybe opened the wrong version?\n"
end
@test errors_not_signals(p)
@test !Base.process_signaled(p)
@test p.exitcode == 1
end
end
Expand Down

0 comments on commit 178d6f4

Please sign in to comment.