[tools] testbot/LogUtils: Fix handling of new test units with no start line.

Francois Gouget fgouget at codeweavers.com
Thu Jan 28 23:20:01 CST 2021


Create a real new test unit object so $Cur->{LineFailures} is not 
counted multiple times.
This matches the winetest parser behavior.
Improve the documentation.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---

This fixes the failure count reported in this wtbsuite test:
WTBS A test unit with no start line (browseui:progressdlg).

 testbot/lib/WineTestBot/LogUtils.pm | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm
index 1b4ee7a28..15ec31a42 100644
--- a/testbot/lib/WineTestBot/LogUtils.pm
+++ b/testbot/lib/WineTestBot/LogUtils.pm
@@ -675,11 +675,14 @@ sub ParseWineTestReport($$$)
         $Cur->{IsBroken} = 1;
         _CloseTestUnit($LogInfo, $Cur, 0);
 
-        # Then switch to the new one, warning it's missing a start line,
-        # and that its results may be inconsistent.
-        ($Cur->{Dll}, $Cur->{Unit}) = ($Dll, $Unit);
-        _AddExtra($LogInfo, "had no start line (or it is garbled)", $Cur);
+        # 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
+        # inconsistent results too so set IsBroken.
+        $Cur = _NewCurrentUnit($Dll, $Unit);
         $Cur->{IsBroken} = 1;
+
+        # Finally, warn about the missing start line.
+        _AddExtra($LogInfo, "had no start line (or it is garbled)", $Cur);
       }
 
       if ($Rc == 258)
-- 
2.20.1



More information about the wine-devel mailing list