From 7ba995809cda7be56a19605149f617132191ddbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Sat, 12 Jun 2004 11:23:04 +0000 Subject: [PATCH] Group tinderbox results by config name. Skip configs whose names start with "update_". --- tools/tools/tinderbox/www/index.cgi | 96 ++++++++++++++++------------- 1 file changed, 54 insertions(+), 42 deletions(-) diff --git a/tools/tools/tinderbox/www/index.cgi b/tools/tools/tinderbox/www/index.cgi index 42bc73ca4532..92f9de3fbdd0 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 " - - - - FreeBSD tinderbox logs - - - - - - -

FreeBSD tinderbox logs

- - - - + "; 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 = " "; 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 .= " \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 " + + + + FreeBSD tinderbox logs + + + + + + +

FreeBSD tinderbox logs

+ +
+ print "
$config
$branch
+"; + 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 "
+ print " +

Last updated: $date