Instead of relying on Get*LineCategory() to identify error lines and only using the .errors information to single out new errors; JobDetails now uses the .errors file for both and only uses Get*LineCategory() to highlight warnings, informational messages, etc.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/web/JobDetails.pl | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-)
diff --git a/testbot/web/JobDetails.pl b/testbot/web/JobDetails.pl index 7a4f4fc35..8d4270af1 100644 --- a/testbot/web/JobDetails.pl +++ b/testbot/web/JobDetails.pl @@ -368,20 +368,16 @@ sub GenerateFullLog($$$$) print "<pre class='log-note'>Some WineTest results could not be used to detect new errors: $LogInfo->{BadRef}</pre>\n"; }
- my %NewLineNos; - if ($LogInfo->{ErrCount}) + my %ErrLineNos; + foreach my $GroupName (@{$LogInfo->{ErrGroupNames}}) { - foreach my $GroupName (@{$LogInfo->{ErrGroupNames}}) + my $Group = $LogInfo->{ErrGroups}->{$GroupName}; + my $ErrCount = @{$Group->{Errors}}; + next if (!$ErrCount); + for my $ErrIndex (0..$ErrCount-1) { - my $Group = $LogInfo->{ErrGroups}->{$GroupName}; - next if (!$Group->{NewCount}); - for my $ErrIndex (0..@{$Group->{Errors}} - 1) - { - if ($Group->{IsNew}->[$ErrIndex]) - { - $NewLineNos{$Group->{LineNos}->[$ErrIndex]} = 1; - } - } + $ErrLineNos{$Group->{LineNos}->[$ErrIndex]} = \ + $Group->{IsNew}->[$ErrIndex] ? "fullnew" : "error"; } }
@@ -404,7 +400,7 @@ sub GenerateFullLog($$$$) }
my $Html = $self->escapeHTML($Line); - my $Category = $NewLineNos{$LineNo} ? "fullnew" : $GetCategory->($Line); + my $Category = $ErrLineNos{$LineNo} || $GetCategory->($Line); if ($Category ne "none") { $Html =~ s~^(.*\S)\s*\r?$~<span class='log-$Category'>$1</span>~;