summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2003-07-18 07:43:43 +0000
committerdes <des@FreeBSD.org>2003-07-18 07:43:43 +0000
commit6942d1e7e628d02314068a79db4800a8b539cf3b (patch)
treee328a3a74c4090ea40b16f337f14a733449e37e3
parent76be06b592a873bdc5151777e955c4a870145af8 (diff)
downloadFreeBSD-src-6942d1e7e628d02314068a79db4800a8b539cf3b.zip
FreeBSD-src-6942d1e7e628d02314068a79db4800a8b539cf3b.tar.gz
Look for logs in the directory where we place the output.
-rw-r--r--tools/tools/tinderbox/www/index.cgi17
1 files changed, 9 insertions, 8 deletions
diff --git a/tools/tools/tinderbox/www/index.cgi b/tools/tools/tinderbox/www/index.cgi
index 86346aa..6f1e38c 100644
--- a/tools/tools/tinderbox/www/index.cgi
+++ b/tools/tools/tinderbox/www/index.cgi
@@ -47,6 +47,8 @@ my %ARCHES = (
'sparc64' => [ 'sparc64' ],
);
+my $DIR = ".";
+
sub success($) {
my $log = shift;
@@ -68,11 +70,10 @@ MAIN:{
$| = 1;
print "Content-Type: text/html\n\n";
} else {
- my $fn = "index.html";
if ($0 =~ m|^(/[\w/._-]+)/[^/]+$|) {
- $fn = "$1/$fn";
+ $DIR = $1;
}
- open(STDOUT, ">", $fn)
+ open(STDOUT, ">", "$DIR/index.html")
or die("index.html: $!\n");
}
print "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>
@@ -109,9 +110,9 @@ MAIN:{
foreach my $branch (@BRANCHES) {
my $log = "tinderbox-$branch-$arch-$machine";
my $links = "";
- if (-f "$log.brief") {
- my @stat = stat("$log.brief");
- my $class = success("$log.brief") ? "ok" : "fail";
+ if (-f "$DIR/$log.brief") {
+ my @stat = stat("$DIR/$log.brief");
+ my $class = success("$DIR/$log.brief") ? "ok" : "fail";
$links .= "<span class=\"$class\">" .
strftime("%Y-%m-%d&nbsp;%H:%M", gmtime($stat[9])) .
"</span><br />";
@@ -120,8 +121,8 @@ MAIN:{
"<a href=\"$log.brief\">summary&nbsp;$size</a>" .
"</span><br />";
}
- if (-f "$log.full") {
- my @stat = stat("$log.full");
+ if (-f "$DIR/$log.full") {
+ my @stat = stat("$DIR/$log.full");
my $size = sprintf("[%.1f&nbsp;MB]", $stat[7] / 1048576);
$links .= " <span class=\"tiny\">" .
"<a href=\"$log.full\">full&nbsp;log&nbsp;$size</a>" .
OpenPOWER on IntegriCloud