This is necessary to be able to account for errors found in the "dll versions" block.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/lib/WineTestBot/LogUtils.pm | 60 +++++++++++++++-------------- 1 file changed, 32 insertions(+), 28 deletions(-)
diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm index 5f7046c13..dde4104b8 100644 --- a/testbot/lib/WineTestBot/LogUtils.pm +++ b/testbot/lib/WineTestBot/LogUtils.pm @@ -407,7 +407,7 @@ sub _CloseTestUnit($$$) my ($LogInfo, $Cur, $Last) = @_;
# Verify the summary lines - if (!$Cur->{IsBroken}) + if ($Cur->{Dll} ne "" and !$Cur->{IsBroken}) { _CheckSummaryCounter($LogInfo, $Cur, "Failures", "failure"); _CheckSummaryCounter($LogInfo, $Cur, "Todos", "todo"); @@ -418,37 +418,41 @@ sub _CloseTestUnit($$$) # so only use them as a fallback. $Cur->{LineFailures} ||= $Cur->{SummaryFailures};
- if ($Cur->{UnitSize} > $MaxUnitSize) + if ($Cur->{Dll} ne "") { - _AddExtra($LogInfo, "prints too much data ($Cur->{UnitSize} bytes)", $Cur); - } - if (!$Cur->{IsBroken} and defined $Cur->{Rc}) - { - # Check the exit code, particularly against failures reported - # after the 'done' line (e.g. by subprocesses). - if ($Cur->{LineFailures} != 0 and $Cur->{Rc} == 0) + if ($Cur->{UnitSize} > $MaxUnitSize) { - _AddExtra($LogInfo, "returned success despite having failures", $Cur); + _AddExtra($LogInfo, "prints too much data ($Cur->{UnitSize} bytes)", $Cur); } - elsif (!$LogInfo->{IsWineTest} and $Cur->{Rc} != 0) + if (!$Cur->{IsBroken} and defined $Cur->{Rc}) { - _AddExtra($LogInfo, "The test returned a non-zero exit code"); - } - elsif ($LogInfo->{IsWineTest} and $Cur->{LineFailures} == 0 and $Cur->{Rc} != 0) - { - _AddExtra($LogInfo, "returned a non-zero exit code despite reporting no failures", $Cur); - } - } - # For executables TestLauncher's done line may not be recognizable. - elsif ($LogInfo->{IsWineTest} and !defined $Cur->{Rc}) - { - if (!$Last) - { - _AddExtra($LogInfo, "has no done line (or it is garbled)", $Cur); + # Check the exit code, particularly against failures reported + # after the 'done' line (e.g. by subprocesses). + if ($Cur->{LineFailures} != 0 and $Cur->{Rc} == 0) + { + _AddExtra($LogInfo, "returned success despite having failures", $Cur); + } + elsif (!$LogInfo->{IsWineTest} and $Cur->{Rc} != 0) + { + _AddExtra($LogInfo, "The test returned a non-zero exit code"); + } + elsif ($LogInfo->{IsWineTest} and $Cur->{LineFailures} == 0 and + $Cur->{Rc} != 0) + { + _AddExtra($LogInfo, "returned a non-zero exit code despite reporting no failures", $Cur); + } } - elsif ($Last and !$LogInfo->{TaskTimedOut}) + # For executables TestLauncher's done line may not be recognizable. + elsif ($LogInfo->{IsWineTest} and !defined $Cur->{Rc}) { - _AddExtra($LogInfo, "The report seems to have been truncated"); + if (!$Last) + { + _AddExtra($LogInfo, "has no done line (or it is garbled)", $Cur); + } + elsif ($Last and !$LogInfo->{TaskTimedOut}) + { + _AddExtra($LogInfo, "The report seems to have been truncated"); + } } }
@@ -548,7 +552,7 @@ sub ParseWineTestReport($$$) my ($Dll, $Unit, $Type) = ($1, $2, $3);
# Close the previous test unit - _CloseTestUnit($LogInfo, $Cur, 0) if ($Cur->{Dll} ne ""); + _CloseTestUnit($LogInfo, $Cur, 0); $Cur = _NewCurrentUnit($Dll, $Unit); $LogInfo->{TestUnitCount}++;
@@ -689,7 +693,7 @@ sub ParseWineTestReport($$$) # First close the current test unit taking into account # it may have been polluted by the new one. $Cur->{IsBroken} = 1; - _CloseTestUnit($LogInfo, $Cur, 0) if ($Cur->{Dll} ne ""); + _CloseTestUnit($LogInfo, $Cur, 0);
# Then switch to the new test unit, not for the past lines, but for # those before the next 'start' line. This 'new' test unit may have
There should be no native dll while running the tests in Wine. Also all expected CreateProcess() errors have explanations. So report the others as failures. This also relaxes the GetReportLineCategory() regexps a bit to match the new 'version error' lines.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48062 Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/lib/WineTestBot/LogUtils.pm | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-)
diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm index dde4104b8..e6e89f556 100644 --- a/testbot/lib/WineTestBot/LogUtils.pm +++ b/testbot/lib/WineTestBot/LogUtils.pm @@ -325,8 +325,8 @@ sub GetReportLineCategory($) { return "skip"; } - if ($Line =~ /^ \w+=dll is (?:missing|native|a stub)/ or - $Line =~ /^ \w+=(?:load error|version error \d+|version not (?:found|present))$/ or + if ($Line =~ /^ \w+=dll is (?:missing|a stub)/ or + $Line =~ /^ \w+=(?:version error \d+|version not (?:found|present))/ or $Line =~ /^[_.a-z0-9-]+:[_a-z0-9]* start / or $Line =~ /: this is the last test seen before the exception/) { @@ -538,6 +538,7 @@ sub ParseWineTestReport($$$) }
my $LineNo = 0; + my $InDlls = 0; my $Cur = _NewCurrentUnit("", ""); foreach my $Line (<$LogFile>) { @@ -547,7 +548,21 @@ sub ParseWineTestReport($$$) chomp $Line; $Line =~ s/\r+$//;
- if ($Line =~ m%^([_.a-z0-9-]+):([_a-z0-9]*) (start|skipped) (?:-|[/_.a-z0-9-]+)%) + if ($InDlls == 0 and $Line =~ /^Dll info:$/) + { + $InDlls = 1; + } + elsif ($InDlls == 1 and + $Line =~ /^\s+\S+=(?:dll is native|load error \d+)$/) + { + _AddReportError($LogInfo, $Cur, $LineNo, $Line); + $Cur->{LineFailures}++; + } + elsif ($Line =~ /^Test output:$/) + { + $InDlls = 2; + } + elsif ($Line =~ m%^([_.a-z0-9-]+):([_a-z0-9]*) (start|skipped) (?:-|[/_.a-z0-9-]+)%) { my ($Dll, $Unit, $Type) = ($1, $2, $3);