Francois Gouget : testbot/LogUtils: Rename the ParseTaskLog() NoLog error field to BadLog.

Alexandre Julliard julliard at winehq.org
Mon Jan 27 14:14:27 CST 2020


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

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Mon Jan 27 03:29:24 2020 +0100

testbot/LogUtils: Rename the ParseTaskLog() NoLog error field to BadLog.

The log file may exist but not be readable.
This makes it consistent with the BadRef / NoRef terminology of
TagNewErrors().
Also don't assume that the error message will evaluate to true.

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/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 cf6428a..9fc5bff 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 (defined $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 ba35d54..04c0e26 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 (defined $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 950661b..696e27e 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 (defined $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 81cff51..96840eb 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"};




More information about the wine-cvs mailing list