From: Francois Gouget Subject: [21/25] testbot/JobDetails: Improve the error reporting. Message-Id: <300c72167af7dfeea9e9d8b2e77b5f79b5b6eece.1579000229.git.fgouget@codeweavers.com> Date: Tue, 14 Jan 2020 16:43:11 +0100 (CET) In-Reply-To: References: Clearly indicate when the log or its errors cache could not be read. Also show a note when new errors could not be detected, either because there is no reference WineTest results (which would typically happen shortly after a new test configuration has been added), or because there was an issue reading one or more of the reference reports. --- testbot/web/JobDetails.pl | 46 +++++++++++++++++++++++++++++++++++-- testbot/web/WineTestBot.css | 1 + 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/testbot/web/JobDetails.pl b/testbot/web/JobDetails.pl index eee8df2df..7fc90bf20 100644 --- a/testbot/web/JobDetails.pl +++ b/testbot/web/JobDetails.pl @@ -351,6 +351,22 @@ sub GenerateFullLog($$$$) my ($self, $Dir, $LogName, $HideLog) = @_; my $LogInfo = LoadLogErrors("$Dir/$LogName"); + if (defined $LogInfo->{BadLog}) + { + print "
Could not highlight new errors: ", ($LogInfo->{BadRef} || $LogInfo->{BadLog}), "
\n"; + } + elsif ($LogInfo->{NoRef} and !defined $LogInfo->{BadRef}) + { + print "
No WineTest results are available to detect new errors
\n"; + } + elsif ($LogInfo->{NoRef}) + { + print "
Could not detect new errors: $LogInfo->{BadRef}
\n"; + } + elsif (defined $LogInfo->{BadRef}) + { + print "
Some WineTest results could not be used to detect new errors: $LogInfo->{BadRef}
\n"; + } my %NewLineNos; if ($LogInfo->{ErrCount}) @@ -397,6 +413,11 @@ sub GenerateFullLog($$$$) } close($LogFile); } + else + { + print "
Unable to open '$LogName' for reading: $!
\n"; + $IsEmpty = 0; + } # And append the extra errors foreach my $GroupName (@{$LogInfo->{ErrGroupNames}}) @@ -535,8 +556,11 @@ EOF { next if ($LogName =~ /^old_/); my $LogInfo = LoadLogErrors("$TaskDir/$LogName"); - next if (!$LogInfo->{ErrCount}); - $LogInfos->{$LogName} = $LogInfo; + if ($LogInfo->{ErrCount} or + (defined $LogInfo->{BadLog} and !-z "$TaskDir/$LogName")) + { + $LogInfos->{$LogName} = $LogInfo; + } } my $ShowLogName = ($ReportCount > 1 or scalar(keys %$LogInfos) > 1); @@ -554,6 +578,24 @@ EOF } my $LogInfo = $LogInfos->{$LogName}; + if (defined $LogInfo->{BadLog}) + { + my ($_Action, $Url) = $self->GetMoreInfoLink($Key, GetLogLabel($LogName), "Full", $LogName); + print "
The error summary is not available (see full log instead): $LogInfo->{BadLog}
\n"; + } + elsif ($LogInfo->{NoRef} and !defined $LogInfo->{BadRef}) + { + print "
No WineTest results are available to detect new errors
\n"; + } + elsif ($LogInfo->{NoRef}) + { + print "
Could not detect new errors: $LogInfo->{BadRef}
\n"; + } + elsif (defined $LogInfo->{BadRef}) + { + print "
Some WineTest results could not be used to detect new errors: $LogInfo->{BadRef}
\n"; + } + foreach my $GroupName (@{$LogInfo->{ErrGroupNames}}) { print "
$GroupName
\n"; diff --git a/testbot/web/WineTestBot.css b/testbot/web/WineTestBot.css index 9a23f5fa8..3fccbd265 100644 --- a/testbot/web/WineTestBot.css +++ b/testbot/web/WineTestBot.css @@ -395,6 +395,7 @@ pre .userdisabled { color: red; } .userdeleted { color: red; } +.log-note { font-style: italic; color: blue; } .log-info { background-color: #d9ffcc; } .log-skip { color: blue; } .log-todo { color: #d08000; } -- 2.20.1