Module: tools
Branch: master
Commit: 6fc3305498ed4b14f7aa176eb429257edfa86ffc
URL: http://source.winehq.org/git/tools.git/?a=commit;h=6fc3305498ed4b14f7aa176e…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Thu Mar 23 15:13:45 2017 +0100
testbot/web: Take into account the optional pid when reporting timeouts.
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(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
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
{