4 echo "Copying tested server script to ./tested_server.py."
5 cp ./roguelike-server ./testing/tested_server.py
6 echo "Copying tested C library source to ./tested_server_lib.c."
7 cp ./libplomrogue.c ./testing/tested_server_lib.c
9 cp ./testing/start _test
10 echo "Starting server on save file '_test' copied from ./testing/start."
11 python3 -m cProfile -o ./testing/cProfile roguelike-server -l _test &
13 echo "Waiting until ./server/in is ready for writing."
14 while [ ! -e ./server/in ]
19 echo "Catting ./testing/run into ./server/in."
20 cat ./testing/run >> server/in
22 echo "Waiting until server has quit (i.e. ./server/in has disappeared)."
23 while [ -e ./server/in ]
28 echo "Server has quit. Here's the length of the diff of final '_test' (copy at"
29 echo "./testing/last_end) to the reference save file ./testing/ref_end (TEST WENT "
30 echo "WELL IF ZERO): "
31 mv _test testing/last_end
32 diff testing/last_end testing/ref_end | wc -l