diff options
author | des <des@FreeBSD.org> | 2004-06-12 11:23:04 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2004-06-12 11:23:04 +0000 |
commit | 6e3a7b34cba131e25389007675c3fa180d4bf03e (patch) | |
tree | 95bbd8418a8d8ad82591d282dc985dd7c3cfd874 /tools | |
parent | 0d0a24e6ab6db1f5a15ee58dc11750382ec1a89e (diff) | |
download | FreeBSD-src-6e3a7b34cba131e25389007675c3fa180d4bf03e.zip FreeBSD-src-6e3a7b34cba131e25389007675c3fa180d4bf03e.tar.gz |
Group tinderbox results by config name. Skip configs whose names start
with "update_".
Diffstat (limited to 'tools')
-rw-r--r-- | tools/tools/tinderbox/www/index.cgi | 96 |
1 files changed, 54 insertions, 42 deletions
diff --git a/tools/tools/tinderbox/www/index.cgi b/tools/tools/tinderbox/www/index.cgi index 42bc73c..92f9de3 100644 --- a/tools/tools/tinderbox/www/index.cgi +++ b/tools/tools/tinderbox/www/index.cgi @@ -33,8 +33,7 @@ use 5.006_001; use strict; use POSIX qw(strftime); -my %BRANCHES; - +my %CONFIGS; my %ARCHES; my $DIR = "."; @@ -55,45 +54,13 @@ sub success($) { 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"); - } +sub do_config($) { + my $config = shift; - local *DIR; - opendir(DIR, $DIR) - or die("$DIR: $!\n"); - foreach (readdir(DIR)) { - next unless m/^tinderbox-(\w+)-(\w+)-(\w+)\.(brief|full)$/; - $BRANCHES{$1} = $ARCHES{$2}->{$3} = 1; - } - closedir(DIR); + my %branches = %{$CONFIGS{$config}}; - print "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?> -<!DOCTYPE html - PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" - \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"> -<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\"> - <head> - <title>FreeBSD tinderbox logs</title> - <meta name=\"robots\" content=\"nofollow\" /> - <meta http-equiv=\"refresh\" content=\"600\" /> - <link rel=\"stylesheet\" type=\"text/css\" media=\"screen\" href=\"tb.css\" /> - <link rel=\"shortcut icon\" type=\"image/png\" href=\"daemon.png\" /> - </head> - <body> - <h1>FreeBSD tinderbox logs</h1> - - <table border=\"1\" cellpadding=\"3\"> - <tr> - <th /> + print " <tr> + <th>$config</th> "; foreach my $arch (sort(keys(%ARCHES))) { foreach my $machine (sort(keys(%{$ARCHES{$arch}}))) { @@ -108,13 +75,13 @@ MAIN:{ my $now = time(); - foreach my $branch (sort(keys(%BRANCHES))) { + foreach my $branch (sort(keys(%branches))) { my $html = " <tr> <th>$branch</th> "; foreach my $arch (sort(keys(%ARCHES))) { foreach my $machine (sort(keys(%{$ARCHES{$arch}}))) { - my $log = "tinderbox-$branch-$arch-$machine"; + my $log = "tinderbox-$config-$branch-$arch-$machine"; my $links = ""; if (-f "$DIR/$log.brief") { my @stat = stat("$DIR/$log.brief"); @@ -148,8 +115,53 @@ MAIN:{ $html .= " </tr>\n"; print $html; } +} + +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+)-(\w+)\.(brief|full)$/; + $CONFIGS{$1}->{$2} = $ARCHES{$3}->{$4} = 1; + } + closedir(DIR); + + print "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?> +<!DOCTYPE html + PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" + \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"> +<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\"> + <head> + <title>FreeBSD tinderbox logs</title> + <meta name=\"robots\" content=\"nofollow\" /> + <meta http-equiv=\"refresh\" content=\"600\" /> + <link rel=\"stylesheet\" type=\"text/css\" media=\"screen\" href=\"tb.css\" /> + <link rel=\"shortcut icon\" type=\"image/png\" href=\"daemon.png\" /> + </head> + <body> + <h1>FreeBSD tinderbox logs</h1> + + <table border=\"1\" cellpadding=\"3\"> +"; + foreach my $config (sort(keys(%CONFIGS))) { + next if $config =~ m/^update_/; + do_config($config); + } my $date = strftime("%Y-%m-%d %H:%M UTC", gmtime()); - print " </table> + print " + </table> <p class=\"update\">Last updated: $date</p> <p> <a href=\"http://validator.w3.org/check/referer\"><img |