Skip to content

Commit

Permalink
Update varialbe name
Browse files Browse the repository at this point in the history
Signed-off-by: Sophia Guo <[email protected]>
  • Loading branch information
sophia-guo committed Mar 13, 2024
1 parent f1a2922 commit 85b4575
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions scripts/resultsSum.pl
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ sub resultReporter {
my $tapString = '';
my $fhIn;
my @testCasesResults;
my $testCaseSummary;
my $testCasesAllTargetsSummary;

print "\n\n";

Expand All @@ -133,7 +133,7 @@ sub resultReporter {
}
my $startTime = 0;
my $endTime = 0;
my $testTargetSummary = '';
my $testCasesPerTargetSummary = '';
while ( $result = <$fhIn> ) {
# remove extra carriage return
$result =~ s/\r//g;
Expand All @@ -149,18 +149,18 @@ sub resultReporter {
$tapString .= " duration_ms: " . ($endTime - $startTime) . "\n ...\n";
last;
} elsif ($result =~ /(Test results: .*)(passed|skipped|failed|error)(: \d{1,}$)/) {
$testTargetSummary = $result;
$testCasesPerTargetSummary = $result;
push (@testCasesResults, $result);
} elsif ($result eq ($testName . "_PASSED\n")) {
$numOfPassed++;
$numOfTotal++;
my $summarySuffix = '';
$tapString .= "ok " . $numOfTotal . " - " . $testName . "\n";
$tapString .= " ---\n";
if ( $testTargetSummary ) {
$summarySuffix = " - " . $testTargetSummary . " ";
if ( $testCasesPerTargetSummary ) {
$summarySuffix = " - " . $testCasesPerTargetSummary . " ";
$tapString .= " output:\n |\n";
$tapString .= " " . $testTargetSummary;
$tapString .= " " . $testCasesPerTargetSummary;
}

push (@passed, $testName . $summarySuffix . $successRate);
Expand All @@ -171,8 +171,8 @@ sub resultReporter {
$numOfFailed++;
$numOfTotal++;
my $summarySuffix = '';
if ( $testTargetSummary ) {
$summarySuffix = " - " . $testTargetSummary . " ";
if ( $testCasesPerTargetSummary ) {
$summarySuffix = " - " . $testCasesPerTargetSummary . " ";
}
push (@failed, $testName . $summarySuffix . $successRate);
$tapString .= "not ok " . $numOfTotal . " - " . $testName . "\n";
Expand Down Expand Up @@ -318,8 +318,8 @@ sub resultReporter {

print "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\n";
if (@testCasesResults) {
$testCaseSummary = getTestcaseResults(\@testCasesResults);
print $testCaseSummary . "\n";
$testCasesAllTargetsSummary = getTestcaseResults(\@testCasesResults);
print $testCasesAllTargetsSummary . "\n";
print "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n";
}

Expand Down Expand Up @@ -368,8 +368,8 @@ sub resultReporter {
}

print $fhOut "# TEST TARGETS RESULTS SUMMARY: $testTargetStatus\n";
if ( $testCaseSummary ) {
print $fhOut "# $testCaseSummary " . "\n";
if ( $testCasesAllTargetsSummary ) {
print $fhOut "# $testCasesAllTargetsSummary " . "\n";
}

print $fhOut "1.." . $numOfTotal . "\n";
Expand Down

0 comments on commit 85b4575

Please sign in to comment.