From 178d6f43e1c7b1137e7a5573e429c7fbd775c516 Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Wed, 22 Jun 2022 19:33:44 +0000 Subject: [PATCH] Squash error output from processes we expect to error --- test/cmdlineargs.jl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/cmdlineargs.jl b/test/cmdlineargs.jl index 9bdf5b83a0d2e..7d2331e14d260 100644 --- a/test/cmdlineargs.jl +++ b/test/cmdlineargs.jl @@ -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) @@ -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 @@ -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