Skip to content

Commit

Permalink
Merge pull request #545 from sophia-guo/failures
Browse files Browse the repository at this point in the history
Adding failed test cases to console
  • Loading branch information
karianna committed May 8, 2024
2 parents f0d3a12 + 59a3d9a commit 6e73a9f
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions scripts/resultsSum.pl
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,6 @@ sub resultReporter {
} elsif ($result eq ($testName . "_FAILED\n")) {
$numOfFailed++;
$numOfTotal++;
my $summarySuffix = '';
if ( $testCasesPerTargetSummary ) {
$summarySuffix = " - " . $testCasesPerTargetSummary . " ";
}
push (@failed, $testName . $summarySuffix . $successRate);
$tapString .= "not ok " . $numOfTotal . " - " . $testName . "\n";
$tapString .= " ---\n";
# sometime jck test output shows after _FAILED message and before the $testName\E Finish Time
Expand All @@ -197,12 +192,11 @@ sub resultReporter {
}
}
}

my $failureTests = "";
if ($diagnostic ne 'failure' || ($buildList !~ /openjdk/ && $buildList !~ /jck/)) {
$tapString .= $output;
} else { #rerun jdk or jck* custom target only work for diagnostic=failure
my @lines = split('\\n', $output);
my $failureTests = "";
if ($buildList =~ /openjdk/) {
for my $i (0 .. $#lines) {
if ( $lines[$i] =~ /[-]{50}/) {
Expand Down Expand Up @@ -243,6 +237,17 @@ sub resultReporter {
moveTDUMPS($output, $dmpDir, $spec);
}

my $summarySuffix = '';
if ( $testCasesPerTargetSummary ) {
$summarySuffix = " - " . $testCasesPerTargetSummary . " ";
$testCasesPerTargetSummary .= "\n";
$failureTests =~ s/$testCasesPerTargetSummary//;
$failureTests =~ s/ /\t\t\t/;
chomp($failureTests);
$summarySuffix .= "\n\t\t" . "Failed test cases: \n" . "$failureTests";
}

push (@failed, $testName . $summarySuffix . $successRate);
if ( $isJckFailedTestFinish ) {
last;
}
Expand Down

0 comments on commit 6e73a9f

Please sign in to comment.