diff options
author | Andrew Bartlett <abartlet@samba.org> | 2008-04-25 15:05:07 +0100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2008-04-25 15:05:07 +0100 |
commit | ff1ad0430095b00daa9e66b45cd85b6f65ab9687 (patch) | |
tree | 03ff59a4fa3678058d96434d53960ed2de103e72 | |
parent | 0d1fe706e347ddb03f58da5f67853090f6d2ae72 (diff) | |
download | samba-ff1ad0430095b00daa9e66b45cd85b6f65ab9687.tar.gz samba-ff1ad0430095b00daa9e66b45cd85b6f65ab9687.tar.bz2 samba-ff1ad0430095b00daa9e66b45cd85b6f65ab9687.zip |
When a test harness program fails, make the testsuite fail.
The problem fixed here is that pidl tests were not causing the 'number
of tests failing' count to increase, due to the way return codes are
processed on pipelines, in the shell.
By setting an exit code if we print 'failure', we ensure we fail
appropriately.
Andrew Bartlett
(This used to be commit 687e81883d37e3d1f55d3a7a87e20fb860888dde)
-rwxr-xr-x | source4/script/harness2subunit.pl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/script/harness2subunit.pl b/source4/script/harness2subunit.pl index c14e4730e0..9f2391ad6c 100755 --- a/source4/script/harness2subunit.pl +++ b/source4/script/harness2subunit.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl my $firstline = 1; - +my $error = 0; while(<STDIN>) { if ($firstline) { $firstline = 0; @@ -10,6 +10,7 @@ while(<STDIN>) { if (/^not ok (\d+) - (.*)$/) { print "test: $2\n"; print "failure: $2\n"; + $error = 1; } elsif (/^ok (\d+) - (.*)$/) { print "test: $2\n"; print "success: $2\n"; @@ -22,7 +23,10 @@ while(<STDIN>) { } elsif (/^not ok (\d+)$/) { print "test: $1\n"; print "failure: $1\n"; + $error = 1; } else { print; } } +exit $error; + |