Module: tools Branch: master Commit: 35dc4c4148b815d7fbcda4f724d79dc675fcac21 URL: https://source.winehq.org/git/tools.git/?a=commit;h=35dc4c4148b815d7fbcda4f7...
Author: Francois Gouget fgouget@codeweavers.com Date: Tue Jul 10 10:36:03 2018 +0200
testbot/web: Also detect and highlight the TestBot error messages.
This means calling GetHtmlLine() to highlight and escape the error messages.
Signed-off-by: Francois Gouget fgouget@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
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 bccf30d..98fe9cf 100644 --- a/testbot/lib/WineTestBot/LogUtils.pm +++ b/testbot/lib/WineTestBot/LogUtils.pm @@ -430,6 +430,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 532d76d..3a5b307 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)/) @@ -481,7 +481,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 0055ec0..ae20382 100644 --- a/testbot/web/WineTestBot.css +++ b/testbot/web/WineTestBot.css @@ -377,6 +377,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; }