Alexandre Julliard : patches: Display the result of the testbot run for patches that have one.

Alexandre Julliard julliard at winehq.org
Tue Apr 27 11:37:57 CDT 2010


Module: tools
Branch: master
Commit: 5545f2c06b85c21a7a0cf9c7fad3821c23e698f9
URL:    http://source.winehq.org/git/tools.git/?a=commit;h=5545f2c06b85c21a7a0cf9c7fad3821c23e698f9

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Apr 27 11:31:41 2010 -0500

patches: Display the result of the testbot run for patches that have one.

---

 patches/index.cgi   |   23 +++++++++++++++++++++--
 patches/patches.css |    4 +++-
 2 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/patches/index.cgi b/patches/index.cgi
index 54da3ff..4c8ce49 100755
--- a/patches/index.cgi
+++ b/patches/index.cgi
@@ -97,7 +97,8 @@ print "<div class=\"main\">\n";
 print "<table class=\"main\"><tr><th class=\"id\">ID</th>",
     "<th class=\"status\">Status</th>",
     "<th class=\"author\">Author</th>",
-    "<th class=\"subject\">Subject</th></tr>\n";
+    "<th class=\"subject\">Subject</th>",
+    "<th class=\"status\">Testbot</th></tr>\n";
 
 opendir DIR, $dir;
 foreach my $file (readdir DIR)
@@ -127,6 +128,15 @@ foreach my $file (readdir DIR)
         $patch{"order"} = <ORDER>;
         close ORDER;
     }
+    $patch{"testbot"} = "";
+    if (-f "$dir/$file.testbot")
+    {
+        $patch{"testbot"} = "OK";
+    }
+    if (-f "$dir/$file.testfail")
+    {
+        $patch{"testbot"} = "Failed";
+    }
     $patches{$file} = \%patch;
 }
 closedir DIR;
@@ -138,8 +148,17 @@ foreach my $file (sort { $patches{$b}->{"order"} <=> $patches{$a}->{"order"} } k
     printf "<tr class=\"%s %s\"><td class=\"id\">%s</td><td class=\"status\"><a href=\"#legend\">%s</a></td><td class=\"author\">%s</td>",
            $row & 1 ? "odd" : "even", $patch->{"status"}, $file, $status_descr{$patch->{"status"}} || $patch->{"status"},
            escapeHTML($patch->{"author"});
-    printf "<td class=\"subject\"><a href=\"data/$file\">%s</a></td></tr>\n",
+    printf "<td class=\"subject\"><a href=\"data/$file\">%s</a></td>",
            escapeHTML($patch->{"subject"});
+    if ($patch->{"testbot"} eq "Failed")
+    {
+        print "<td class=\"testbot botfail\"><a href=\"data/$file.testfail\">Failed</a></td>";
+    }
+    else
+    {
+        printf "<td class=\"testbot\">%s</td>", $patch->{"testbot"};
+    }
+    print "</tr>\n";
     $row++;
 }
 print "</table></div>\n";
diff --git a/patches/patches.css b/patches/patches.css
index c763c98..b1224f5 100644
--- a/patches/patches.css
+++ b/patches/patches.css
@@ -41,12 +41,13 @@ table.legend ul { margin: 2px 0; }
 tr.even { background-color: #fff8f8; }
 tr.odd { background-color: #f8e8e8; }
 
-.id, .status { text-align: center; }
+.id, .status, .testbot { text-align: center; }
 .id, .status, .author { white-space: nowrap; padding: 0 3px; }
 
 .nil,        .nil :link,        .nil :visited        { color: blue; font-weight: bold; }
 .pending,    .pending :link,    .pending :visited    { color: blue; }
 .committed,  .committed :link,  .committed :visited  { color: green; }
+.testbot,    .testbot :link,    .testbot :visited    { color: green; }
 .depend,     .depend :link,     .depend :visited     { color: #e08000; }
 .superseded, .superseded :link, .superseded :visited { color: #e08000; }
 .testcase,   .testcase :link,   .testcase :visited   { color: #e08000; }
@@ -58,3 +59,4 @@ tr.odd { background-color: #f8e8e8; }
 .rejected,   .rejected :link,   .rejected :visited   { color: red; }
 .split,      .split :link,      .split :visited      { color: red; }
 .testfail,   .testfail :link,   .testfail :visited   { color: red; }
+.botfail,    .botfail :link,    .botfail :visited    { color: red; }




More information about the wine-cvs mailing list