Alexandre Julliard : patches: Add a link to the testbot job id if available .
Alexandre Julliard
julliard at winehq.org
Fri Aug 30 10:58:54 CDT 2013
Module: tools
Branch: master
Commit: c0f93c48c30159c5b2359927e40dd0ee1d85a49c
URL: http://source.winehq.org/git/tools.git/?a=commit;h=c0f93c48c30159c5b2359927e40dd0ee1d85a49c
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Aug 29 17:13:55 2013 +0200
patches: Add a link to the testbot job id if available.
---
patches/update | 25 ++++++++++++++++++++++++-
1 files changed, 24 insertions(+), 1 deletions(-)
diff --git a/patches/update b/patches/update
index 52d4d88..4ccc910 100755
--- a/patches/update
+++ b/patches/update
@@ -115,7 +115,8 @@ print INDEX "<table class=\"main\"><tr><th class=\"id\">ID</th>",
"<th class=\"status\">Status</th>",
"<th class=\"author\">Author</th>",
"<th class=\"subject\">Subject</th>",
- "<th class=\"status\">Testbot</th></tr>\n";
+ "<th class=\"status\">Testbot</th>",
+ "<th class=\"status\">Job ID</th></tr>\n";
opendir DIR, $dir;
foreach my $file (readdir DIR)
@@ -146,9 +147,21 @@ foreach my $file (readdir DIR)
close ORDER;
}
$patch{"testbot"} = "";
+ $patch{"testjob"} = "";
+ $patch{"testurl"} = "";
if (-f "$dir/$file.testbot")
{
$patch{"testbot"} = "OK";
+ if (open LOG, "<$dir/$file.testbot")
+ {
+ while (<LOG>)
+ {
+ last if /^$/;
+ if (/^Job-ID: (.*)$/) { $patch{"testjob"} = $1; }
+ elsif (/^URL: (.*)$/) { $patch{"testurl"} = $1; }
+ }
+ close LOG;
+ }
}
if (-f "$dir/$file.testfail")
{
@@ -175,6 +188,16 @@ foreach my $file (sort { $patches{$b}->{"order"} <=> $patches{$a}->{"order"} } k
{
printf INDEX "<td class=\"testbot\">%s</td>", $patch->{"testbot"};
}
+ if ($patch->{"testjob"} && $patch->{"testurl"})
+ {
+ printf INDEX "<td class=\"%s\"><a href=\"%s\">%s</a></td>",
+ ($patch->{"testbot"} eq "Failed") ? " testbot botfail" : "testbot",
+ $patch->{"testurl"}, $patch->{"testjob"};
+ }
+ else
+ {
+ print INDEX "<td></td>";
+ }
print INDEX "</tr>\n";
$row++;
}
More information about the wine-cvs
mailing list