[PATCH] testbot/web: Also detect and highlight the TestBot error messages.
Francois Gouget
fgouget at codeweavers.com
Tue Jul 10 03:36:03 CDT 2018
This means calling GetHtmlLine() to highlight and escape the error
messages.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
testbot/lib/WineTestBot/LogUtils.pm | 4 ++++
testbot/web/JobDetails.pl | 4 ++--
testbot/web/WineTestBot.css | 1 +
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm
index e18ad3242..0ef9609e7 100644
--- a/testbot/lib/WineTestBot/LogUtils.pm
+++ b/testbot/lib/WineTestBot/LogUtils.pm
@@ -431,6 +431,10 @@ sub GetLogLineCategory($)
{
return "error";
}
+ if ($Line =~ /^BotError:/)
+ {
+ return "boterror";
+ }
if ($Line =~ /^\+ \S/ or
$Line =~ /^[_.a-z0-9-]+:[_a-z0-9]* start / or
# Build messages
diff --git a/testbot/web/JobDetails.pl b/testbot/web/JobDetails.pl
index e7e53d208..54e8b7ff1 100644
--- a/testbot/web/JobDetails.pl
+++ b/testbot/web/JobDetails.pl
@@ -250,7 +250,7 @@ sub GetHtmlLine($$$)
my ($self, $FullLog, $Line) = @_;
my $Category = GetLogLineCategory($Line);
- return undef if ($Category ne "error" and !$FullLog);
+ return undef if ($Category !~ /error/ and !$FullLog);
my $Html = $self->escapeHTML($Line);
if (!$FullLog and $Html =~ m/^[^:]+:([^:]*)(?::[0-9a-f]+)? done \(258\)/)
@@ -477,7 +477,7 @@ sub GenerateBody($)
print "<pre><code>";
$ErrFirst = 0;
}
- print $self->escapeHTML($Line), "\n";
+ print $self->GetHtmlLine(1, $Line), "\n";
}
close($ErrFile);
diff --git a/testbot/web/WineTestBot.css b/testbot/web/WineTestBot.css
index 593c38f44..adbfa749e 100644
--- a/testbot/web/WineTestBot.css
+++ b/testbot/web/WineTestBot.css
@@ -371,6 +371,7 @@ pre
.log-skip { color: blue; }
.log-todo { color: #d08000; }
.log-error { color: red; }
+.log-boterror { color: #cc0052; }
a.title { color:inherit; text-decoration: none; }
--
2.18.0
More information about the wine-devel
mailing list