Skip to content

Commit

Permalink
Merge pull request #509 from sophia-guo/result
Browse files Browse the repository at this point in the history
Failed test cases 'Finish Time' information is nested.
  • Loading branch information
smlambert committed Mar 8, 2024
2 parents 3388788 + 7080cb3 commit 1c83a08
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions scripts/resultsSum.pl
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ sub resultReporter {
}
my $startTime = 0;
my $endTime = 0;
while ( $result = <$fhIn> ) {
while ( $result = <$fhIn> ) {
# remove extra carriage return
$result =~ s/\r//g;
$output .= ' ' . $result;
Expand Down Expand Up @@ -160,7 +160,7 @@ sub resultReporter {
$tapString .= "not ok " . $numOfTotal . " - " . $testName . "\n";
$tapString .= " ---\n";
# sometime jck test output shows after _FAILED message and before the $testName\E Finish Time

my $isJckFailedTestFinish = 0;
my $jckFailedDuration = '';
if ($buildList =~ /jck/) {
while ( my $extraFailedOutput = <$fhIn> ) {
Expand All @@ -173,6 +173,7 @@ sub resultReporter {
}
$endTime = $1;
$jckFailedDuration .= " duration_ms: " . ($endTime - $startTime) . "\n ...\n";
$isJckFailedTestFinish = 1;
last;
}
}
Expand Down Expand Up @@ -202,7 +203,7 @@ sub resultReporter {
$testName =~ s/#.*//;
print "Testname removed is " . $testName. "\n";
$failureTests .= ' ' ."TEST: " . $testName . "\n";
} elsif ( $lines[$i] =~ /(Test results: .*)(failed|error)(: \d{1,}$)/) {
} elsif ( $lines[$i] =~ /(Test results: .*)(skipped|failed|error)(: \d{1,}$)/) {
$testResult = $lines[$i];
}
}
Expand All @@ -223,6 +224,10 @@ sub resultReporter {
my $dmpDir = dirname($resultFile).'/'.$testName;
moveTDUMPS($output, $dmpDir, $spec);
}

if ( $isJckFailedTestFinish ) {
last;
}
} elsif ($result eq ($testName . "_DISABLED\n")) {
$result =~ s/_DISABLED\n$//;
push (@disabled, $result);
Expand Down

0 comments on commit 1c83a08

Please sign in to comment.