summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-04-25 15:05:07 +0100
committerAndrew Bartlett <abartlet@samba.org>2008-04-25 15:05:07 +0100
commitff1ad0430095b00daa9e66b45cd85b6f65ab9687 (patch)
tree03ff59a4fa3678058d96434d53960ed2de103e72 /source4
parent0d1fe706e347ddb03f58da5f67853090f6d2ae72 (diff)
downloadsamba-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)
Diffstat (limited to 'source4')
-rwxr-xr-xsource4/script/harness2subunit.pl6
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;
+