report: provide logs of each stage
authorMans Rullgard <mans@mansr.com>
Sun, 25 Jul 2010 22:24:54 +0000 (23:24 +0100)
committerMans Rullgard <mans@mansr.com>
Sun, 25 Jul 2010 22:24:54 +0000 (23:24 +0100)
log.cgi [new file with mode: 0755]
report.cgi

diff --git a/log.cgi b/log.cgi
new file mode 100755 (executable)
index 0000000..912c558
--- /dev/null
+++ b/log.cgi
@@ -0,0 +1,27 @@
+#! /usr/bin/perl
+
+use strict;
+use warnings;
+
+use CGI qw/param/;
+
+our $fatedir;
+require "$ENV{FATEWEB_CONFIG}";
+
+my $req_slot = param 'slot';
+my $req_time = param 'time';
+my $req_log  = param 'log';
+
+my $repdir = "$fatedir/$req_slot/$req_time";
+my $log = "$repdir/$req_log.log";
+
+print "Content-type: text/plain\r\n";
+
+if (! -r $log) {
+    print "Status: 404 Not Found\r\n\r\n";
+    print "Invalid log requested\n";
+    exit;
+}
+
+print "\r\n";
+exec 'cat', $log;
index 075408e..14be36b 100755 (executable)
@@ -94,6 +94,17 @@ trow 'Configuration', $config;
 trow 'Revision',      $rev;
 trow 'Date',          $date;
 trow 'Status',        $err? $errstr : "$npass / $ntest";
+start 'tr';
+td 'Logs';
+start 'td';
+for my $log ('configure', 'compile', 'test') {
+    start 'a', href => "log.cgi?slot=$slot&amp;time=$date&amp;log=$log";
+    print $log;
+    end 'a';
+    print "\n";
+}
+end 'td';
+end 'tr';
 end;
 
 start 'table', id => 'tests';