Module: tools Branch: master Commit: d7f66da4f6092ecb26ff40a3111a9208406f1f73 URL: https://gitlab.winehq.org/winehq/tools/-/commit/d7f66da4f6092ecb26ff40a3111a...
Author: Francois Gouget fgouget@codeweavers.com Date: Thu Nov 3 03:10:54 2022 +0100
testbot/LogUtils: Track the known new failures and warnings.
This adds a per-message-type KnownNew counter to the $LogInfo structure which allows callers to quickly discount the new but known failures and warnings.
---
testbot/lib/WineTestBot/LogUtils.pm | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm index c381906d..e4145628 100644 --- a/testbot/lib/WineTestBot/LogUtils.pm +++ b/testbot/lib/WineTestBot/LogUtils.pm @@ -1047,7 +1047,15 @@ sub LoadLogErrorsFromFh($$) } elsif ($Type eq "f") { - $LogInfo->{CurGroup}->{Failures}->{$Property} = [ split / /, $Value ]; + my $MsgIndex = $Property; + my $CurGroup = $LogInfo->{CurGroup}; + $CurGroup->{Failures}->{$Property} = [ split / /, $Value ]; + if ($CurGroup->{IsNew}->[$MsgIndex]) + { + my $Type = $CurGroup->{Types}->[$MsgIndex]; + $CurGroup->{"${Type}KnownNew"}++; + $LogInfo->{"${Type}KnownNew"}++; + } } else { @@ -1514,6 +1522,12 @@ sub MatchLogFailures($$)
my $LineFailures = $Group->{Failures}->{$MsgIndex} ||= []; push @$LineFailures, $UnitFailure->Id; + if ($Group->{IsNew}->[$MsgIndex]) + { + my $Type = $Group->{Types}->[$MsgIndex]; + $Group->{"${Type}KnownNew"}++; + $LogInfo->{"${Type}KnownNew"}++; + }
my $LogFailure = $LogFailures->{Failures}->{$UnitFailure->Id}; if (!$LogFailure)