home
·
contact
·
privacy
projects
/
plomrogue
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Minor tweaks to enhance cleaning up and responsibility of start scripts.
[plomrogue]
/
test_server.sh
diff --git
a/test_server.sh
b/test_server.sh
index d2cefbce6cd3314b76709af4b8566b5dcd9c774c..5a5b77eb253e15773edf31ba5d7b640d55e65a9c 100755
(executable)
--- a/
test_server.sh
+++ b/
test_server.sh
@@
-1,8
+1,11
@@
#!/bin/sh
#!/bin/sh
-./redo
-echo "Copying tested server script to ./tested_server.py."
+set -e
+
+./build.sh
+echo "Copying tested server to ./testing/tested_server.py and ./testing/server."
cp ./roguelike-server ./testing/tested_server.py
cp ./roguelike-server ./testing/tested_server.py
+cp -R ./server ./testing/
echo "Copying tested C library source to ./tested_server_lib.c."
cp ./libplomrogue.c ./testing/tested_server_lib.c
echo "Copying tested C library source to ./tested_server_lib.c."
cp ./libplomrogue.c ./testing/tested_server_lib.c
@@
-11,16
+14,16
@@
echo "Starting server on save file '_test' copied from ./testing/start."
python3 -m cProfile -o ./testing/cProfile roguelike-server -l _test &
echo "Waiting until ./server/in is ready for writing."
python3 -m cProfile -o ./testing/cProfile roguelike-server -l _test &
echo "Waiting until ./server/in is ready for writing."
-while [ ! -e ./server/in ]
+while [ ! -e ./server
_run
/in ]
do
sleep 0.1
done
echo "Catting ./testing/run into ./server/in."
do
sleep 0.1
done
echo "Catting ./testing/run into ./server/in."
-cat ./testing/run >> server/in
+cat ./testing/run >> server
_run
/in
echo "Waiting until server has quit (i.e. ./server/in has disappeared)."
echo "Waiting until server has quit (i.e. ./server/in has disappeared)."
-while [ -e ./server/in ]
+while [ -e ./server
_run
/in ]
do
sleep 1
done
do
sleep 1
done