summaryrefslogtreecommitdiff
path: root/openvpn/tests
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-06-02 15:45:11 +0200
committerArne Schwabe <arne@rfc2549.org>2012-06-02 15:45:11 +0200
commitec2008e9e53b99ba1725d8398e21b9cb04f6b8ca (patch)
tree8498bf1722b27ae47a5cec27c7f6cf5ecb868bb3 /openvpn/tests
parentb84e3939a015b42c316af0b63297932e6fcf8ba4 (diff)
bring openvpn in sync with openvpn git master and patches submitted to mailing list
Diffstat (limited to 'openvpn/tests')
-rw-r--r--openvpn/tests/Makefile.am5
-rwxr-xr-xopenvpn/tests/t_client.sh.in15
2 files changed, 11 insertions, 9 deletions
diff --git a/openvpn/tests/Makefile.am b/openvpn/tests/Makefile.am
index 6ae845ba..b7980e04 100644
--- a/openvpn/tests/Makefile.am
+++ b/openvpn/tests/Makefile.am
@@ -12,13 +12,12 @@
MAINTAINERCLEANFILES = \
$(srcdir)/Makefile.in
-test_scripts = t_lpback.sh t_cltsrv.sh
+test_scripts = t_client.sh t_lpback.sh t_cltsrv.sh
TESTS_ENVIRONMENT = top_srcdir="$(top_srcdir)"
TESTS = $(test_scripts)
dist_noinst_SCRIPTS = \
$(test_scripts) \
- t_cltsrv-down.sh \
- t_client.sh
+ t_cltsrv-down.sh
diff --git a/openvpn/tests/t_client.sh.in b/openvpn/tests/t_client.sh.in
index 7ba124c9..d58b8210 100755
--- a/openvpn/tests/t_client.sh.in
+++ b/openvpn/tests/t_client.sh.in
@@ -14,16 +14,19 @@
srcdir="${srcdir:-.}"
top_builddir="${top_builddir:-..}"
-if [ -r "${srcdir}"/t_client.rc ] ; then
+if [ -r "${top_builddir}"/t_client.rc ] ; then
+ . "${top_builddir}"/t_client.rc
+elif [ -r "${srcdir}"/t_client.rc ] ; then
. "${srcdir}"/t_client.rc
else
- echo "$0: cannot find 't_client.rc' in ('${srcdir}'). SKIPPING TEST." >&2
+ echo "$0: cannot find 't_client.rc' in build dir ('${top_builddir}')" >&2
+ echo "$0: or source directory ('${srcdir}'). SKIPPING TEST." >&2
exit 77
fi
if [ ! -x "${top_builddir}/src/openvpn/openvpn" ]
then
- echo "no (executable) openvpn binary in current directory. FAIL." >&2
+ echo "no (executable) openvpn binary in current build tree. FAIL." >&2
exit 1
fi
@@ -83,12 +86,12 @@ fail()
get_ifconfig_route()
{
# linux / iproute2? (-> if configure got a path)
- if [ "@IPROUTE@" != "ip" ]
+ if [ -n "@IPROUTE@" ]
then
echo "-- linux iproute2 --"
@IPROUTE@ addr show | grep -v valid_lft
@IPROUTE@ route show
- @IPROUTE@ -6 route show | sed -e 's/expires [0-9]*sec //'
+ @IPROUTE@ -o -6 route show | grep -v ' cache' | sed -e 's/expires [0-9]*sec //'
return
fi
@@ -236,7 +239,7 @@ do
trap "$RUN_SUDO kill $opid ; trap - 0 ; exit 1" 1 2 3 15
echo "wait for connection to establish..."
- sleep 10
+ sleep ${SETUP_TIME_WAIT:-10}
# test whether OpenVPN process is still there
if $RUN_SUDO kill -0 $opid