Francois Gouget : winetest/dissect: Add support for WINETEST_TIME reports.

Alexandre Julliard julliard at winehq.org
Fri Mar 12 14:28:32 CST 2021


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

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Thu Mar 11 14:04:00 2021 +0100

winetest/dissect: Add support for WINETEST_TIME reports.

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>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 winetest/dissect | 50 +++++++++++++++++++++++++-------------------------
 1 file changed, 25 insertions(+), 25 deletions(-)

diff --git a/winetest/dissect b/winetest/dissect
index 797c204..304e9c9 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);
 




More information about the wine-cvs mailing list