]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Test framework improvment - Do not FAIL if t_client.rc is missing
authorDavid Sommerseth <dazo@users.sourceforge.net>
Wed, 18 Aug 2010 13:00:13 +0000 (15:00 +0200)
committerDavid Sommerseth <dazo@users.sourceforge.net>
Thu, 21 Oct 2010 09:40:36 +0000 (11:40 +0200)
This is to avoid 'make check' fail if this extra test case is not
configured.

Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
t_client.sh.in

index 664b2fdeb0874f4a6bf66546afb97a52bb897293..d3a4295629c00795ed7510d21d7253d688828afb 100755 (executable)
 # - for "ping6" checks: fping6 binary in $PATH
 #
 
+if [ -r ./t_client.rc ] ; then
+    . ./t_client.rc
+elif [ -r "${srcdir}"/t_client.rc ] ; then
+    . "${srcdir}"/t_client.rc
+else
+    echo "$0: cannot find 't_client.rc' in current directory or" >&2
+    echo "$0: source dir ('${srcdir}').  SKIPPING TEST." >&2
+    exit 77
+fi
+
 if [ ! -x ./openvpn ]
 then
     echo "no (executable) openvpn binary in current directory. FAIL." >&2
@@ -24,16 +34,6 @@ then
     exit 1
 fi
 
-if [ -r ./t_client.rc ] ; then
-    . ./t_client.rc
-elif [ -r "${srcdir}"/t_client.rc ] ; then
-    . "${srcdir}"/t_client.rc
-else
-    echo "cannot find 't_client.rc' in current directory or" >&2
-    echo "source dir ('${srcdir}').  FAIL." >&2
-    exit 1
-fi
-
 if [ -z "$CA_CERT" ] ; then
     echo "CA_CERT not defined in 't_client.rc'. SKIP test." >&2
     exit 0