test/run_tests.pl: don't mask test failures.
authorAndy Polyakov <appro@openssl.org>
Sat, 20 May 2017 10:35:58 +0000 (12:35 +0200)
committerAndy Polyakov <appro@openssl.org>
Sun, 21 May 2017 09:34:01 +0000 (11:34 +0200)
Switch to TAP::Harness inadvertently masked test failures.
Test::Harness::runtests was terminating with non-zero exit code in case
of failure[s], while TAP::Harness apparently holds caller responsible
for doing so.

Reviewed-by: Rich Salz <rsalz@openssl.org>
test/run_tests.pl

index aa1dba0..a04fd98 100644 (file)
@@ -82,7 +82,10 @@ foreach my $arg (@ARGV ? @ARGV : ('alltests')) {
 }
 
 my $harness = $TAP_Harness->new(\%tapargs);
-$harness->runtests(map { abs2rel($_, rel2abs(curdir())); } sort keys %tests);
+my $ret = $harness->runtests(map { abs2rel($_, rel2abs(curdir())); }
+                                 sort keys %tests);
+
+exit $ret->has_errors if (ref($ret) eq "TAP::Parser::Aggregator");
 
 sub find_matching_tests {
     my ($glob) = @_;