提交 fe537f89 编写于 作者: H Hugo Landau 提交者: Tomas Mraz

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: NPaul Dale <pauli@openssl.org>
Reviewed-by: NRichard Levitte <levitte@openssl.org>
Reviewed-by: NTomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17823)
上级 e9492d1c
...@@ -314,10 +314,12 @@ my $harness = $package->new(\%tapargs); ...@@ -314,10 +314,12 @@ my $harness = $package->new(\%tapargs);
my $ret = my $ret =
$harness->runtests(map { [ abs2rel($_, rel2abs(curdir())), basename($_) ] } $harness->runtests(map { [ abs2rel($_, rel2abs(curdir())), basename($_) ] }
@preps); @preps);
die if $ret->has_errors;
$ret = if (ref($ret) ne "TAP::Parser::Aggregator" || !$ret->has_errors) {
$ret =
$harness->runtests(map { [ abs2rel($_, rel2abs(curdir())), basename($_) ] } $harness->runtests(map { [ abs2rel($_, rel2abs(curdir())), basename($_) ] }
sort { reorder($a) cmp reorder($b) } keys %tests); sort { reorder($a) cmp reorder($b) } keys %tests);
}
# If this is a TAP::Parser::Aggregator, $ret->has_errors is the count of # 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 # tests that failed. We don't bother with that exact number, just exit
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册