Module: tools Branch: master Commit: d3e1a150e41f19adc112ba10d62d9a18d83d8fb3 URL: https://source.winehq.org/git/tools.git/?a=commit;h=d3e1a150e41f19adc112ba10...
Author: Francois Gouget fgouget@codeweavers.com Date: Fri Nov 15 13:11:45 2019 +0100
winetest/dissect: Better deal with garbled result lines.
Part of the garbage may look like it is part of the dll or unit name, for instance 09d4comdlg32 or dd3d10core. So preferentially match lines using the current dll or unit name and only use regular matches to detect misplaced lines.
Signed-off-by: Francois Gouget fgouget@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
winetest/dissect | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-)
diff --git a/winetest/dissect b/winetest/dissect index 9ff65f8..6c6c594 100755 --- a/winetest/dissect +++ b/winetest/dissect @@ -628,9 +628,9 @@ while ($line = <IN>) { $extra_failures++; } } - elsif ($line =~ /^()([_a-z0-9]+).c:(\d+): (Test (?:failed|succeeded inside todo block): .*)$/ or - ($unit ne "" and - $line =~ /^(.*?)($units_re).c:(\d+): (Test (?:failed|succeeded inside todo block): .*)$/)) + 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): .*)$/) { my ($pollution, $l_unit, $l_num, $l_text) = ($1, $2, $3, $4); add_test_line("failed", escapeHTML($pollution) . @@ -639,9 +639,9 @@ while ($line = <IN>) { check_unit($l_unit, "failure"); $failures++; } - elsif ($line =~ /^()([_a-z0-9]+).c:(\d+): (Test marked todo: .*)$/ or - ($unit ne "" and - $line =~ /^(.*?)($units_re).c:(\d+): (Test marked todo: .*)$/)) + elsif (($unit ne "" and + $line =~ /^(.*?)($units_re).c:(\d+): (Test marked todo: .*)$/) or + $line =~ /^()([_a-z0-9]+).c:(\d+): (Test marked todo: .*)$/) { my ($pollution, $l_unit, $l_num, $l_text) = ($1, $2, $3, $4); add_test_line("todo", escapeHTML($pollution) . @@ -650,9 +650,9 @@ while ($line = <IN>) { check_unit($l_unit, "todo"); $todo++; } - elsif ($line =~ /^()([_a-z0-9]+).c:(\d+): (Tests skipped: .*)$/ or - ($unit ne "" and - $line =~ /^(.*?)($units_re).c:(\d+): (Tests skipped: .*)$/)) + elsif (($unit ne "" and + $line =~ /^(.*?)($units_re).c:(\d+): (Tests skipped: .*)$/) or + $line =~ /^()([_a-z0-9]+).c:(\d+): (Tests skipped: .*)$/) { my ($pollution, $l_unit, $l_num, $l_text) = ($1, $2, $3, $4); add_test_line("skipped", escapeHTML($pollution) . @@ -661,18 +661,18 @@ while ($line = <IN>) { # Don't complain and don't count misplaced skips $skipped++ if ($units{$l_unit}); } - elsif ($line =~ /^()([_a-z0-9]+).c:(\d+): (.*)$/ or - ($unit ne "" and - $line =~ /^(.*?)($units_re).c:(\d+): (.*)$/)) + elsif (($unit ne "" and + $line =~ /^(.*?)($units_re).c:(\d+): (.*)$/) or + $line =~ /^()([_a-z0-9]+).c:(\d+): (.*)$/) { 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) .": ". escapeHTML($l_text)); } - 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 /)) + 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 /) { 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 - ($unit ne "" and - $line =~ /([0-9a-f]+):($unit): (\d+) tests? executed ((\d+) marked as todo, (\d+) failures?), (\d+) skipped./)) + 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./) { 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 - ($dll ne "" and - $line =~ /(\Q$dll\E):([_a-z0-9]+):([0-9a-f]+) done ((-?\d+))(?:\r?$| in)/)) + elsif (($dll ne "" and + $line =~ /(\Q$dll\E):([_a-z0-9]+):([0-9a-f]+) done ((-?\d+))(?:\r?$| in)/) or + $line =~ /^([_.a-z0-9-]+):([_a-z0-9]+):([0-9a-f]+) done ((-?\d+))(?:\r?$| in)/) { my ($l_dll, $l_unit, $l_pid, $l_rc) = ($1, $2, $3, $4);