Look for logs in the directory where we place the output.

This commit is contained in:
Dag-Erling Smørgrav 2003-07-18 07:43:43 +00:00
parent 90e476c26d
commit da60560610
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=117719

View File

@ -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>" .