Module: tools Branch: master Commit: 3c3af6d9a26e9858bcaf6d8ca803576d02afe935 URL: https://gitlab.winehq.org/winehq/tools/-/commit/3c3af6d9a26e9858bcaf6d8ca803...
Author: Francois Gouget fgouget@codeweavers.com Date: Thu Sep 15 17:45:44 2022 +0200
testbot/TestWTBS: Check the old/new status of failures.
Originally this was not worth testing because the tests could not generate old failures. But with flaky they can.
---
testbot/tests/TestWTBS | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/testbot/tests/TestWTBS b/testbot/tests/TestWTBS index ef04d5ce..fd59da66 100755 --- a/testbot/tests/TestWTBS +++ b/testbot/tests/TestWTBS @@ -736,8 +736,17 @@ sub CheckLogErrors($$$$) my $SameCount = $Diff->Same(); if ($SameCount) { - $LogIndex += $SameCount; - $RefIndex += $SameCount; + foreach (1..$SameCount) + { + my $LogNewOld = $LogGroup->{IsNew}->[$LogIndex] ? "new" : "old"; + my $RefNewOld = $RefGroup->{IsNew}->[$RefIndex] ? "new" : "old"; + if ($LogNewOld ne $RefNewOld) + { + fail("expected this error to be $RefNewOld not $LogNewOld: $LogGroup->{Errors}->[$LogIndex]"); + } + $LogIndex++; + $RefIndex++; + } } else {