inspired by https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg13808.html --- tests/Makefile.am | 2 +- tests/t_usage.sh | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100755 tests/t_usage.sh
diff --git a/tests/Makefile.am b/tests/Makefile.am index 0795680c..7306d1d1 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -14,7 +14,7 @@ MAINTAINERCLEANFILES = \ SUBDIRS = unit_tests -test_scripts = t_client.sh +test_scripts = t_client.sh t_usage.sh if ENABLE_CRYPTO test_scripts += t_lpback.sh t_cltsrv.sh endif diff --git a/tests/t_usage.sh b/tests/t_usage.sh new file mode 100755 index 00000000..f4845468 --- /dev/null +++ b/tests/t_usage.sh @@ -0,0 +1,29 @@ +#!/bin/sh +# +# run "openvpn --help" +# - check that openvpn did not crash +# +# prerequisites: +# - openvpn binary in current directory +# +# inspired by https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg13808.html +# + +top_builddir="${top_builddir:-..}" + +if [ ! -x "${top_builddir}/src/openvpn/openvpn" ] +then + echo "no (executable) openvpn binary in current build tree. FAIL." >&2 + exit 1 +fi + +exit_code=0 + +"${top_builddir}/src/openvpn/openvpn" --help >/dev/null + +if [ $? -ne 1 ] +then + exit_code=1 +fi + +exit $exit_code -- 2.13.3 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel