diff --git a/tests/common.sh b/tests/common.sh index 17fa26bb..867adc59 100644 --- a/tests/common.sh +++ b/tests/common.sh @@ -41,8 +41,6 @@ fail() { } launch_server() { - PARENT=$1; - shift; $SERV $* >/dev/null 2>&1 & LOCALPID="$!"; trap "[ ! -z \"${LOCALPID}\" ] && kill ${LOCALPID};" 15 @@ -50,8 +48,6 @@ launch_server() { LOCALRET="$?" if [ "${LOCALRET}" != "0" ] && [ "${LOCALRET}" != "143" ] ; then # Houston, we'v got a problem... - echo "Failed to launch the server !" - test -z "${PARENT}" || kill -10 ${PARENT} exit 1 fi } @@ -64,8 +60,6 @@ launch_debug_server() { LOCALRET="$?" if [ "${LOCALRET}" != "0" ] && [ "${LOCALRET}" != "143" ] ; then # Houston, we'v got a problem... - echo "Failed to launch the server !" - test -z "${PARENT}" || kill -10 ${PARENT} exit 1 fi } diff --git a/tests/test-cert b/tests/test-cert index 8af74e02..92334412 100755 --- a/tests/test-cert +++ b/tests/test-cert @@ -26,7 +26,7 @@ PORT=4446 echo "Testing ocserv with certificates... " -launch_server -d -f -c test3.config & PID=$! +launch_server -d 1 -f -c test3.config & PID=$! wait_server $PID echo -n "Connecting to obtain cookie (without certificate)... " diff --git a/tests/test-iroute b/tests/test-iroute index 5317c6f3..8df70d9a 100755 --- a/tests/test-iroute +++ b/tests/test-iroute @@ -28,7 +28,7 @@ echo "Testing ocserv and user route application... " rm -f ${srcdir}/test-iroute.tmp -launch_server -d -f -c ${srcdir}/test-iroute.config & PID=$! +launch_server -d 1 -f -c ${srcdir}/test-iroute.config & PID=$! wait_server $PID echo -n "Connecting to obtain cookie (with certificate)... " diff --git a/tests/test-multi-cookie b/tests/test-multi-cookie index 6c5fdca6..c3c449d3 100755 --- a/tests/test-multi-cookie +++ b/tests/test-multi-cookie @@ -27,7 +27,7 @@ PORT=4500 echo "Testing whether cookies are being re-used... " rm -f ${srcdir}/pid1 ${srcdir}/pid2 -launch_server -d -f -c ${srcdir}/test-multi-cookie.config & PID=$! +launch_server -d 1 -f -c ${srcdir}/test-multi-cookie.config & PID=$! wait_server $PID echo "Connecting to obtain cookie... " diff --git a/tests/test-pam b/tests/test-pam index 6c112001..eb11661e 100755 --- a/tests/test-pam +++ b/tests/test-pam @@ -26,7 +26,7 @@ PORT=4444 echo "Testing PAM backend with username-password... " -launch_server -d -f -c test-pam.config & PID=$! +launch_server -d 1 -f -c test-pam.config & PID=$! wait_server $PID echo "Connecting to obtain cookie... " diff --git a/tests/test-pass b/tests/test-pass index 789d0ce0..e04006bb 100755 --- a/tests/test-pass +++ b/tests/test-pass @@ -26,7 +26,7 @@ PORT=4444 echo "Testing local backend with username-password... " -launch_server -d -f -c test1.config & PID=$! +launch_server -d 1 -f -c test1.config & PID=$! wait_server $PID echo "Connecting to obtain cookie... " diff --git a/tests/test-pass-cert b/tests/test-pass-cert index edd8bfce..02c45ec7 100755 --- a/tests/test-pass-cert +++ b/tests/test-pass-cert @@ -26,7 +26,7 @@ PORT=4445 echo "Testing local backend with username-password and certificate... " -launch_server -d -f -c test-user-cert.config & PID=$! +launch_server -d 1 -f -c test-user-cert.config & PID=$! wait_server $PID echo -n "Connecting to obtain cookie (without certificate)... " diff --git a/tests/test-pass-script b/tests/test-pass-script index 63511e5b..80d591ec 100755 --- a/tests/test-pass-script +++ b/tests/test-pass-script @@ -26,7 +26,7 @@ PORT=4448 echo "Testing local backend with username-password... " -launch_server -d -f -c test-pass-script.config & PID=$! +launch_server -d 1 -f -c test-pass-script.config & PID=$! wait_server $PID echo "Connecting to obtain cookie with wrong username... "