[Tools 1/2] testbot/WineRunTask: Tweak matching for the start and done lines.

Francois Gouget fgouget at codeweavers.com
Fri Apr 21 03:41:50 CDT 2017


Allow dll names to contain a dash as we have many such dlls in Wine.
Allow garbage at the start of the done line, since we can use the
current dll name to identify where it starts. But don't allow garbage at
the beginning of the start line as it could interfere with the proper
detection of the dll name.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
 testbot/bin/WineRunTask.pl | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/testbot/bin/WineRunTask.pl b/testbot/bin/WineRunTask.pl
index 8b9afabf..f6f63507 100755
--- a/testbot/bin/WineRunTask.pl
+++ b/testbot/bin/WineRunTask.pl
@@ -473,7 +473,7 @@ if ($TA->GetFile($RptFileName, $FullLogFileName))
     my ($CurrentIsPolluted, %CurrentPids, $LogFailures);
     foreach my $Line (<$LogFile>)
     {
-      if ($Line =~ m%([_.a-z0-9]+):([_a-z0-9]*) start (?:-|[/_.a-z0-9]+) (?:-|[.0-9a-f]+)\r?$%)
+      if ($Line =~ m%^([_.a-z0-9-]+):([_a-z0-9]*) start (?:-|[/_.a-z0-9]+) (?:-|[.0-9a-f]+)\r?$%)
       {
         my ($Dll, $Unit) = ($1, $2);
         if ($CurrentDll ne "")
@@ -554,7 +554,9 @@ if ($TA->GetFile($RptFileName, $FullLogFileName))
           }
         }
       }
-      elsif ($Line =~ /^([_.a-z0-9]+):([_a-z0-9]*)(?::([0-9a-f]+))? done \((-?\d+)\)(?:\r?$| in)/)
+      elsif ($Line =~ /^([_.a-z0-9-]+):([_a-z0-9]*)(?::([0-9a-f]+))? done \((-?\d+)\)(?:\r?$| in)/ or
+             ($CurrentDll ne "" and
+              $Line =~ /(\Q$CurrentDll\E):([_a-z0-9]*)(?::([0-9a-f]+))? done \((-?\d+)\)(?:\r?$| in)/))
       {
         my ($Dll, $Unit, $Pid, $Rc) = ($1, $2, $3, $4);
 
-- 
2.11.0




More information about the wine-patches mailing list