add option to capture stdout

This commit is contained in:
ading2210 2024-02-02 23:11:59 +00:00
parent bb9d9239c0
commit 3c517bbaf5
11 changed files with 64 additions and 20 deletions

View file

@ -4,8 +4,23 @@ set -e
trap "exit" INT TERM
trap "kill 0" EXIT
STATIC="$(pwd)" ../server/run.sh >/dev/null &
../server/run.sh --static=$(pwd) >/dev/null &
echo -n "waiting for wisp server to start"
i=0
until $(curl --output /dev/null --silent --head "http://localhost:6001/"); do
if [ "$i" = "30" ]; then
echo -e "\ntests failed. wisp server failed to start"
exit 1
fi
echo -n "."
i=$(($i+1))
sleep 1
done
echo
sleep 1
echo "Running tests"
echo "wisp server ready, running tests"
python3 tests/run_tests.py