summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2003-10-09 02:30:34 +0000
committerdes <des@FreeBSD.org>2003-10-09 02:30:34 +0000
commitd01beebd5ad79bf1a977f280904a2135965e048e (patch)
tree44ca1791d0ea6aa50eb8fd5e218eae990e1009c2 /tools
parent5c1d84ac6893e035aecd932b43cea8d1cd73093d (diff)
downloadFreeBSD-src-d01beebd5ad79bf1a977f280904a2135965e048e.zip
FreeBSD-src-d01beebd5ad79bf1a977f280904a2135965e048e.tar.gz
Instead of using hardcoded column and row headers, scan the log directory
to see what's of interest.
Diffstat (limited to 'tools')
-rw-r--r--tools/tools/tinderbox/www/index.cgi30
1 files changed, 15 insertions, 15 deletions
diff --git a/tools/tools/tinderbox/www/index.cgi b/tools/tools/tinderbox/www/index.cgi
index 8aec343..5152ff3 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 "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>
<!DOCTYPE html
PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"
@@ -96,19 +96,19 @@ MAIN:{
<th>Architecture</th>
<th>Machine</th>
";
- foreach my $branch (@BRANCHES) {
+ foreach my $branch (sort(keys(%BRANCHES))) {
print(" <th>$branch</th>\n");
}
print " </tr>\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 = " <tr>
<td>$arch</td>
<td>$machine</td>
";
- foreach my $branch (@BRANCHES) {
+ foreach my $branch (sort(keys(%BRANCHES))) {
my $log = "tinderbox-$branch-$arch-$machine";
my $links = "";
if (-f "$DIR/$log.brief") {
OpenPOWER on IntegriCloud