2016-12-19 18:49 GMT+05:00 Samuli Seppänen <sam...@openvpn.net>:

> Il 19/12/2016 15:44, David Sommerseth ha scritto:
>
>> On 19/12/16 11:01, Samuli Seppänen wrote:
>> [...snip...]
>>
>>> Right now cmocka tests are skipped if
>>>
>>> a) cmocka Git submodule is not initialized
>>> b) CMake is not installed
>>>
>>> See commit 45f6e7991cf for details.
>>>
>>> Travis logs say this:
>>>
>>> $ git clone --depth=50 --branch=master
>>> https://github.com/OpenVPN/openvpn.git OpenVPN/openvpn
>>> $ git submodule update --init --recursive
>>>
>>> Which means that cmocka Git submodule gets sucked in automatically. So
>>> that leaves us with the following options afaics:
>>>
>>> 1) Remove the cmocka directory after the fact (rather nasty)
>>>
>>
>> In deed nasty.  Why not rather detect if it os OSX and skip the 'git
>> submodule' step?
>>
>
> Yes, this would suck much less.
>
> Chipitsine: could you have a look how this could be done? Basically we'd
> need to different Git command than the above if MacOS X is detected.



?

--- configure.ac.orig    2016-12-19 18:50:30.657739835 +0500
+++ configure.ac    2016-12-19 18:57:43.145828431 +0500
@@ -1268,7 +1268,12 @@
 AC_CHECK_PROGS([CMAKE], [cmake])
 if test -n "${CMAKE}"; then
    if test -f "${srcdir}/vendor/cmocka/CMakeLists.txt"; then
-      AM_CONDITIONAL([CMOCKA_INITIALIZED], [true])
+       if test "${TRAVIS_OS_NAME}" != "osx"; then
+          AM_CONDITIONAL([CMOCKA_INITIALIZED], [true])
+       else
+          AM_CONDITIONAL([CMOCKA_INITIALIZED], [false])
+          AC_MSG_RESULT([!! WARNING !! The cmoka is turned off on osx due
to missing linker functions.  Unit testing cannot be performed.])
+       fi
    else
       AM_CONDITIONAL([CMOCKA_INITIALIZED], [false])
       AC_MSG_RESULT([!! WARNING !! The cmoka git submodule has not been
initialized or updated.  Unit testing cannot be performed.])



I've no idea how to detect osx, but it is rather easy on travis-ci


>
>
>
>
>>
>> 2) Ensure that CMake is not installed on MacOS X (does mbedTLS require
>>> this?)
>>>
>>
>> If mbedTLS is built from source, then I believe CMake is needed.
>>
>>
>> 3) Allow the user to select if cmocka tests are run or not
>>>
>>
>> Try to avoid adding more options ... rather try to have some reasonable
>> defaults which is auto-detected based on reasonable triggers (such as
>> distro/platform)
>>
>>
>>
------------------------------------------------------------------------------
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

Reply via email to