]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Only build and run cmocka unit tests if its submodule is initialized
authorDavid Sommerseth <dazo@privateinternetaccess.com>
Tue, 31 May 2016 10:28:46 +0000 (12:28 +0200)
committerDavid Sommerseth <dazo@privateinternetaccess.com>
Tue, 31 May 2016 14:41:30 +0000 (16:41 +0200)
commit987910e8abb40e357ac1aa6bf658b4660cc7f376
treef293c82b51749322f2ab2d5910683d77b17ffc3a
parent7a22be493cad9b800228c48c3f0f385bb40f60fd
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
(cherry picked from commit 45f6e7991cfa3bb8a44f981b6cf1e794d617d51e)
configure.ac
tests/unit_tests/Makefile.am
vendor/Makefile.am