Manifold testing scripts
[swift-upb.git] / mfold / doall
1 #!/bin/bash
2 # This script executes a chain of commands
3 # on all the member servers, in parallel.
4 # Commands are defined in .sh files (see
5 # docmd.sh); all failed executions are
6 # put to the FAILURES file
7 rm -f FAILURES
8
9 if [ -z "$SERVERS" ]; then
10     SERVERS="das2.txt"
11 fi
12 HOSTS=`cat $SERVERS | awk '{print $2}'`
13
14 for srv in $HOSTS; do
15     ( for cmd in $@; do
16         if ! ./docmd.sh $srv $cmd; then
17             echo $srv >> FAILURES
18             echo $src FAILED
19             break
20         fi
21     done ) &
22 done
23
24 wait
25 echo DONE