aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDavid Sommerseth2016-05-31 12:28:46 +0200
committerDavid Sommerseth2016-05-31 16:40:29 +0200
commit45f6e7991cfa3bb8a44f981b6cf1e794d617d51e (patch)
tree2f849abb5300ad9b26ef1cc58d7b414a9c02720b /tests
parent4a506b9ca2d8bbfaa5d49c6fe9a073d8ff3e59d1 (diff)
downloadopenvpn-45f6e7991cfa3bb8a44f981b6cf1e794d617d51e.zip
openvpn-45f6e7991cfa3bb8a44f981b6cf1e794d617d51e.tar.gz
Only build and run cmocka unit tests if its submodule is initialized
Commit 40cb4cfc5d01110 added infrastructure to write unit tests using cmocka. This was implemented using a git submodule to fetch an up-to-date cmocka test framework. The issue which appeared was that 'make check' stopped working if the cmocka submodule was not initialized and updated. As we do not want this to be a hard depenency, this patch makes running these unit tests conditional. If cmocka has not been initialized, skip them or if it has been initialized all unit tests will be run. [v2 - Also check if cmake is available, as cmocka depends on that to be built ] Signed-off-by: David Sommerseth <dazo@privateinternetaccess.com> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: <1464703645-26640-1-git-send-email-openvpn@sf.lists.topphemmelig.net> URL: http://article.gmane.org/gmane.network.openvpn.devel/11758
Diffstat (limited to 'tests')
-rw-r--r--tests/unit_tests/Makefile.am2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/unit_tests/Makefile.am b/tests/unit_tests/Makefile.am
index e076db8..8868c1c 100644
--- a/tests/unit_tests/Makefile.am
+++ b/tests/unit_tests/Makefile.am
@@ -1,3 +1,5 @@
AUTOMAKE_OPTIONS = foreign
+if CMOCKA_INITIALIZED
SUBDIRS = example_test plugins
+endif