From ff1ad0430095b00daa9e66b45cd85b6f65ab9687 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 25 Apr 2008 15:05:07 +0100 Subject: 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) --- source4/script/harness2subunit.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source4/script') 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() { if ($firstline) { $firstline = 0; @@ -10,6 +10,7 @@ while() { 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() { } elsif (/^not ok (\d+)$/) { print "test: $1\n"; print "failure: $1\n"; + $error = 1; } else { print; } } +exit $error; + -- cgit