Skip to content

Commit

Permalink
Update TAP information for jck tests
Browse files Browse the repository at this point in the history
Update to add all test output information if diagnostic is 'all'
Filter and summarize failure tests in a similar way to openjdk tests

Signed-off-by: Sophia Guo <sophia.gwf@gmail.com>
  • Loading branch information
sophia-guo committed Apr 14, 2023
1 parent 8ab5268 commit ebfea3f
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions scripts/resultsSum.pl
Original file line number Diff line number Diff line change
Expand Up @@ -160,28 +160,38 @@ sub resultReporter {
$tapString .= "not ok " . $numOfTotal . " - " . $testName . "\n";
$tapString .= " ---\n";
if (($diagnostic eq 'failure') || ($diagnostic eq 'all')) {
if ($buildList =~ /openjdk/) {
if ($diagnostic eq 'all') {
$tapString .= $output;
}
if (($buildList =~ /openjdk/) || ($buildList =~ /jck/)) {
my @lines = split('\\n', $output);
my $failureTests = "";
for my $i (0 .. $#lines) {
if ( $lines[$i] =~ /[-]{50}/) {
if ( ($lines[$i+1] =~ /(TEST: )(.*?)(\.java|\.sh|#.*)$/) || ($lines[$i+1] =~ /(Test results: .*)(failed|error)(: \d{1,}$)/) ) {
$i++;
if ($buildList =~ /openjdk/) {
if ( $lines[$i] =~ /[-]{50}/) {
if ( ($lines[$i+1] =~ /(TEST: )(.*?)(\.java|\.sh|#.*)$/) || ($lines[$i+1] =~ /(Test results: .*)(failed|error)(: \d{1,}$)/) ) {
$i++;
$failureTests .= $lines[$i] . "\n";
}
}
} else {
if ($lines[$i] =~ /(Test results: .*)(failed: .*)(\d{1,}$)/){
$failureTests .= $lines[$i] . "\n";
} elsif ($lines[$i] =~ /(Failed. test cases: \d{1,})/) {
my ($testsName) = $lines[$i] =~ /([^\s]+)/;
$failureTests = " TEST: $testsName" . "\n" . $failureTests;
}
}
}
if ( $failureTests eq "" ) {
if ( ($failureTests eq "") && ($diagnostic eq 'failure')) {
# Output of dump or other non-test failures
$tapString .= $output;
} else {
$tapString .= " output:\n |\n";
$tapString .= " Failed test cases: \n" . $failureTests;
}
} else {
$tapString .= $output;
}
}
}
if ($spec =~ /zos/) {
my $dmpDir = dirname($resultFile).'/'.$testName;
moveTDUMPS($output, $dmpDir, $spec);
Expand Down

0 comments on commit ebfea3f

Please sign in to comment.