Noddy driver for ease of repeatable runs

This commit is contained in:
Tony Garnock-Jones 2014-02-19 16:42:34 -05:00
parent 024b6b75cc
commit a50b9a594c
1 changed files with 16 additions and 0 deletions

16
drive.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/sh
racket new-server.rkt > drive-output.$(date '+%Y%m%d%H%M%S').txt 2>&1 &
serverpid=$!
echo "Serverpid is $serverpid"
while true
do
if netstat -an | grep -q '2322.*LISTEN'
then
break
fi
sleep 0.1
done
echo '(+ 1 2 3 4 5 6)' | ssh localhost -p 2322
sleep 1
kill -INT $serverpid
echo "Killed $serverpid"