From 6c18b1e96f0a8a1bbd2a4c1126fd784d6bdf9495 Mon Sep 17 00:00:00 2001 From: Sophia Guo Date: Fri, 5 Apr 2024 13:03:26 -0400 Subject: [PATCH 1/2] Parse numbers with coma and remove extra new lines Signed-off-by: Sophia Guo --- scripts/resultsSum.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/resultsSum.pl b/scripts/resultsSum.pl index 51f37303..561a88d1 100755 --- a/scripts/resultsSum.pl +++ b/scripts/resultsSum.pl @@ -148,8 +148,9 @@ sub resultReporter { $endTime = $1; $tapString .= " duration_ms: " . ($endTime - $startTime) . "\n ...\n"; last; - } elsif ($result =~ /(Test results: .*)(passed|skipped|failed|error)(: \d{1,}$)/) { + } elsif ($result =~ /(Test results: .*)(passed|skipped|failed|error)(: .*\d{1,}$)/) { $testCasesPerTargetSummary = $result; + chomp($testCasesPerTargetSummary); push (@testCasesResults, $result); } elsif ($result eq ($testName . "_PASSED\n")) { $numOfPassed++; From 0f194c898afbcd9872f2558b2c529c11503b395b Mon Sep 17 00:00:00 2001 From: Sophia Guo Date: Fri, 5 Apr 2024 17:13:35 -0400 Subject: [PATCH 2/2] Testcase status format update Update Test target Tap file format Use commas as thousands seperator Signed-off-by: Sophia Guo --- scripts/resultsSum.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/resultsSum.pl b/scripts/resultsSum.pl index 561a88d1..3ba19eae 100755 --- a/scripts/resultsSum.pl +++ b/scripts/resultsSum.pl @@ -161,7 +161,7 @@ sub resultReporter { if ( $testCasesPerTargetSummary ) { $summarySuffix = " - " . $testCasesPerTargetSummary . " "; $tapString .= " output:\n |\n"; - $tapString .= " " . $testCasesPerTargetSummary; + $tapString .= " " . $testCasesPerTargetSummary . "\n"; } push (@passed, $testName . $summarySuffix . $successRate); @@ -443,6 +443,10 @@ () } } } + + for (keys %testCasesSummary ) { + while ($testCasesSummary{$_} =~ s/^(\d+)(\d{3})/$1,$2/) {} + } $testCaseResults = "TESTCASES RESULTS SUMMARY: passed: " . $testCasesSummary{'passed: '} . "; failed: " . $testCasesSummary{'failed: '} . "; error: " . $testCasesSummary{'error: '} . "; skipped: " . $testCasesSummary{'skipped: '}; return $testCaseResults;