From 7f42a8c5690c873d4893d02bd0fdd5f0b15d90f5 Mon Sep 17 00:00:00 2001 From: Sophia Guo Date: Wed, 6 Mar 2024 15:11:55 -0500 Subject: [PATCH 1/2] Failed test cases 'Finish Time' information is nested. Jump out of the nested loop to next possible loop. Signed-off-by: Sophia Guo --- scripts/resultsSum.pl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/resultsSum.pl b/scripts/resultsSum.pl index cf80c811..79b19305 100755 --- a/scripts/resultsSum.pl +++ b/scripts/resultsSum.pl @@ -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; @@ -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> ) { @@ -173,6 +173,7 @@ sub resultReporter { } $endTime = $1; $jckFailedDuration .= " duration_ms: " . ($endTime - $startTime) . "\n ...\n"; + $isJckFailedTestFinish = 1; last; } } @@ -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); From 7080cb30ce25a751ba7e721c2528dd5cde141edd Mon Sep 17 00:00:00 2001 From: Sophia Guo Date: Thu, 7 Mar 2024 23:14:24 -0500 Subject: [PATCH 2/2] Add test results skipped regex Signed-off-by: Sophia Guo --- scripts/resultsSum.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/resultsSum.pl b/scripts/resultsSum.pl index 79b19305..93438c77 100755 --- a/scripts/resultsSum.pl +++ b/scripts/resultsSum.pl @@ -203,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]; } }