summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Landau <hlandau@openssl.org>2022-03-07 10:48:13 +0000
committerTomas Mraz <tomas@openssl.org>2022-03-09 09:46:09 +0100
commitfe537f89cd6b75c10e717a0eb159f33710729b67 (patch)
tree672bd2e58c9f7d9a201aad799b6970a6f6874e02
parente9492d1cecf459261f1f5ac0eb03e9c631600537 (diff)
Fix test failure when testing with Test::Harness
Fixes an issue where, when the test suite was being run with the older Test::Harness package, the test suite would not complete correctly due to evaluation of $harness->runtests()->has_errors, which is only available for the newer TAP::Parser::Aggregator code path. Fixes #17818. Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17823)
-rw-r--r--test/run_tests.pl10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/run_tests.pl b/test/run_tests.pl
index 4ee6a036a9..9e2ea8438b 100644
--- a/test/run_tests.pl
+++ b/test/run_tests.pl
@@ -314,10 +314,12 @@ my $harness = $package->new(\%tapargs);
my $ret =
$harness->runtests(map { [ abs2rel($_, rel2abs(curdir())), basename($_) ] }
@preps);
-die if $ret->has_errors;
-$ret =
- $harness->runtests(map { [ abs2rel($_, rel2abs(curdir())), basename($_) ] }
- sort { reorder($a) cmp reorder($b) } keys %tests);
+
+if (ref($ret) ne "TAP::Parser::Aggregator" || !$ret->has_errors) {
+ $ret =
+ $harness->runtests(map { [ abs2rel($_, rel2abs(curdir())), basename($_) ] }
+ sort { reorder($a) cmp reorder($b) } keys %tests);
+}
# If this is a TAP::Parser::Aggregator, $ret->has_errors is the count of
# tests that failed. We don't bother with that exact number, just exit