Francois Gouget : testbot/LogUtils: Pids are always present so simplify the regexes.

Alexandre Julliard julliard at winehq.org
Fri Nov 15 10:41:28 CST 2019


Module: tools
Branch: master
Commit: 5f5782228b451526fa986581f87de55d2f82729b
URL:    https://source.winehq.org/git/tools.git/?a=commit;h=5f5782228b451526fa986581f87de55d2f82729b

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Fri Nov 15 12:55:24 2019 +0100

testbot/LogUtils: Pids are always present so simplify the regexes.

Nowadays the tests themselves always put the pid on the unhandled
exception and test summary lines.
And both WineTest and TestLauncher always put it on the done lines.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 testbot/lib/WineTestBot/LogUtils.pm | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm
index 99b1568..5e5af0e 100644
--- a/testbot/lib/WineTestBot/LogUtils.pm
+++ b/testbot/lib/WineTestBot/LogUtils.pm
@@ -414,9 +414,9 @@ sub ParseWineTestReport($$$)
 
       $Cur->{LineFailures}++;
     }
-    elsif ($Line =~ /^(?:([0-9a-f]+):)?([_.a-z0-9]+): unhandled exception [0-9a-fA-F]{8} at / or
+    elsif ($Line =~ /^([0-9a-f]+):([_.a-z0-9]+): unhandled exception [0-9a-fA-F]{8} at / or
            ($Cur->{Unit} ne "" and
-            $Line =~ /(?:([0-9a-f]+):)?($Cur->{UnitsRE}): unhandled exception [0-9a-fA-F]{8} at /))
+            $Line =~ /([0-9a-f]+):($Cur->{UnitsRE}): unhandled exception [0-9a-fA-F]{8} at /))
     {
       my ($Pid, $Unit) = ($1, $2);
 
@@ -429,9 +429,9 @@ sub ParseWineTestReport($$$)
       _CheckUnit($Parser, $Cur, $Unit, "unhandled exception");
       $Cur->{LineFailures}++;
     }
-    elsif ($Line =~ /^(?:([0-9a-f]+):)?([_a-z0-9]+): \d+ tests? executed \((\d+) marked as todo, (\d+) failures?\), (\d+) skipped\./ or
+    elsif ($Line =~ /^([0-9a-f]+):([_a-z0-9]+): \d+ tests? executed \((\d+) marked as todo, (\d+) failures?\), (\d+) skipped\./ or
            ($Cur->{Unit} ne "" and
-            $Line =~ /(?:([0-9a-f]+):)?($Cur->{Unit}): \d+ tests? executed \((\d+) marked as todo, (\d+) failures?\), (\d+) skipped\./))
+            $Line =~ /([0-9a-f]+):($Cur->{Unit}): \d+ tests? executed \((\d+) marked as todo, (\d+) failures?\), (\d+) skipped\./))
     {
       my ($Pid, $Unit, $Todos, $Failures, $Skips) = ($1, $2, $3, $4, $5);
 
@@ -451,9 +451,9 @@ sub ParseWineTestReport($$$)
         _CheckUnit($Parser, $Cur, $Unit, "test summary") if ($Todos or $Failures);
       }
     }
-    elsif ($Line =~ /^([_.a-z0-9-]+):([_a-z0-9]*)(?::([0-9a-f]+))? done \((-?\d+)\)(?:\r?$| in)/ or
+    elsif ($Line =~ /^([_.a-z0-9-]+):([_a-z0-9]*):([0-9a-f]+) done \((-?\d+)\)(?:\r?$| in)/ or
            ($Cur->{Dll} ne "" and
-            $Line =~ /(\Q$Cur->{Dll}\E):([_a-z0-9]*)(?::([0-9a-f]+))? done \((-?\d+)\)(?:\r?$| in)/))
+            $Line =~ /(\Q$Cur->{Dll}\E):([_a-z0-9]*):([0-9a-f]+) done \((-?\d+)\)(?:\r?$| in)/))
     {
       my ($Dll, $Unit, $Pid, $Rc) = ($1, $2, $3, $4);
 
@@ -766,7 +766,7 @@ sub GetLogErrors($)
 
       next if ($GetCategory->($Line) !~ /error/);
 
-      if ($Line =~ m/^[^:]+:([^:]*)(?::[0-9a-f]+)? done \(258\)/)
+      if ($Line =~ m/^[^:]+:([^:]*):[0-9a-f]+ done \(258\)/)
       {
         my $Unit = $1;
         $Line = $Unit ne "" ? "$Unit: Timeout" : "Timeout";




More information about the wine-cvs mailing list