[PATCH 1/2] winetest/dissect: Pids are always present so simplify the regexes.

Francois Gouget fgouget at codeweavers.com
Fri Nov 15 05:55:49 CST 2019


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>
---
 winetest/dissect | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/winetest/dissect b/winetest/dissect
index 1bbd78ef2..9cd3f9d60 100755
--- a/winetest/dissect
+++ b/winetest/dissect
@@ -670,9 +670,9 @@ while ($line = <IN>) {
                                get_source_link($l_unit, $l_num) .": ".
                                escapeHTML($l_text));
     }
-    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
            ($unit ne "" and
-            $line =~ /(?:([0-9a-f]+):)?($units_re): unhandled exception [0-9a-fA-F]{8} at /))
+            $line =~ /([0-9a-f]+):($units_re): unhandled exception [0-9a-fA-F]{8} at /))
     {
         my ($l_pid, $l_unit) = ($1, $2);
         if ($units{$l_unit})
@@ -685,9 +685,9 @@ while ($line = <IN>) {
         check_unit($l_unit, "unhandled exception");
         $failures++;
     }
-    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
            ($unit ne "" and
-            $line =~ /(?:([0-9a-f]+):)?($unit): (\d+) tests? executed \((\d+) marked as todo, (\d+) failures?\), (\d+) skipped\./))
+            $line =~ /([0-9a-f]+):($unit): (\d+) tests? executed \((\d+) marked as todo, (\d+) failures?\), (\d+) skipped\./))
     {
         my ($l_pid, $l_unit, $l_total, $l_todo, $l_failures, $l_skipped) = ($1, $2, $3, $4, $5, $6);
 
@@ -709,9 +709,9 @@ while ($line = <IN>) {
             check_unit($l_unit, "test summary") if ($class ne "result");
         }
     }
-    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
            ($dll ne "" and
-            $line =~ /(\Q$dll\E):([_a-z0-9]+)(?::([0-9a-f]+))? done \((-?\d+)\)(?:\r?$| in)/))
+            $line =~ /(\Q$dll\E):([_a-z0-9]+):([0-9a-f]+) done \((-?\d+)\)(?:\r?$| in)/))
     {
         my ($l_dll, $l_unit, $l_pid, $l_rc) = ($1, $2, $3, $4);
 
-- 
2.20.1




More information about the wine-devel mailing list