4 cp ./roguelike-server ./testing/tested_server
5 cp ./src/server/libplomrogue.c ./testing/tested_server_lib.c
7 cp ./testing/start _test
8 echo "Starting server on save file '_test' copied from ./testing/start."
9 python3 -m cProfile -o ./testing/cProfile roguelike-server -l _test &
11 echo "Waiting until ./server/in is ready for writing."
12 while [ ! -e ./server/in ]
17 echo "Catting ./testing/run into ./server/in."
18 cat ./testing/run >> server/in
20 echo "Waiting until server has quit (i.e. ./server/in has disappeared)."
21 while [ -e ./server/in ]
26 echo "Server has quit. Here's the diff of final '_test' to reference save file"
27 echo "./testing/ref_end (TEST WENT WELL IF NO LINES FOLLOW):"
28 mv _test testing/last_end
29 diff testing/last_end testing/ref_end