From f7c9079e828980a889b408d4ab92a80e3c0819ca Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Fri, 22 May 2015 15:15:30 +0200 Subject: [PATCH] tests: use openconnect -b in full-test --- tests/full-test | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tests/full-test b/tests/full-test index 8f7d3586..1c05ce0b 100755 --- a/tests/full-test +++ b/tests/full-test @@ -71,13 +71,22 @@ fi echo "" echo "Connecting with correct username" $ECHO_E "test" >pass-full$TMP -$OPENCONNECT $IP:$PORT_OCSERV -u test --passwd-on-stdin -v --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 < pass-full$TMP & -PID=$! - +$OPENCONNECT $IP:$PORT_OCSERV -b --pid-file ${srcdir}/pid1.$$ -u test --passwd-on-stdin -v --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 < pass-full$TMP +if test $? != 0;then + echo "Cannot connect to server" + stop +fi #wait for openconnect sleep 5 + rm -f pass-full$TMP +if [ ! -f ${srcdir}/pid1.$$ ];then + echo "It was not possible to establish session!" + stop +fi + +PID=`cat ${srcdir}/pid1.$$` # The client IP depends on the username so it shouldn't change. ping -w 5 192.168.1.1