diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2009-09-17T13·51+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2009-09-17T13·51+0000 |
commit | 57e0d73c776ef672afe2a20b1f7b39a495894c4a (patch) | |
tree | 0eb74731db41253aa65577202c60515d1378af7f /scripts | |
parent | 0dbd4638e07d224e642b52c1dd0468c3752e2479 (diff) |
* build-remote.pl: allow the system type to be a comma-separated list
of system types. Don't treat the x86_64-linux system type specially.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build-remote.pl.in | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/scripts/build-remote.pl.in b/scripts/build-remote.pl.in index 258272f7ba12..25dadb5de776 100755 --- a/scripts/build-remote.pl.in +++ b/scripts/build-remote.pl.in @@ -62,7 +62,7 @@ while (<CONF>) { /^\s*(\S+)\s+(\S+)\s+(\S+)\s+(\d+)\s*$/ or die; push @machines, { hostName => $1 - , systemType => $2 + , systemTypes => [split(/,/, $2)] , sshKeys => $3 , maxJobs => $4 }; @@ -82,16 +82,15 @@ my $rightType = 0; my $machine; my $slotLock; LOOP: foreach my $cur (@machines) { - if ($neededSystem eq $cur->{systemType} - || ($neededSystem eq "i686-linux" && $cur->{systemType} eq "x86_64-linux")) - { + print STDERR @{$cur->{systemTypes}}, "\n"; + if (grep { $neededSystem eq $_ } @{$cur->{systemTypes}}) { $rightType = 1; # We have a machine of the right type. Try to get a lock on # one of the machine's lock files. my $slot = 0; while ($slot < $cur->{maxJobs}) { - my $slotLockFn = "$currentLoad/" . $cur->{systemType} . "-" . $cur->{hostName} . "-$slot"; + my $slotLockFn = "$currentLoad/" . (join '+', @{$cur->{systemTypes}}) . "-" . $cur->{hostName} . "-$slot"; $slotLock = new IO::Handle; open $slotLock, ">>$slotLockFn" or die; if (flock($slotLock, LOCK_EX | LOCK_NB)) { |