[Tools 2/2] testbot/WineRunTask: Rename some variables to avoid ambiguity.

Francois Gouget fgouget at codeweavers.com
Tue Apr 18 05:16:14 CDT 2017


$TaskTimedOut is set if the task timed out. It may not be set if an
individual test unit times out when running WineTest for instance.
$TaskFailures keeps track of the failure count for the task which is the
cumulated failure count for all its test units.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
 testbot/bin/WineRunTask.pl | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/testbot/bin/WineRunTask.pl b/testbot/bin/WineRunTask.pl
index 40e1780d..cb127772 100755
--- a/testbot/bin/WineRunTask.pl
+++ b/testbot/bin/WineRunTask.pl
@@ -442,7 +442,7 @@ if (!$Pid)
 #
 
 my $NewStatus = 'completed';
-my ($TestFailures, $TimedOut, $TAError, $PossibleCrash);
+my ($TaskFailures, $TaskTimedOut, $TAError, $PossibleCrash);
 Debug(Elapsed($Start), " Waiting for the script (", $Task->Timeout, "s timeout)\n");
 if (!defined $TA->Wait($Pid, $Timeout, $Keepalive))
 {
@@ -450,8 +450,8 @@ if (!defined $TA->Wait($Pid, $Timeout, $Keepalive))
   if ($ErrMessage =~ /timed out waiting for the child process/)
   {
     LogTaskError("The task timed out\n");
-    $TestFailures = 1;
-    $TimedOut = 1;
+    $TaskFailures = 1;
+    $TaskTimedOut = 1;
   }
   else
   {
@@ -626,7 +626,7 @@ if ($TA->GetFile($RptFileName, $FullLogFileName))
     }
     close($LogFile);
 
-    if (!$IsWineTest or $TimedOut)
+    if (!$IsWineTest or $TaskTimedOut)
     {
       # This is either not a Wine test, which means the report need not follow
       # the Wine test standards, or the report got truncated due to the
@@ -648,7 +648,7 @@ if ($TA->GetFile($RptFileName, $FullLogFileName))
       $LogFailures++;
     }
     # $LogFailures can legitimately be undefined in case of a timeout
-    $TestFailures += $LogFailures || 0;
+    $TaskFailures += $LogFailures || 0;
   }
   else
   {
@@ -674,4 +674,4 @@ FatalTAError(undef, $TAError, $PossibleCrash) if (defined $TAError);
 # Wrap up
 #
 
-WrapUpAndExit($NewStatus, $TestFailures);
+WrapUpAndExit($NewStatus, $TaskFailures);
-- 
2.11.0



More information about the wine-patches mailing list