Module: tools
Branch: master
Commit: 82887dfa34ed1d8ee3653955afef82ac5c39a863
URL: https://source.winehq.org/git/tools.git/?a=commit;h=82887dfa34ed1d8ee365395…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Fri Mar 5 12:20:20 2021 +0100
testbot/LogUtils: Fix handling of subtest lines.
Add support for garbled subtest lines.
Let _CheckUnit() issue an error if they are misplaced. This also ensure
the error message contains all the necessary information, such as the
module …
[View More]name.
Take the subtest line into account even if it looks like it is
misplaced: the _CheckUnit() error is sufficient to indicate
something is wrong.
Tweak the _CheckUnit() message since subtest lines are not really
"messages".
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/lib/WineTestBot/LogUtils.pm | 19 +++++++------------
testbot/src/reporttest/report.testwtbs | 8 ++++----
2 files changed, 11 insertions(+), 16 deletions(-)
diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm
index 4e9b733..ed5dd74 100644
--- a/testbot/lib/WineTestBot/LogUtils.pm
+++ b/testbot/lib/WineTestBot/LogUtils.pm
@@ -381,7 +381,7 @@ sub _CheckUnit($$$$)
# Only report the first misplaced message to avoid duplicate errors.
if (!$Cur->{Units}->{$Unit} and $Cur->{Unit} ne "" and !$Cur->{IsBroken})
{
- _AddExtra($LogInfo, "contains a misplaced $Type message for $Unit", $Cur);
+ _AddExtra($LogInfo, "contains a misplaced $Type line for $Unit", $Cur);
$Cur->{IsBroken} = 1;
}
}
@@ -557,19 +557,14 @@ sub ParseWineTestReport($$$)
$Cur->{GroupLineNo} = $LineNo;
$Cur->{Group} = undef;
}
- elsif ($Line =~ /^([_.a-z0-9-]+)\.c:\d+: Subtest ([_.a-z0-9-]+)$/)
+ elsif (($Cur->{Unit} ne "" and
+ $Line =~ /($Cur->{UnitsRE})\.c:\d+: Subtest ([_a-z0-9]+)/) or
+ $Line =~ /^([_a-z0-9]+)\.c:\d+: Subtest ([_a-z0-9]+)/)
{
my ($Unit, $SubUnit) = ($1, $2);
- if ($Cur->{Units}->{$Unit})
- {
- $Cur->{Units}->{$SubUnit} = 1;
- $Cur->{UnitsRE} = join("|", keys %{$Cur->{Units}});
- }
- else
- {
- _AddExtra($LogInfo, "$Unit has a misplaced $SubUnit subtest line");
- }
- $LogInfo->{IsWineTest} = 1;
+ _CheckUnit($LogInfo, $Cur, $Unit, "$SubUnit subtest");
+ $Cur->{Units}->{$SubUnit} = 1;
+ $Cur->{UnitsRE} = join("|", keys %{$Cur->{Units}});
}
elsif (($Cur->{Unit} ne "" and
$Line =~ /($Cur->{UnitsRE})\.c:\d+: Test (?:failed|succeeded inside todo block): /) or
diff --git a/testbot/src/reporttest/report.testwtbs b/testbot/src/reporttest/report.testwtbs
index 27ca12f..eefbbc0 100644
--- a/testbot/src/reporttest/report.testwtbs
+++ b/testbot/src/reporttest/report.testwtbs
@@ -80,7 +80,7 @@ n 0 advapi32:registry has no test summary line (early exit of the main process?)
n 0 advapi32:service returned success despite having failures
n 0 amstream:amstream has unaccounted for failure messages
n 0 amstream:amstream returned success despite having failures
-n 0 atl:registrar contains a misplaced test summary message for alien
+n 0 atl:registrar contains a misplaced test summary line for alien
n 0 browseui:progressdlg has unaccounted for skip messages
n 0 cabinet:extract is missing some skip messages
n 0 cmd.exe:batch has unaccounted for todo messages
@@ -90,13 +90,13 @@ n 0 comctl32:dpa returned a non-zero exit code despite reporting no failures
n 0 comctl32:header returned success despite having failures
n 0 comctl32:ipaddress has no done line (or it is garbled)
n 0 comctl32:misc had no start line (or it is garbled)
-n 0 comctl32:monthcal contains a misplaced todo message for security
+n 0 comctl32:monthcal contains a misplaced todo line for security
n 0 comctl32:propsheet has no test summary line (early exit of the main process?)
n 0 comctl32:rebar returned success despite having failures
n 0 comctl32:toolbar has no done line (or it is garbled)
n 0 comctl32:treeview returned success despite having failures
-n 0 comctl32:updown contains a misplaced failure message for vorlon
-n 0 shadow has a misplaced black subtest line
+n 0 comctl32:updown contains a misplaced failure line for vorlon
+n 0 comdlg32:filedlg contains a misplaced black subtest line for shadow
n 0 xmllite:writer has unaccounted for failure messages
n 0 xmllite:writer returned success despite having failures
----- TestWTBS -----
[View Less]