diff options
| author | John Wiegley <johnw@newartisans.com> | 2008-09-17 07:02:55 -0400 |
|---|---|---|
| committer | John Wiegley <johnw@newartisans.com> | 2008-09-17 07:02:55 -0400 |
| commit | 2c348fbed9494cb125580c4b2b35a0f7769e431f (patch) | |
| tree | 36e4301225ec0e259b041c7196372868da642b75 /runtests | |
| parent | 6a4c5b160ccf0d7f88e9bb576d7dea8890023f24 (diff) | |
Added 'runtests', to simplify running on multi-core machines.
Diffstat (limited to 'runtests')
| -rwxr-xr-x | runtests | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/runtests b/runtests new file mode 100755 index 0000000..e4b74df --- /dev/null +++ b/runtests @@ -0,0 +1,22 @@ +#!/bin/sh + +NCPU=2 + +COUNT=4209433 +GROUP=$((COUNT / NCPU)) + +begin=0 +end=$NCPU + +HERE=$(pwd) + +while (( begin < end )); do + dir=/tmp/chess-test$((begin)) + rm -fr $dir + mkdir $dir + rsync -a --delete --exclude='*/' ./ $dir/ + (cd $dir ; ln -s $HERE/doc $HERE/test .) + (cd $dir ; rm -f chess-test) + screen -dX screen $HERE/runtest.sh $dir $((begin * GROUP)) $((GROUP)) + begin=$((begin + 1)) +done |
