Module: tools Branch: master Commit: dd8daec9a43e46d4c25a438bd29d76285cf27f13 URL: https://gitlab.winehq.org/winehq/tools/-/commit/dd8daec9a43e46d4c25a438bd29d...
Author: Francois Gouget fgouget@codeweavers.com Date: Wed Sep 14 11:56:58 2022 +0200
testbot: Allow known regular failures to match flaky failures too.
This ensures a smooth transition when a failure is marked as flaky.
---
testbot/lib/WineTestBot/LogUtils.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm index 56129e10..585b1d04 100644 --- a/testbot/lib/WineTestBot/LogUtils.pm +++ b/testbot/lib/WineTestBot/LogUtils.pm @@ -1491,12 +1491,17 @@ sub MatchLogFailures($$) my $UnitFailures = $FailureTree{$GroupName}->{$TestUnit}; next if (!$UnitFailures);
+ # Allow regular expressions written for regular failures to still match + # when the test has been marked as flaky to ensure a smooth transition. + my $NonFlakyLine = $Line; + $NonFlakyLine =~ s/Test succeeded inside flaky todo block:/Test succeeded inside todo block:/g; + $NonFlakyLine =~ s/Test marked flaky:/Test failed:/g; foreach my $UnitFailure (@$UnitFailures) { my $RegExp = $UnitFailure->FailureRegExp; my $Match = eval { use warnings FATAL => qw(regexp); - $RegExp and $Line =~ /$RegExp/; + $RegExp and ($Line =~ /$RegExp/ or $NonFlakyLine =~ /$RegExp/); }; next if (!$Match);