From 981152552a343b681db73f7b89378bb32d2a533b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Thu, 9 Oct 2003 02:30:34 +0000 Subject: [PATCH] Instead of using hardcoded column and row headers, scan the log directory to see what's of interest. --- tools/tools/tinderbox/www/index.cgi | 30 ++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/tools/tools/tinderbox/www/index.cgi b/tools/tools/tinderbox/www/index.cgi index 8aec3435e60..5152ff3dcad 100644 --- a/tools/tools/tinderbox/www/index.cgi +++ b/tools/tools/tinderbox/www/index.cgi @@ -33,19 +33,9 @@ use 5.006_001; use strict; use POSIX qw(strftime); -my @BRANCHES = ( - 'RELENG_4', - 'CURRENT' -); +my %BRANCHES; -my %ARCHES = ( - 'alpha' => [ 'alpha' ], - 'amd64' => [ 'amd64' ], - 'i386' => [ 'i386', 'pc98' ], - 'ia64' => [ 'ia64' ], - 'powerpc' => [ 'powerpc' ], - 'sparc64' => [ 'sparc64' ], -); +my %ARCHES; my $DIR = "."; @@ -76,6 +66,16 @@ MAIN:{ 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 " Architecture Machine "; - foreach my $branch (@BRANCHES) { + foreach my $branch (sort(keys(%BRANCHES))) { print(" $branch\n"); } print " \n"; foreach my $arch (sort(keys(%ARCHES))) { - foreach my $machine (sort(@{$ARCHES{$arch}})) { + foreach my $machine (sort(keys(%{$ARCHES{$arch}}))) { my $have_logs = 0; my $html = " $arch $machine "; - foreach my $branch (@BRANCHES) { + foreach my $branch (sort(keys(%BRANCHES))) { my $log = "tinderbox-$branch-$arch-$machine"; my $links = ""; if (-f "$DIR/$log.brief") {