Fix the 6ec3ca4 fix: a late slave didn't get correct komi.
[pachi.git] / t-play / autotest / autotest-client
bloba71d2de53ee5286a07f0026aed7592f96ba43919
1 #!/bin/sh
2 # This is autotest Go-testing framework client. It runs on client
3 # machines and spawns autotest-worker, which picks a random pairing
4 # among the ones defined in the rc file, and plays a single game.
6 clientid="$1"; shift
7 if [ -z "$clientid" ]; then
8 echo "Usage: $0 <clientid>" >&2
9 echo "At any time, only single client with the same client may run!" >&2
10 echo "You can use e.g. clientid \`hostname\`-1, increment 1 for" >&2
11 echo "further threads started on the host." >&2
12 exit 1
14 . ./autotest-lib
16 mkdir -p "c/$clientid"
17 log "started client ($clientid)"
19 while true; do
20 mkdir -p "c/$clientid"
21 date +%s >"c/$clientid/beacon"
22 if ! ./autotest-worker "$clientid"; then
23 echo "*** WORKER FAILED ***"
24 log "worker failed with error code $?"
25 sleep 1
27 done