[11/25] testbot/LogUtils: Rename the ParseTaskLog() NoLog error field to BadLog.

Francois Gouget fgouget at codeweavers.com
Tue Jan 14 09:42:06 CST 2020


The log file may exist but not be readable.
This makes it consistent with the BadRef / NoRef terminology of
TagNewErrors().
---
 testbot/bin/WineRunBuild.pl         | 4 ++--
 testbot/bin/WineRunReconfig.pl      | 4 ++--
 testbot/bin/WineRunWineTest.pl      | 4 ++--
 testbot/lib/WineTestBot/LogUtils.pm | 5 +++--
 4 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/testbot/bin/WineRunBuild.pl b/testbot/bin/WineRunBuild.pl
index cf6428ae4..5bc3815c5 100755
--- a/testbot/bin/WineRunBuild.pl
+++ b/testbot/bin/WineRunBuild.pl
@@ -433,9 +433,9 @@ if ($TA->GetFile("Build.log", "$TaskDir/log"))
     $NewStatus = "badpatch";
     $TAError = $ErrMessage = undef;
   }
-  elsif ($LogInfo->{NoLog})
+  elsif ($LogInfo->{BadLog})
   {
-    FatalError("$LogInfo->{NoLog}\n", "retry");
+    FatalError("$LogInfo->{BadLog}\n", "retry");
   }
   else
   {
diff --git a/testbot/bin/WineRunReconfig.pl b/testbot/bin/WineRunReconfig.pl
index c16c40a5a..c82d5fcb5 100755
--- a/testbot/bin/WineRunReconfig.pl
+++ b/testbot/bin/WineRunReconfig.pl
@@ -428,9 +428,9 @@ if ($TA->GetFile("Reconfig.log", "$TaskDir/log"))
     $NewStatus = "completed";
     $TAError = $ErrMessage = undef;
   }
-  elsif ($LogInfo->{NoLog})
+  elsif ($LogInfo->{BadLog})
   {
-    FatalError("$LogInfo->{NoLog}\n", "retry");
+    FatalError("$LogInfo->{BadLog}\n", "retry");
   }
   else
   {
diff --git a/testbot/bin/WineRunWineTest.pl b/testbot/bin/WineRunWineTest.pl
index 66df9acec..ea13ca02d 100755
--- a/testbot/bin/WineRunWineTest.pl
+++ b/testbot/bin/WineRunWineTest.pl
@@ -542,9 +542,9 @@ if ($TA->GetFile("Task.log", "$TaskDir/log"))
     $NewStatus = "badpatch";
     $TaskFailures = $TAError = $ErrMessage = $PossibleCrash = undef;
   }
-  elsif ($LogInfo->{NoLog})
+  elsif ($LogInfo->{BadLog})
   {
-    FatalError("$LogInfo->{NoLog}\n", "retry");
+    FatalError("$LogInfo->{BadLog}\n", "retry");
   }
   elsif ($LogInfo->{Type} eq "build")
   {
diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm
index dd98024bd..52bf60d93 100644
--- a/testbot/lib/WineTestBot/LogUtils.pm
+++ b/testbot/lib/WineTestBot/LogUtils.pm
@@ -81,7 +81,7 @@ Either 'ok' if the task was successful or a code indicating why it failed.
 Entries named after the binaries and files of interest to the TestBot that
 have been updated.
 
-=item NoLog
+=item BadLog
 Contains an error message if the task log could not be read.
 
 =back
@@ -95,7 +95,8 @@ sub ParseTaskLog($)
   my $LogFile;
   if (!open($LogFile, "<", $FileName))
   {
-    return {NoLog => "Unable to open the task log for reading: $!"};
+    my $LogName = basename($FileName);
+    return {BadLog => "Unable to open '$LogName' for reading: $!"};
   }
 
   my $LogInfo = {Type => "build"};
-- 
2.20.1




More information about the wine-devel mailing list