Francois Gouget : testbot/web: Use .errors files to highlight errors in full logs.
Alexandre Julliard
julliard at winehq.org
Tue Mar 2 15:31:06 CST 2021
Module: tools
Branch: master
Commit: ced67f30c6e39dd3ec3e5452064889adeb68e9bd
URL: https://source.winehq.org/git/tools.git/?a=commit;h=ced67f30c6e39dd3ec3e5452064889adeb68e9bd
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Tue Mar 2 15:41:22 2021 +0100
testbot/web: Use .errors files to highlight errors in full logs.
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 at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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 7a4f4fc..8d4270a 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>~;
More information about the wine-cvs
mailing list