From 8bde6a5ce14f3b5341d89c47ff76713fe42a914f Mon Sep 17 00:00:00 2001 From: des Date: Thu, 15 May 2003 08:36:26 +0000 Subject: [PATCH] These are the sources for the tinderbox summary page. --- tools/tools/tinderbox/www/index.cgi | 148 ++++++++++++++++++++ tools/tools/tinderbox/www/tb.css | 51 +++++++ tools/tools/tinderbox/www/valid-css.gif | Bin 0 -> 1547 bytes tools/tools/tinderbox/www/valid-xhtml10.png | Bin 0 -> 2414 bytes 4 files changed, 199 insertions(+) create mode 100644 tools/tools/tinderbox/www/index.cgi create mode 100644 tools/tools/tinderbox/www/tb.css create mode 100644 tools/tools/tinderbox/www/valid-css.gif create mode 100644 tools/tools/tinderbox/www/valid-xhtml10.png diff --git a/tools/tools/tinderbox/www/index.cgi b/tools/tools/tinderbox/www/index.cgi new file mode 100644 index 000000000000..a4065ce186a1 --- /dev/null +++ b/tools/tools/tinderbox/www/index.cgi @@ -0,0 +1,148 @@ +#!/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 strict; +use POSIX qw(strftime); + +my @BRANCHES = ( + 'RELENG_4', + 'CURRENT' +); + +my %ARCHES = ( + 'alpha' => [ 'alpha' ], + 'amd64' => [ 'amd64' ], + 'i386' => [ 'i386', 'pc98' ], + 'ia64' => [ 'ia64' ], + 'powerpc' => [ 'powerpc' ], + 'sparc64' => [ 'sparc64' ], +); + +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 { + open(STDOUT, ">", "index.html") + or die("index.html: $!\n"); + } + print " + + + + FreeBSD tinderbox logs + + + + + +

FreeBSD tinderbox logs

+ + + + + +"; + foreach my $branch (@BRANCHES) { + print(" \n"); + } + print " \n"; + + foreach my $arch (sort(keys(%ARCHES))) { + foreach my $machine (sort(@{$ARCHES{$arch}})) { + print " + + +"; + 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"; + $links .= "" . + strftime("%Y-%m-%d %H:%M", gmtime($stat[9])) . + "
"; + my $size = sprintf("[%.1f kB]", $stat[7] / 1024); + $links .= " " . + "summary $size" . + "
"; + } + if (-f "$log.full") { + my @stat = stat("$log.full"); + my $size = sprintf("[%.1f MB]", $stat[7] / 1048576); + $links .= " " . + "full log $size" . + "
"; + } + if ($links eq "") { + print(" \n"); + } else { + print(" \n"); + } + } + print " \n"; + } + } + my $date = strftime("%Y-%m-%d %H:%M GMT", gmtime()); + print "
ArchitectureMachine$branch
$arch$machinen/a$links
+

Last updated: $date

+

+ \"Valid + \"Valid +

+ + +"; + exit(0); +} diff --git a/tools/tools/tinderbox/www/tb.css b/tools/tools/tinderbox/www/tb.css new file mode 100644 index 000000000000..af39e7d4c837 --- /dev/null +++ b/tools/tools/tinderbox/www/tb.css @@ -0,0 +1,51 @@ +// $FreeBSD$ + +BODY, H1, H2, H3, H4, H5, H6, LI { + font-family: Helvetica, sans-serif; + font-style: normal; + background-color: white; + color: navy; +} + +A:link { + background-color: white; + color: blue; +} + +A:visited { + background-color: white; + color: gray; +} + +A:active { + background-color: white; + color: red; +} + +.tiny { + font-size: x-small; +} + +.update { + font-style: italic; +} + +.ok { + background-color: white; + color: green; +} + +.fail { + background-color: white; + color: red; +} + +TD, TH { + width: 16ex; + text-align: center; + vertical-align: middle; +} + +IMG { + border: none; +} diff --git a/tools/tools/tinderbox/www/valid-css.gif b/tools/tools/tinderbox/www/valid-css.gif new file mode 100644 index 0000000000000000000000000000000000000000..020c75a73a8e73243d762f000ab6e47c24f2418a GIT binary patch literal 1547 zcmd7R`#;lr9Ki9*?w3;lv0J2Bx4B zfYsI2IB^%wQ|b^=9eA;6X#CyG%nXOasjjY;N~Nu>t#zv5;=2Pml~3q&Iso9(rArhF zW#-+I`TkPnqw$Q43>*$;P}Jwnt!FZsF&DC9 zV`F=Jdslm-j+JzRCoK67CH z5di}r0erbM`0^ouUg1&sf~4e>%c;V&E9uDzSy@z&E6%%mEnh+_D3tzEBrBGAdf14v zCFK?6@~Y|@+OMTIb1LuLscmekE4i7_a95fCTYJ^5Rz=&x+>XAYuKFG|=zmu5SkwT6 z;9>-X$U{P7Z^m*_Xfy_3wZzY#Y07~17%~?(A=Vjx^9n^_k}>8G;{5#ezR&JLiol!r zV9T6U7=+Y%iS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