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

View File

@@ -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
}

View File

@@ -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)... "

View File

@@ -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)... "

View File

@@ -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... "

View File

@@ -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... "

View File

@@ -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... "

View File

@@ -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)... "

View File

@@ -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... "