test/run_tests.pl: don't mask test failures.
authorAndy Polyakov <appro@openssl.org>
Sun, 21 May 2017 09:40:46 +0000 (11:40 +0200)
committerAndy Polyakov <appro@openssl.org>
Mon, 22 May 2017 08:18:15 +0000 (10:18 +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>
Reviewed-by: Richard Levitte <levitte@openssl.org>
test/run_tests.pl

index f1fcbfc05dd1a9478e6e018d61ff6f9d5fa9dfe6..148f2edc50384bf8a39abcf8ef422461efbdb755 100644 (file)
@@ -62,7 +62,9 @@ if ($list_mode) {
     @tests = map { abs2rel($_, rel2abs(curdir())); } @tests;
 
     my $harness = $TAP_Harness->new(\%tapargs);
-    $harness->runtests(sort @tests);
+    my $ret = $harness->runtests(sort @tests);
+
+    exit $ret->has_errors if (ref($ret) eq "TAP::Parser::Aggregator");
 }