Francois Gouget : winetest/dissect: Fix handling of subtest lines.
Alexandre Julliard
julliard at winehq.org
Fri Mar 5 15:28:28 CST 2021
Module: tools
Branch: master
Commit: 02548952b9b8001ed7e8154204651f7e64162e10
URL: https://source.winehq.org/git/tools.git/?a=commit;h=02548952b9b8001ed7e8154204651f7e64162e10
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Fri Mar 5 12:19:51 2021 +0100
winetest/dissect: Fix handling of subtest lines.
Add support for garbled subtest lines.
Link to the corresponding source line.
Call add_test_line() so they show up in the HTML-ized report.
Let check_unit() issue an error if they are misplaced.
Tweak the check_unit() message since subtest lines are not really
"messages".
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
winetest/dissect | 24 +++++++++++-------------
1 file changed, 11 insertions(+), 13 deletions(-)
diff --git a/winetest/dissect b/winetest/dissect
index 7f4f327..797c204 100755
--- a/winetest/dissect
+++ b/winetest/dissect
@@ -480,7 +480,7 @@ sub check_unit($$)
my ($l_unit, $l_type) = @_;
if (!$units{$l_unit} and !$broken)
{
- add_test_line("end", "Misplaced $l_type message");
+ add_test_line("end", "Misplaced $l_type line");
$extra_failures++;
$broken = 1;
}
@@ -609,19 +609,17 @@ while ($line = <IN>) {
$rc = 0;
}
}
- elsif ($line =~ /^([_.a-z0-9-]+)\.c:\d+: Subtest ([_.a-z0-9-]+)$/)
+ elsif (($unit ne "" and
+ $line =~ /^(.*?)($units_re)\.c:(\d+): (Subtest ([_.a-z0-9-]+).*)$/) or
+ $line =~ /^()([_a-z0-9]+)\.c:(\d+): (Subtest ([_.a-z0-9-]+).*)$/)
{
- my ($l_unit, $l_subunit) = ($1, $2);
- if ($units{$l_unit})
- {
- $units{$l_subunit} = 1;
- $units_re = join("|", keys %units);
- }
- else
- {
- add_test_line("end", "$l_unit has a misplaced $l_subunit subtest line\n");
- $extra_failures++;
- }
+ 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) .": ".
+ 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
More information about the wine-cvs
mailing list