[PATCH] testbot/web: Let GetHtmlLine() detect and format the timeout errors.

Francois Gouget fgouget at codeweavers.com
Wed Jun 27 01:09:49 CDT 2018


It already handles filtering and highlighting errors so it makes sense
to also have if reformat the timeout errors for the log summary.

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

diff --git a/testbot/web/JobDetails.pl b/testbot/web/JobDetails.pl
index e5f792929..e7e53d208 100644
--- a/testbot/web/JobDetails.pl
+++ b/testbot/web/JobDetails.pl
@@ -253,6 +253,11 @@ sub GetHtmlLine($$$)
   return undef if ($Category ne "error" and !$FullLog);
 
   my $Html = $self->escapeHTML($Line);
+  if (!$FullLog and $Html =~ m/^[^:]+:([^:]*)(?::[0-9a-f]+)? done \(258\)/)
+  {
+    my $Unit = $1;
+    return $Unit ne "" ? "$Unit: Timeout" : "Timeout";
+  }
   if ($FullLog and $Category ne "none")
   {
     # Highlight all line categories in the full log
@@ -414,15 +419,7 @@ sub GenerateBody($)
           print "<pre><code>";
           $LogFirst = 0;
         }
-        if (!$MoreInfo->{Full} && $Line =~ m/^[^:]+:([^:]*)(?::[0-9a-f]+)? done \(258\)/)
-        {
-          my $Unit = $1 ne "" ? "$1: " : "";
-          print "${Unit}Timeout\n";
-        }
-        else
-        {
-          print "$Html\n";
-        }
+        print "$Html\n";
       }
       close($LogFile);
 
-- 
2.18.0




More information about the wine-devel mailing list