[Tools] testbot/web: Take into account the optional pid when reporting timeouts.

Francois Gouget fgouget at codeweavers.com
Thu Mar 23 09:13:45 CDT 2017


The 'done' line will not have a test unit name if there was no command
line parameter. Furthermore it may or may not have a process pid too.
So make sure that when the JobDetails page shows a timeout error it does
not mistake the pid for the test unit name.

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

diff --git a/testbot/web/JobDetails.pl b/testbot/web/JobDetails.pl
index 4a5596c..1d47763 100644
--- a/testbot/web/JobDetails.pl
+++ b/testbot/web/JobDetails.pl
@@ -372,9 +372,10 @@ sub GenerateBody($)
             print "<pre><code>";
             $First = !1;
           }
-          if (! $FullLog && $Line =~ m/^[^:]+:([^ ]+) done \(258\)/)
+          if (! $FullLog && $Line =~ m/^[^:]+:([^:]*)(?::[0-9a-f]+)? done \(258\)/)
           {
-            print "$1: Timeout\n";
+            my $Unit = $1 ne "" ? "$1: " : "";
+            print "${Unit}Timeout\n";
           }
           else
           {
-- 
2.11.0



More information about the wine-patches mailing list