[tools] winetest/dissect: Add support for WINETEST_TIME reports.

Francois Gouget fgouget at codeweavers.com
Thu Mar 11 07:04:00 CST 2021


WineTest reports would usually not have timing information but this
keeps dissect in sync with the TestBot and it may be useful to get
reports with detailed timing information.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
 winetest/dissect | 50 ++++++++++++++++++++++++------------------------
 1 file changed, 25 insertions(+), 25 deletions(-)

diff --git a/winetest/dissect b/winetest/dissect
index 797c204b3..304e9c998 100755
--- a/winetest/dissect
+++ b/winetest/dissect
@@ -610,64 +610,64 @@ while ($line = <IN>) {
         }
     }
     elsif (($unit ne "" and
-            $line =~ /^(.*?)($units_re)\.c:(\d+): (Subtest ([_.a-z0-9-]+).*)$/) or
-           $line =~ /^()([_a-z0-9]+)\.c:(\d+): (Subtest ([_.a-z0-9-]+).*)$/)
+            $line =~ /^(.*?)($units_re)\.c:(\d+)(:[0-9.]* Subtest ([_.a-z0-9-]+).*)$/) or
+           $line =~ /^()([_a-z0-9]+)\.c:(\d+)(:[0-9.]* Subtest ([_.a-z0-9-]+).*)$/)
     {
         my ($pollution, $l_unit, $l_num, $l_text, $l_subunit) = ($1, $2, $3, $4, $5);
         add_test_line("trace", escapeHTML($pollution) .
-                               get_source_link($l_unit, $l_num) .": ".
+                               get_source_link($l_unit, $l_num) .
                                escapeHTML($l_text));
         check_unit($l_unit, "subtest");
         $units{$l_subunit} = 1;
         $units_re = join("|", keys %units);
     }
     elsif (($unit ne "" and
-            $line =~ /^(.*?)($units_re)\.c:(\d+): (Test (?:failed|succeeded inside todo block): .*)$/) or
-           $line =~ /^()([_a-z0-9]+)\.c:(\d+): (Test (?:failed|succeeded inside todo block): .*)$/)
+            $line =~ /^(.*?)($units_re)\.c:(\d+)(:[0-9.]* Test (?:failed|succeeded inside todo block): .*)$/) or
+           $line =~ /^()([_a-z0-9]+)\.c:(\d+)(:[0-9.]* Test (?:failed|succeeded inside todo block): .*)$/)
     {
         my ($pollution, $l_unit, $l_num, $l_text) = ($1, $2, $3, $4);
         add_test_line("failed", escapeHTML($pollution) .
-                                get_source_link($l_unit, $l_num) .": ".
+                                get_source_link($l_unit, $l_num) .
                                 escapeHTML($l_text));
         check_unit($l_unit, "failure");
         $failures++;
     }
     elsif (($unit ne "" and
-            $line =~ /^(.*?)($units_re)\.c:(\d+): (Test marked todo: .*)$/) or
-           $line =~ /^()([_a-z0-9]+)\.c:(\d+): (Test marked todo: .*)$/)
+            $line =~ /^(.*?)($units_re)\.c:(\d+)(:[0-9.]* Test marked todo: .*)$/) or
+           $line =~ /^()([_a-z0-9]+)\.c:(\d+)(:[0-9.]* Test marked todo: .*)$/)
     {
         my ($pollution, $l_unit, $l_num, $l_text) = ($1, $2, $3, $4);
         add_test_line("todo", escapeHTML($pollution) .
-                              get_source_link($l_unit, $l_num) .": ".
+                              get_source_link($l_unit, $l_num) .
                               escapeHTML($l_text));
         check_unit($l_unit, "todo");
         $todo++;
     }
     elsif (($unit ne "" and
-            $line =~ /^(.*?)($units_re)\.c:(\d+): (Tests skipped: .*)$/) or
-           $line =~ /^()([_a-z0-9]+)\.c:(\d+): (Tests skipped: .*)$/)
+            $line =~ /^(.*?)($units_re)\.c:(\d+)(:[0-9.]* Tests skipped: .*)$/) or
+           $line =~ /^()([_a-z0-9]+)\.c:(\d+)(:[0-9.]* Tests skipped: .*)$/)
     {
         my ($pollution, $l_unit, $l_num, $l_text) = ($1, $2, $3, $4);
         add_test_line("skipped", escapeHTML($pollution) .
-                                 get_source_link($l_unit, $l_num) .": ".
+                                 get_source_link($l_unit, $l_num) .
                                  escapeHTML($l_text));
         # Don't complain and don't count misplaced skips
         $skipped++ if ($units{$l_unit});
     }
     elsif (($unit ne "" and
-            $line =~ /^(.*?)($units_re)\.c:(\d+): (IgnoreExceptions=([01]).*)$/) or
-         $line =~ /^()([_.a-z0-9]+)\.c:(\d+): (IgnoreExceptions=([01]).*)$/)
+            $line =~ /^(.*?)($units_re)\.c:(\d+)(:[0-9.]* IgnoreExceptions=([01]).*)$/) or
+         $line =~ /^()([_.a-z0-9]+)\.c:(\d+)(:[0-9.]* IgnoreExceptions=([01]).*)$/)
     {
       my ($pollution, $l_unit, $l_num, $l_text, $l_ignore) = ($1, $2, $3, $4, $5);
       add_test_line("", escapeHTML($pollution) .
-                        get_source_link($l_unit, $l_num) .": ".
+                        get_source_link($l_unit, $l_num) .
                         escapeHTML($l_text));
       check_unit($l_unit, "IgnoreExceptions");
       $ignore_exceptions = $l_ignore;
     }
     elsif (($unit ne "" and
-            $line =~ /([0-9a-f]+):($units_re): unhandled exception [0-9a-fA-F]{8} at /) or
-           $line =~ /^([0-9a-f]+):([_.a-z0-9]+): unhandled exception [0-9a-fA-F]{8} at /)
+            $line =~ /([0-9a-f]+):($units_re):[0-9.]* unhandled exception [0-9a-fA-F]{8} at /) or
+           $line =~ /^([0-9a-f]+):([_.a-z0-9]+):[0-9.]* unhandled exception [0-9a-fA-F]{8} at /)
     {
         my ($l_pid, $l_unit) = ($1, $2);
         my $class = "";
@@ -699,8 +699,8 @@ while ($line = <IN>) {
         add_test_line($class, escapeHTML($line));
     }
     elsif (($unit ne "" and
-            $line =~ /^(.*?)($units_re)\.c:(\d+): (unhandled exception [0-9a-fA-F]{8} in child process ([0-9a-f]+).*)$/) or
-           $line =~ /^()([_.a-z0-9]+)\.c:(\d+): (unhandled exception [0-9a-fA-F]{8} in child process ([0-9a-f]+).*)$/)
+            $line =~ /^(.*?)($units_re)\.c:(\d+)(:[0-9.]* unhandled exception [0-9a-fA-F]{8} in child process ([0-9a-f]+).*)$/) or
+           $line =~ /^()([_.a-z0-9]+)\.c:(\d+)(:[0-9.]* unhandled exception [0-9a-fA-F]{8} in child process ([0-9a-f]+).*)$/)
     {
         my ($pollution, $l_unit, $l_num, $l_text, $l_pid) = ($1, $2, $3, $4, $5);
         my $class = "";
@@ -717,21 +717,21 @@ while ($line = <IN>) {
             $failures++;
         }
         add_test_line($class, escapeHTML($pollution) .
-                              get_source_link($l_unit, $l_num) .": ".
+                              get_source_link($l_unit, $l_num) .
                               escapeHTML($l_text));
     }
     elsif (($unit ne "" and
-            $line =~ /^(.*?)($units_re)\.c:(\d+): (.*)$/) or
-           $line =~ /^()([_a-z0-9]+)\.c:(\d+): (.*)$/)
+            $line =~ /^(.*?)($units_re)\.c:(\d+)(:[0-9.]* .*)$/) or
+           $line =~ /^()([_a-z0-9]+)\.c:(\d+)(:[0-9.]* .*)$/)
     {
         my ($pollution, $l_unit, $l_num, $l_text) = ($1, $2, $3, $4);
         add_test_line("trace", escapeHTML($pollution) .
-                               get_source_link($l_unit, $l_num) .": ".
+                               get_source_link($l_unit, $l_num) .
                                escapeHTML($l_text));
     }
     elsif (($unit ne "" and
-            $line =~ /([0-9a-f]+):($unit): (\d+) tests? executed \((\d+) marked as todo, (\d+) failures?\), (\d+) skipped\./) or
-           $line =~ /^([0-9a-f]+):([_a-z0-9]+): (\d+) tests? executed \((\d+) marked as todo, (\d+) failures?\), (\d+) skipped\./)
+            $line =~ /([0-9a-f]+):($unit):[0-9.]* (\d+) tests? executed \((\d+) marked as todo, (\d+) failures?\), (\d+) skipped\./) or
+           $line =~ /^([0-9a-f]+):([_a-z0-9]+):[0-9.]* (\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);
 
-- 
2.20.1




More information about the wine-devel mailing list