diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/tools/tinderbox/tbmaster.pl | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/tools/tools/tinderbox/tbmaster.pl b/tools/tools/tinderbox/tbmaster.pl index dab75fae..4282d0d 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); + } + } } } } |