simplified and corrected test execution

This commit is contained in:
Nikos Mavrogiannopoulos
2014-04-01 18:35:01 +02:00
parent cbb7bb28c9
commit a3ecb5b91f
8 changed files with 7 additions and 13 deletions
-6
View File
@@ -41,8 +41,6 @@ fail() {
} }
launch_server() { launch_server() {
PARENT=$1;
shift;
$SERV $* >/dev/null 2>&1 & $SERV $* >/dev/null 2>&1 &
LOCALPID="$!"; LOCALPID="$!";
trap "[ ! -z \"${LOCALPID}\" ] && kill ${LOCALPID};" 15 trap "[ ! -z \"${LOCALPID}\" ] && kill ${LOCALPID};" 15
@@ -50,8 +48,6 @@ launch_server() {
LOCALRET="$?" LOCALRET="$?"
if [ "${LOCALRET}" != "0" ] && [ "${LOCALRET}" != "143" ] ; then if [ "${LOCALRET}" != "0" ] && [ "${LOCALRET}" != "143" ] ; then
# Houston, we'v got a problem... # Houston, we'v got a problem...
echo "Failed to launch the server !"
test -z "${PARENT}" || kill -10 ${PARENT}
exit 1 exit 1
fi fi
} }
@@ -64,8 +60,6 @@ launch_debug_server() {
LOCALRET="$?" LOCALRET="$?"
if [ "${LOCALRET}" != "0" ] && [ "${LOCALRET}" != "143" ] ; then if [ "${LOCALRET}" != "0" ] && [ "${LOCALRET}" != "143" ] ; then
# Houston, we'v got a problem... # Houston, we'v got a problem...
echo "Failed to launch the server !"
test -z "${PARENT}" || kill -10 ${PARENT}
exit 1 exit 1
fi fi
} }
+1 -1
View File
@@ -26,7 +26,7 @@ PORT=4446
echo "Testing ocserv with certificates... " 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 wait_server $PID
echo -n "Connecting to obtain cookie (without certificate)... " echo -n "Connecting to obtain cookie (without certificate)... "
+1 -1
View File
@@ -28,7 +28,7 @@ echo "Testing ocserv and user route application... "
rm -f ${srcdir}/test-iroute.tmp 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 wait_server $PID
echo -n "Connecting to obtain cookie (with certificate)... " echo -n "Connecting to obtain cookie (with certificate)... "
+1 -1
View File
@@ -27,7 +27,7 @@ PORT=4500
echo "Testing whether cookies are being re-used... " echo "Testing whether cookies are being re-used... "
rm -f ${srcdir}/pid1 ${srcdir}/pid2 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 wait_server $PID
echo "Connecting to obtain cookie... " echo "Connecting to obtain cookie... "
+1 -1
View File
@@ -26,7 +26,7 @@ PORT=4444
echo "Testing PAM backend with username-password... " 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 wait_server $PID
echo "Connecting to obtain cookie... " echo "Connecting to obtain cookie... "
+1 -1
View File
@@ -26,7 +26,7 @@ PORT=4444
echo "Testing local backend with username-password... " 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 wait_server $PID
echo "Connecting to obtain cookie... " echo "Connecting to obtain cookie... "
+1 -1
View File
@@ -26,7 +26,7 @@ PORT=4445
echo "Testing local backend with username-password and certificate... " 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 wait_server $PID
echo -n "Connecting to obtain cookie (without certificate)... " echo -n "Connecting to obtain cookie (without certificate)... "
+1 -1
View File
@@ -26,7 +26,7 @@ PORT=4448
echo "Testing local backend with username-password... " 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 wait_server $PID
echo "Connecting to obtain cookie with wrong username... " echo "Connecting to obtain cookie with wrong username... "