3 cp ./testing/start _test
4 echo "Starting server on save file '_test' copied from ./testing/start."
5 python3 -m cProfile -o ./testing/cProfile roguelike-server -l _test &
7 echo "Waiting until ./server/in is ready for writing."
8 while [ ! -e ./server/in ]
13 echo "Catting ./testing/run into ./server/in."
14 cat ./testing/run >> server/in
16 echo "Waiting until server has quit (i.e. ./server/in has disappeared)."
17 while [ -e ./server/in ]
22 echo "Server has quit. Here's the diff of final '_test' to reference save file"
23 echo "./testing/ref_end (TEST WENT WELL IF NO LINES FOLLOW):"
24 mv _test testing/last_end
25 diff testing/last_end testing/ref_end