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