Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[backport 2.28] Print the list of failed suites in verbose mode #6412

Merged
merged 1 commit into from
Oct 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions tests/scripts/run-test-suites.pl
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ =head1 SYNOPSIS

my $prefix = $^O eq "MSWin32" ? '' : './';

my ($failed_suites, $total_tests_run, $failed, $suite_cases_passed,
my (@failed_suites, $total_tests_run, $failed, $suite_cases_passed,
$suite_cases_failed, $suite_cases_skipped, $total_cases_passed,
$total_cases_failed, $total_cases_skipped );
my $suites_skipped = 0;
Expand Down Expand Up @@ -112,7 +112,7 @@ sub pad_print_center {
pad_print_center( 72, '-', "End $suite" );
}
} else {
$failed_suites++;
push @failed_suites, $suite;
print "FAIL\n";
if( $verbose ) {
pad_print_center( 72, '-', "Begin $suite" );
Expand All @@ -139,12 +139,17 @@ sub pad_print_center {
}

print "-" x 72, "\n";
print $failed_suites ? "FAILED" : "PASSED";
print @failed_suites ? "FAILED" : "PASSED";
printf( " (%d suites, %d tests run%s)\n",
scalar(@suites) - $suites_skipped,
$total_tests_run,
$suites_skipped ? ", $suites_skipped suites skipped" : "" );

if( $verbose && @failed_suites ) {
# the output can be very long, so provide a summary of which suites failed
print " failed suites : @failed_suites\n";
}

if( $verbose > 1 ) {
print " test cases passed :", $total_cases_passed, "\n";
print " failed :", $total_cases_failed, "\n";
Expand All @@ -159,5 +164,5 @@ sub pad_print_center {
}
}

exit( $failed_suites ? 1 : 0 );
exit( @failed_suites ? 1 : 0 );