On 19/12/16 14:59, Илья Шипицин wrote: > > > 2016-12-19 18:49 GMT+05:00 Samuli Seppänen <sam...@openvpn.net > <mailto: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 > <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 <http://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
I'm strongly leaning towards a NAK on this approach, unless there exist absolutely no other way. I don't want to see configure.ac carrying Travis references for no good reason. I have not looked at all how the Travis integration works. But I'm putting some faith into "it is rather easy on travis-ci" ... and that's the place I meant should "auto-detect" if the test was being executed on OSX or not. -- kind regards, David Sommerseth OpenVPN Technologies, Inc
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ 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