[PATCH] testbot: Fail the task if the log contains perl errors or warnings.

Francois Gouget fgouget at codeweavers.com
Fri Aug 31 07:01:12 CDT 2018


They indicate the script needs fixing and they may mask other issues.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
 testbot/lib/WineTestBot/LogUtils.pm | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm
index 5120217c0..b0b804046 100644
--- a/testbot/lib/WineTestBot/LogUtils.pm
+++ b/testbot/lib/WineTestBot/LogUtils.pm
@@ -71,7 +71,11 @@ sub ParseTaskLog($)
         $Result = "badpatch";
         last; # Should be the last and most specific message
       }
-      elsif ($Line =~ /^Task: /)
+      elsif ($Line =~ /^Task: / or
+             # Typical perl errors
+             $Line =~ /^Use of uninitialized value / or
+             $Line =~ /^Undefined subroutine / or
+             $Line =~ /^Global symbol /)
       {
         $Result = "failed";
       }
@@ -111,7 +115,9 @@ sub GetLogLineCategory($)
       $Line =~ /^Makefile:[0-9]+: recipe for target .* failed$/ or
       $Line =~ /^(?:Build|Reconfig|Task): (?!ok)/ or
       # Typical perl errors
-      $Line =~ /^Use of uninitialized value/)
+      $Line =~ /^Use of uninitialized value / or
+      $Line =~ /^Undefined subroutine / or
+      $Line =~ /^Global symbol /)
   {
     return "error";
   }
-- 
2.18.0



More information about the wine-devel mailing list