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

Update TAP information for jck tests #440

Closed
wants to merge 1 commit into from
Closed
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
26 changes: 19 additions & 7 deletions scripts/resultsSum.pl
Original file line number Diff line number Diff line change
Expand Up @@ -160,28 +160,40 @@ 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;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks it is missing one case: if diagnostic eq 'failure' and buildList is not openjdk or jck, we still need to append output to tapString.

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 {
} elsif ($diagnostic eq 'failure') {
$tapString .= $output;
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to update

elsif ($diagnostic eq 'failure') {

to

else {

And remove

if ($diagnostic eq 'all') {
		$tapString .= $output;
}

Because if $diagnostic eq 'all' and buildlist is openjdk or jck, output will be appended twice.

if ($spec =~ /zos/) {
my $dmpDir = dirname($resultFile).'/'.$testName;
moveTDUMPS($output, $dmpDir, $spec);
Expand Down
Loading