From 8986c23dbfa231b6cc261d14e9f43cce7955ec6b Mon Sep 17 00:00:00 2001 From: shockrah Date: Mon, 10 Aug 2020 13:45:03 -0700 Subject: [PATCH] bash script now waits for the rust process to create its server response log before starting tests --- server/tests/main.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/server/tests/main.sh b/server/tests/main.sh index c790e9a..fc1f1e3 100644 --- a/server/tests/main.sh +++ b/server/tests/main.sh @@ -39,8 +39,16 @@ if [ "$1" = "body" ];then export _show_body=1 fi +# Waiting until the web server actuall finishes starting up +echo Waiting on server.log +while ! grep "Serving" ../server.log > /dev/null; do + sleep 1 +done + source ./common.sh export -f log_result + +echo ================================ echo TestName ExpectedCode ActualCode bash ./verify_basic_cases.sh @@ -48,3 +56,4 @@ bash ./verify_basic_cases.sh bash ./verify_err_cases.sh bash ./verify_mal_cases.sh +