[tools] testbot/LogUtils: Always set IsWineTest in _CheckUnit().
Francois Gouget
fgouget at codeweavers.com
Mon Feb 1 05:58:32 CST 2021
_CheckUnit() is only called on Wine test lines.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
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 15ec31a42..2f3049344 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;
--
2.20.1
More information about the wine-devel
mailing list