Francois Gouget : testbot/WineRunReconfig: Avoid variable redefinitions.

Alexandre Julliard julliard at winehq.org
Wed Feb 23 15:58:45 CST 2022


Module: tools
Branch: master
Commit: 8e21d4317e0141ba606654c9e148295990bd2b47
URL:    https://source.winehq.org/git/tools.git/?a=commit;h=8e21d4317e0141ba606654c9e148295990bd2b47

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Wed Feb 23 15:54:51 2022 +0100

testbot/WineRunReconfig: Avoid variable redefinitions.

Luckily these instances were harmless but somewhat confusing.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 testbot/bin/WineRunBuild.pl    |  4 ++--
 testbot/bin/WineRunReconfig.pl |  4 ++--
 testbot/bin/WineRunTask.pl     | 12 ++++++------
 testbot/bin/WineRunWineTest.pl | 14 +++++++-------
 4 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/testbot/bin/WineRunBuild.pl b/testbot/bin/WineRunBuild.pl
index 50696b7..1bddc04 100755
--- a/testbot/bin/WineRunBuild.pl
+++ b/testbot/bin/WineRunBuild.pl
@@ -432,8 +432,8 @@ if ($TA->GetFile("Build.log", "$TaskDir/task.log"))
     # that explains why.
     $NewStatus = "badbuild";
   }
-  my $ErrMessage = CreateLogErrorsCache($LogInfo);
-  LogTaskError("$ErrMessage\n") if (defined $ErrMessage);
+  my $LogErrMsg = CreateLogErrorsCache($LogInfo);
+  LogTaskError("$LogErrMsg\n") if (defined $LogErrMsg);
 }
 elsif (!defined $TAError)
 {
diff --git a/testbot/bin/WineRunReconfig.pl b/testbot/bin/WineRunReconfig.pl
index 04308f3..9f71ff4 100755
--- a/testbot/bin/WineRunReconfig.pl
+++ b/testbot/bin/WineRunReconfig.pl
@@ -435,8 +435,8 @@ if ($TA->GetFile("Reconfig.log", "$TaskDir/task.log"))
                         MakeSecureURL(GetTaskURL($JobId, $StepNo, $TaskNo)) ."\n");
     $NewStatus = "badbuild";
   }
-  my $ErrMessage = CreateLogErrorsCache($LogInfo);
-  LogTaskError("$ErrMessage\n") if (defined $ErrMessage);
+  my $LogErrMsg = CreateLogErrorsCache($LogInfo);
+  LogTaskError("$LogErrMsg\n") if (defined $LogErrMsg);
 }
 elsif (!defined $TAError)
 {
diff --git a/testbot/bin/WineRunTask.pl b/testbot/bin/WineRunTask.pl
index 72faf10..017e8c4 100755
--- a/testbot/bin/WineRunTask.pl
+++ b/testbot/bin/WineRunTask.pl
@@ -401,8 +401,8 @@ if ($Step->FileType ne "exe32" and $Step->FileType ne "exe64")
   FatalError("Unexpected file type '". $Step->FileType ."' found for ". $Step->Type ." step\n");
 }
 
-(my $ErrMessage, $ReportNames, my $TaskMissions) = $Task->GetReportNames();
-FatalError "$ErrMessage\n" if (defined $ErrMessage);
+(my $ReportErr, $ReportNames, my $TaskMissions) = $Task->GetReportNames();
+FatalError "$ReportErr\n" if (defined $ReportErr);
 FatalError "Cannot specify multiple missions\n" if (@{$TaskMissions->{Missions}} > 1);
 my $Mission = $TaskMissions->{Missions}->[0];
 my $RptFileName = $ReportNames->[0];
@@ -534,8 +534,8 @@ if ($TA->GetFile("Task.log", "$TaskDir/task.log"))
 {
   my $LogInfo = ParseTaskLog("$TaskDir/task.log");
   $TaskFailures ||= $LogInfo->{ErrCount};
-  my $ErrMessage = CreateLogErrorsCache($LogInfo);
-  LogTaskError("$ErrMessage\n") if (defined $ErrMessage);
+  my $LogErrMsg = CreateLogErrorsCache($LogInfo);
+  LogTaskError("$LogErrMsg\n") if (defined $LogErrMsg);
 }
 elsif (!defined $TAError)
 {
@@ -564,8 +564,8 @@ if ($TA->GetFile($RptFileName, "$TaskDir/$RptFileName"))
 
     # $LogInfo->{Failures} can legitimately be undefined in case of a timeout
     $TaskFailures += $LogInfo->{Failures} || 0;
-    my $ErrMessage = CreateLogErrorsCache($LogInfo, $Task);
-    LogTaskError("$ErrMessage\n") if (defined $ErrMessage);
+    my $LogErrMsg = CreateLogErrorsCache($LogInfo, $Task);
+    LogTaskError("$LogErrMsg\n") if (defined $LogErrMsg);
   }
 }
 elsif (!defined $TAError)
diff --git a/testbot/bin/WineRunWineTest.pl b/testbot/bin/WineRunWineTest.pl
index c1a37ae..3526719 100755
--- a/testbot/bin/WineRunWineTest.pl
+++ b/testbot/bin/WineRunWineTest.pl
@@ -399,8 +399,8 @@ if (($Step->Type eq "suite" and $Step->FileType ne "none") or
   FatalError("Unexpected file type '". $Step->FileType ."' found for ". $Step->Type ." step\n");
 }
 
-(my $ErrMessage, $ReportNames, my $_TaskMissions) = $Task->GetReportNames();
-FatalError "$ErrMessage\n" if (defined $ErrMessage);
+(my $ReportErr, $ReportNames, my $_TaskMissions) = $Task->GetReportNames();
+FatalError "$ReportErr\n" if (defined $ReportErr);
 
 
 #
@@ -482,7 +482,7 @@ if (!$Pid)
 #
 
 my $NewStatus = 'completed';
-my ($TaskFailures, $TaskTimedOut, $TAError, $PossibleCrash);
+my ($ErrMessage, $TaskFailures, $TaskTimedOut, $TAError, $PossibleCrash);
 Debug(Elapsed($Start), " Waiting for the script (", $Task->Timeout, "s timeout)\n");
 if (!defined $TA->Wait($Pid, $Task->Timeout, 60))
 {
@@ -543,8 +543,8 @@ if ($TA->GetFile("Task.log", "$TaskDir/task.log"))
     $TaskFailures = undef;
     $PossibleCrash = 1;
   }
-  my $ErrMessage = CreateLogErrorsCache($LogInfo);
-  LogTaskError("$ErrMessage\n") if (defined $ErrMessage);
+  my $LogErrMsg = CreateLogErrorsCache($LogInfo);
+  LogTaskError("$LogErrMsg\n") if (defined $LogErrMsg);
 }
 elsif (!defined $TAError)
 {
@@ -580,8 +580,8 @@ foreach my $RptFileName (@$ReportNames)
 
       # $LogInfo->{Failures} can legitimately be undefined in case of a timeout
       $TaskFailures += $LogInfo->{Failures} || 0;
-      my $ErrMessage = CreateLogErrorsCache($LogInfo, $Task);
-      LogTaskError("$ErrMessage\n") if (defined $ErrMessage);
+      my $LogErrMsg = CreateLogErrorsCache($LogInfo, $Task);
+      LogTaskError("$LogErrMsg\n") if (defined $LogErrMsg);
     }
   }
   elsif (!defined $TAError and




More information about the wine-cvs mailing list