like that ?

diff --git a/configure.ac b/configure.ac
index d733023..dc95123 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1192,6 +1192,7 @@ AM_CONDITIONAL([WIN32], [test "${WIN32}" = "yes"])
 AM_CONDITIONAL([GIT_CHECKOUT], [test "${GIT_CHECKOUT}" = "yes"])
 AM_CONDITIONAL([ENABLE_PLUGIN_AUTH_PAM], [test "${enable_plugin_auth_pam}"
= "yes"])
 AM_CONDITIONAL([ENABLE_PLUGIN_DOWN_ROOT], [test
"${enable_plugin_down_root}" = "yes"])
+AM_CONDITIONAL([ENABLE_CRYPTO], [test "${enable_crypto}" = "yes"])

 plugindir="${with_plugindir}"
 sampledir="\$(docdir)/sample"
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 2cba9e6..235cd13 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -14,7 +14,10 @@ MAINTAINERCLEANFILES = \

 SUBDIRS = unit_tests

-test_scripts = t_client.sh t_lpback.sh t_cltsrv.sh
+test_scripts = t_client.sh
+if ENABLE_CRYPTO
+test_scripts += t_lpback.sh t_cltsrv.sh
+endif

 TESTS_ENVIRONMENT = top_srcdir="$(top_srcdir)"
 TESTS = $(test_scripts)


2016-06-19 15:37 GMT+05:00 Steffan Karger <stef...@karger.me>:

> Hi,
>
> On Sun, Jun 19, 2016 at 10:41 AM, Илья Шипицин <chipits...@gmail.com>
> wrote:
> > when playing with travis-ci, I encountered that t_lpback.sh and
> t_cltsrv.sh
> > fails on "make check" if openvpn is configured with --disable-crypto
> > (because --genkey is not available)
> >
> > what would be the best ?
> >
> > 1) run 'openvpn --help' and grep for --genkey ?
> > 2) check exit code of 'openvpn --genkey' ?
> > 3) run 'openvpn --show-ciphers' and see it is empty ?
> > 4) somehow determine exact configure options ? (I haven't found a way
> yet)
>
> I think 4.  You can use AC_SUBST to pass the value of $enable_crypto
> to a Makefile.am, and just not run the t_client.sh, t_lpback.sh and
> t_cltsrv.sh if it is 'no'.
>
> Later on, we might want to add a test that verifies correct behaviour
> of openvpn-without-crypto.
>
> -Steffan
>

Reply via email to