X-Git-Url: https://git.saurik.com/apple/dyld.git/blobdiff_plain/0959b6d4289bd106fddb7fe7d84a346159895fdd..04b5575d8fc9b95f96f2a621169e45d995ee8a41:/unit-tests/bin/exit-non-zero-pass.pl diff --git a/unit-tests/bin/exit-non-zero-pass.pl b/unit-tests/bin/exit-non-zero-pass.pl index 149724f..7a09a1b 100755 --- a/unit-tests/bin/exit-non-zero-pass.pl +++ b/unit-tests/bin/exit-non-zero-pass.pl @@ -21,6 +21,9 @@ sub FAIL my $pass_string = shift @ARGV; my $fail_string = shift @ARGV; + +# redirect stderr to stdout +open(STDERR, ">/tmp/exit-non-zero.tmp") || die("$!"); if(0 != system(@ARGV)) { PASS($pass_string); @@ -29,5 +32,13 @@ else { FAIL($fail_string); } +close(STDERR) || die("$!"); +open(OUT, ") +{ + print $_; +} +close(OUT) || die("$!"); +unlink "/tmp/exit-non-zero.tmp"; exit 0;