Francois Gouget : testbot/web: Tweak GenerateFullLog() in the job details page.
Module: tools Branch: master Commit: c6f40dd1d94cb832674f4e4f94f102a4748c691f URL: https://source.winehq.org/git/tools.git/?a=commit;h=c6f40dd1d94cb832674f4e4f... Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Tue Jun 14 15:59:45 2022 +0200 testbot/web: Tweak GenerateFullLog() in the job details page. Rename %ErrLineNos to %ErrCategory since it contains the error's category indexed by the full log line number. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- testbot/web/JobDetails.pl | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/testbot/web/JobDetails.pl b/testbot/web/JobDetails.pl index 36bba0d0..7860a4c9 100644 --- a/testbot/web/JobDetails.pl +++ b/testbot/web/JobDetails.pl @@ -400,16 +400,14 @@ sub GenerateFullLog($$$$) print "<pre class='log-note'>Some WineTest results could not be used to detect new errors: $LogInfo->{BadRef}</pre>\n"; } - my %ErrLineNos; + my %ErrCategory; foreach my $GroupName (@{$LogInfo->{ErrGroupNames}}) { my $Group = $LogInfo->{ErrGroups}->{$GroupName}; - my $ErrCount = @{$Group->{Errors}}; - next if (!$ErrCount); - for my $ErrIndex (0..$ErrCount-1) + for my $ErrIndex (0..$#{$Group->{Errors}}) { - $ErrLineNos{$Group->{LineNos}->[$ErrIndex]} = \ - $Group->{IsNew}->[$ErrIndex] ? "fullnew" : "error"; + my $LineNo = $Group->{LineNos}->[$ErrIndex]; + $ErrCategory{$LineNo} = $Group->{IsNew}->[$ErrIndex] ? "fullnew" : "error"; } } @@ -432,7 +430,7 @@ sub GenerateFullLog($$$$) } my $Html = $self->escapeHTML($Line); - my $Category = $ErrLineNos{$LineNo} || $GetCategory->($Line); + my $Category = $ErrCategory{$LineNo} || $GetCategory->($Line); if ($Category ne "none") { $Html =~ s~^(.*\S)\s*\r?$~<span class='log-$Category'>$1</span>~;
participants (1)
-
Alexandre Julliard