From bbcbd93649d6eb630efc98864f7e829ecbb55b51 Mon Sep 17 00:00:00 2001 From: Dag-Erling Smørgrav Date: Sun, 23 Feb 2003 21:24:08 +0000 Subject: If more than one argument were given on the command line, interpret the additional arguments as a series of architectures to build. This is useful for running subsets of a particular configuration. --- tools/tools/tinderbox/tbmaster.pl | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'tools') diff --git a/tools/tools/tinderbox/tbmaster.pl b/tools/tools/tinderbox/tbmaster.pl index dab75fae9b7b..4282d0d25fb4 100644 --- a/tools/tools/tinderbox/tbmaster.pl +++ b/tools/tools/tinderbox/tbmaster.pl @@ -222,8 +222,8 @@ sub usage() { MAIN:{ usage() - unless (@ARGV == 1); - my $config = lc($ARGV[0]); + unless (@ARGV >= 1); + my $config = lc(shift(@ARGV)); usage() unless (exists($CONFIGS{$config}) && $config ne 'global'); %CONFIG = %{$CONFIGS{$config}}; @@ -244,10 +244,21 @@ MAIN:{ } foreach my $branch (sort(@{$CONFIG{'BRANCHES'}})) { - foreach my $arch (sort(keys(%{$CONFIG{'ARCHES'}}))) { - foreach my $machine (sort(@{$CONFIG{'ARCHES'}->{$arch}})) { + if (@ARGV) { + foreach my $target (@ARGV) { + $target =~ m|^(\w+)(?:/(\w+))?$| + or die("invalid target specification: $target\n"); + my ($arch, $machine) = ($1, $2); + $machine = $arch + unless defined($machine); tinderbox($branch, $arch, $machine); } + } else { + foreach my $arch (sort(keys(%{$CONFIG{'ARCHES'}}))) { + foreach my $machine (sort(@{$CONFIG{'ARCHES'}->{$arch}})) { + tinderbox($branch, $arch, $machine); + } + } } } } -- cgit v1.3