Module: tools Branch: master Commit: a63fae570a64b4405921f4f7371ff7616fe35c7c URL: https://source.winehq.org/git/tools.git/?a=commit;h=a63fae570a64b4405921f4f7...
Author: Francois Gouget fgouget@codeweavers.com Date: Tue Apr 26 19:32:44 2022 +0200
testbot: Tweak the error groups iteration.
Signed-off-by: Francois Gouget fgouget@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
testbot/bin/WineSendLog.pl | 2 +- testbot/lib/WineTestBot/LogUtils.pm | 2 +- testbot/web/JobDetails.pl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/testbot/bin/WineSendLog.pl b/testbot/bin/WineSendLog.pl index 954edae..37949e4 100755 --- a/testbot/bin/WineSendLog.pl +++ b/testbot/bin/WineSendLog.pl @@ -350,7 +350,7 @@ EOF next if (!$Group->{NewCount});
push @Messages, ($GroupName ? "\n$GroupName:\n" : "\n"); - foreach my $ErrIndex (0..@{$Group->{Errors}} - 1) + foreach my $ErrIndex (0..$#{$Group->{Errors}}) { if ($Group->{IsNew}->[$ErrIndex]) { diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm index 0b2edf7..17cfc35 100644 --- a/testbot/lib/WineTestBot/LogUtils.pm +++ b/testbot/lib/WineTestBot/LogUtils.pm @@ -1052,7 +1052,7 @@ sub _WriteLogErrorsToFh($$) { my $Group = $LogInfo->{ErrGroups}->{$GroupName}; print $Fh "g $Group->{LineNo} $GroupName\n"; - foreach my $Index (0..@{$Group->{Errors}} - 1) + foreach my $Index (0..$#{$Group->{Errors}}) { my $IsNew = $Group->{IsNew}->[$Index] ? "n" : "o"; print $Fh "$IsNew $Group->{LineNos}->[$Index] $Group->{Errors}->[$Index]\n"; diff --git a/testbot/web/JobDetails.pl b/testbot/web/JobDetails.pl index 33a9525..c042663 100644 --- a/testbot/web/JobDetails.pl +++ b/testbot/web/JobDetails.pl @@ -513,7 +513,7 @@ sub GenerateFullLog($$$$) next if ($Group->{LineNo});
print "<div class='LogDllName'>$GroupName</div>\n"; - for my $ErrIndex (0..@{$Group->{Errors}} - 1) + for my $ErrIndex (0..$#{$Group->{Errors}}) { if ($IsEmpty) {