Index: head/tools/tools/tinderbox/www/index.cgi =================================================================== --- head/tools/tools/tinderbox/www/index.cgi (revision 120961) +++ head/tools/tools/tinderbox/www/index.cgi (revision 120962) @@ -1,159 +1,159 @@ #!/usr/bin/perl -Tw #- # Copyright (c) 2003 Dag-Erling Coïdan Smørgrav # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer # in this position and unchanged. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # 3. The name of the author may not be used to endorse or promote products # derived from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # $FreeBSD$ # use 5.006_001; use strict; use POSIX qw(strftime); my %BRANCHES; my %ARCHES; my $DIR = "."; sub success($) { my $log = shift; local *FILE; if (open(FILE, "<", $log)) { while () { if (m/tinderbox run completed/) { close(FILE); return 1; } } close(FILE); } return undef; } MAIN:{ if ($ENV{'GATEWAY_INTERFACE'}) { $| = 1; print "Content-Type: text/html\n\n"; } else { if ($0 =~ m|^(/[\w/._-]+)/[^/]+$|) { $DIR = $1; } open(STDOUT, ">", "$DIR/index.html") or die("index.html: $!\n"); } local *DIR; opendir(DIR, $DIR) or die("$DIR: $!\n"); foreach (readdir(DIR)) { next unless m/^tinderbox-(\w+)-(\w+)-(\w+)\./; $BRANCHES{$1} = $ARCHES{$2}->{$3} = 1; } closedir(DIR); print " FreeBSD tinderbox logs

FreeBSD tinderbox logs

"; foreach my $branch (sort(keys(%BRANCHES))) { print(" \n"); } print " \n"; foreach my $arch (sort(keys(%ARCHES))) { foreach my $machine (sort(keys(%{$ARCHES{$arch}}))) { my $have_logs = 0; my $html = " "; foreach my $branch (sort(keys(%BRANCHES))) { my $log = "tinderbox-$branch-$arch-$machine"; my $links = ""; if (-f "$DIR/$log.brief") { my @stat = stat("$DIR/$log.brief"); my $class = success("$DIR/$log.brief") ? "ok" : "fail"; $links .= "" . - strftime("%Y-%m-%d %H:%M", gmtime($stat[9])) . + strftime("%Y-%m-%d %H:%M UTC", gmtime($stat[9])) . "
"; my $size = sprintf("[%.1f kB]", $stat[7] / 1024); $links .= " " . "summary $size" . "
"; } if (-f "$DIR/$log.full") { my @stat = stat("$DIR/$log.full"); my $size = sprintf("[%.1f MB]", $stat[7] / 1048576); $links .= " " . "full log $size" . "
"; } if ($links eq "") { $html .= " \n"; } else { $html .= " \n"; $have_logs++; } } $html .= " \n"; print $html if $have_logs > 0; } } - my $date = strftime("%Y-%m-%d %H:%M GMT", gmtime()); + my $date = strftime("%Y-%m-%d %H:%M UTC", gmtime()); print "
Architecture Machine$branch
$arch $machinen/a$links

Last updated: $date

\"Valid \"Valid

"; exit(0); }