Francois Gouget : testbot/LogUtils: Always set IsWineTest in _CheckUnit().
Alexandre Julliard
julliard at winehq.org
Mon Feb 1 16:11:51 CST 2021
Module: tools
Branch: master
Commit: c9aa4dbf830563f13b53a1c7561b89569cc92412
URL: https://source.winehq.org/git/tools.git/?a=commit;h=c9aa4dbf830563f13b53a1c7561b89569cc92412
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Mon Feb 1 12:58:32 2021 +0100
testbot/LogUtils: Always set IsWineTest in _CheckUnit().
_CheckUnit() is only called on Wine test lines.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
testbot/lib/WineTestBot/LogUtils.pm | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm
index 15ec31a..2f30493 100644
--- a/testbot/lib/WineTestBot/LogUtils.pm
+++ b/testbot/lib/WineTestBot/LogUtils.pm
@@ -384,13 +384,11 @@ sub _CheckUnit($$$$)
{
my ($LogInfo, $Cur, $Unit, $Type) = @_;
- if ($Cur->{Units}->{$Unit} or $Cur->{Unit} eq "")
- {
- $LogInfo->{IsWineTest} = 1;
- }
- # To avoid issuing many duplicate errors,
- # only report the first misplaced message.
- elsif ($LogInfo->{IsWineTest} and !$Cur->{IsBroken})
+ # _CheckUnit() is only called for Wine test lines.
+ $LogInfo->{IsWineTest} = 1;
+
+ # 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);
$Cur->{IsBroken} = 1;
More information about the wine-cvs
mailing list