VoxeLibre-Automated-Tests/dependency_paradise/test.sh

31 lines
520 B
Bash
Executable File

#!/bin/bash
set -e
MINETEST=../../../../bin/minetest
GAMEID=VoxeLibre
for I in $(seq 1 20); do
rm -f ./test.log || true
$MINETEST --server --config ./minetest.conf --world ./test-world --logfile ./test.log --gameid $GAMEID --go &
PID=$!
DONE=false
while ! $DONE; do
if grep ERROR ./test.log ; then
echo "[FAILED]"
exit 1
fi
if grep 'Server for gameid="VoxeLibre" listening on ' ./test.log; then
echo "DONE"
DONE=true
kill $PID
wait $PID
fi
sleep 1
done
done
echo "[PASSED]"
exit 0