https://travis-ci.org/OpenVPN/openvpn/builds
is it ok ?
Quoted 1 line · Илья Шипицин
is it ok ?
No, it's not. But someone needs to figure out how to use cmocka on OSX, or disable the offending test on OSX. If I find some time I will, but I haven't yet gotten around to it.
-Steffan
2016-11-17 3:04 GMT+05:00 Steffan Karger <[email protected]...>:
Quoted 7 lines · Илья Шипицин
Quoted 1 line
is it ok ?
No, it's not. But someone needs to figure out how to use cmocka on OSX, or disable the offending test on OSX. If I find some time I will, but I haven't yet gotten around to it.
this line
https://github.com/OpenVPN/openvpn/blob/master/tests/unit_tests/openvpn/Makefile.am#L17
causes an error
https://travis-ci.org/OpenVPN/openvpn/jobs/177700958#L1258
I guess, someone who did that commit, can resolve it.
Quoted 3 lines
-Steffan
Hi,
Quoted 5 lines · ???????? ??????????????
this line
https://github.com/OpenVPN/openvpn/blob/master/tests/unit_tests/openvpn/Makefile.am#L17
causes an error
GNU LD manpage says this is a trick to make it link "another function" "--wrap parse_line" would make it link __wrap_parse_line() instead - most likely because @d12fk provided a stub function that mocks the result (or whatever).
Have not looked into this in more detail.
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...2016-11-21 22:49 GMT+05:00 Gert Doering <[email protected]...>:
Quoted 8 lines
Hi,
Quoted 3 lines · ???????? ??????????????
this line
unit_tests/openvpn/Makefile.am#L17
Quoted 1 line
Quoted 9 lines
Quoted 1 line
causes an error
GNU LD manpage says this is a trick to make it link "another function" "--wrap
parse_line" would make it link__wrap_parse_line()instead - most likely because @d12fk provided a stub function that mocks the result (or whatever).Have not looked into this in more detail.
http://www.mockator.com/projects/mockator/wiki/Wrap_Functions
"Alas, this feature is *only available with the GNU tool chain on Linux*. GCC for Mac OS X does not offer the linker flag -wrap. "
should we skip those tests on osx ? or someone will rewrite them ?
Quoted 12 lines
gert
--
USENET is *not* the non-clickable part of WWW!//www.muc.de/~gert/ <http://www.muc.de/%7Egert/>
Gert Doering - Munich, Germany
[email protected]...
fax: +49-89-35655025 [email protected]...
muenchen.de
Quoted 23 lines · Илья Шипицин
2016-11-21 22:49 GMT+05:00 Gert Doering <[email protected]... <mailto:[email protected]...>>:
Hi,
On Mon, Nov 21, 2016 at 10:31:45PM +0500, ???????? ?????????????? wrote:
> this line
>
> https://github.com/OpenVPN/openvpn/blob/master/tests/unit_tests/openvpn/Makefile.am#L17
<https://github.com/OpenVPN/openvpn/blob/master/tests/unit_tests/openvpn/Makefile.am#L17>
>
> causes an errorGNU LD manpage says this is a trick to make it link "another function" "--wrap
parse_line" would make it link__wrap_parse_line()instead - most likely because @d12fk provided a stub function that mocks the result (or whatever).Have not looked into this in more detail.
Quoted 6 lines
http://www.mockator.com/projects/mockator/wiki/Wrap_Functions
"Alas, this feature is *only available with the GNU tool chain on Linux*. GCC for Mac OS X does not offer the linker flag |-wrap|. "
should we skip those tests on osx ? or someone will rewrite them ?
I'd hold back a little bit. I know Arne, Heiko and some people from #cmocka on FreeNode had a discussion about this issue earlier this week.
I don't know what they agreed on, but there was a discussion where they
looked at a few alternatives at least.
Signature · 4 lines
kind regards, David Sommerseth OpenVPN Technologies, Inc
2016-11-27 4:29 GMT+05:00 David Sommerseth <
[email protected]...>:
Quoted 33 lines · Илья Шипицин
Quoted 8 lines
2016-11-21 22:49 GMT+05:00 Gert Doering <[email protected]... <mailto:[email protected]...>>:
Hi, On Mon, Nov 21, 2016 at 10:31:45PM +0500, ???????? ??????????????Quoted 3 lines · wrote:
Quoted 3 lines
this line
unit_tests/openvpn/Makefile.am#L17
Quoted 1 line
unit_tests/openvpn/Makefile.am#L17>
Quoted 4 lines
Quoted 2 lines
causes an error
GNU LD manpage says this is a trick to make it link "another
function"
Quoted 12 lines
"--wrap
parse_line" would make it link__wrap_parse_line()instead - most likely because @d12fk provided a stub function that mocks the result (or whatever).Have not looked into this in more detail.
http://www.mockator.com/projects/mockator/wiki/Wrap_Functions
"Alas, this feature is *only available with the GNU tool chain on Linux*. GCC for Mac OS X does not offer the linker flag |-wrap|. "
Quoted 7 lines
Quoted 1 line
should we skip those tests on osx ? or someone will rewrite them ?
I'd hold back a little bit. I know Arne, Heiko and some people from #cmocka on FreeNode had a discussion about this issue earlier this week.
I don't know what they agreed on, but there was a discussion where they
looked at a few alternatives at least.
any news on that ?
Quoted 10 lines
--
kind regards,David Sommerseth
OpenVPN Technologies, Inc
Il 19/12/2016 10:22, Илья Шипицин ha scritto:
Quoted 47 lines
2016-11-27 4:29 GMT+05:00 David Sommerseth
<[email protected]...
<mailto:[email protected]...>>:On 26/11/16 12:32, Илья Шипицин wrote: > > > 2016-11-21 22:49 GMT+05:00 Gert Doering <[email protected]... <mailto:[email protected]...> > <mailto:[email protected]... <mailto:[email protected]...>>>: > > Hi, > > On Mon, Nov 21, 2016 at 10:31:45PM +0500, ???????? ?????????????? wrote: > > this line > > > > https://github.com/OpenVPN/openvpn/blob/master/tests/unit_tests/openvpn/Makefile.am#L17 <https://github.com/OpenVPN/openvpn/blob/master/tests/unit_tests/openvpn/Makefile.am#L17> > <https://github.com/OpenVPN/openvpn/blob/master/tests/unit_tests/openvpn/Makefile.am#L17 <https://github.com/OpenVPN/openvpn/blob/master/tests/unit_tests/openvpn/Makefile.am#L17>> > > > > causes an error > > GNU LD manpage says this is a trick to make it link "another function" > "--wrap parse_line" would make it link __wrap_parse_line() instead - > most likely because @d12fk provided a stub function that mocks the > result (or whatever). > > Have not looked into this in more detail. > > > http://www.mockator.com/projects/mockator/wiki/Wrap_Functions <http://www.mockator.com/projects/mockator/wiki/Wrap_Functions> > > "Alas, this feature is *only available with the GNU tool chain on > Linux*. GCC for Mac OS X does not offer the linker flag |-wrap|. " > > should we skip those tests on osx ? or someone will rewrite them ? I'd hold back a little bit. I know Arne, Heiko and some people from #cmocka on FreeNode had a discussion about this issue earlier this week. I don't know what they agreed on, but there was a discussion where they looked at a few alternatives at least.
Quoted 2 lines
any news on that ?
We discussed this in previous IRC meeting, and there is still no real fix:
<https://www.mail-archive.com/[email protected]/msg13558.html>
The easiest "fix" would be to just disable cmocka unit tests for MacOS X in .travis.yml. I believe the unit tests behave exactly the same on every platform(?), so removing MacOS X would not have any negative impact on code quality.
Signature · 5 lines
Samuli Seppänen Community Manager OpenVPN Technologies, Inc irc freenode net: mattock
2016-12-19 14:11 GMT+05:00 Samuli Seppänen <[email protected]...>:
Quoted 65 lines
Il 19/12/2016 10:22, Илья Шипицин ha scritto:
Quoted 58 lines
2016-11-27 4:29 GMT+05:00 David Sommerseth
<[email protected]...
<mailto:[email protected]...>>:On 26/11/16 12:32, Илья Шипицин wrote: > > > 2016-11-21 22:49 GMT+05:00 Gert Doering <[email protected]...<mailto:[email protected]...>
Quoted 5 lines
<mailto:[email protected]... <mailto:[email protected]...>>>:
Hi, On Mon, Nov 21, 2016 at 10:31:45PM +0500, ????????Quoted 3 lines · ??????????????
Quoted 3 lines
this line
tests/openvpn/Makefile.am#L17
<https://github.com/OpenVPN/openvpn/blob/master/tests/unit_
tests/openvpn/Makefile.am#L17>Quoted 1 line
tests/openvpn/Makefile.am#L17
<https://github.com/OpenVPN/openvpn/blob/master/tests/unit_
tests/openvpn/Makefile.am#L17>>Quoted 4 lines
Quoted 2 lines
causes an error
GNU LD manpage says this is a trick to make it link "another
function"
Quoted 1 line
"--wrap
parse_line" would make it link__wrap_parse_line()instead -
Quoted 1 line
most likely because @d12fk provided a stub function that mocks
the
Quoted 6 lines
result (or whatever).
Have not looked into this in more detail.
http://www.mockator.com/projects/mockator/wiki/Wrap_Functions
<http://www.mockator.com/projects/mockator/wiki/Wrap_Functions>
>
> "Alas, this feature is *only available with the GNU tool chain on > Linux*. GCC for Mac OS X does not offer the linker flag |-wrap|. " >
> should we skip those tests on osx ? or someone will rewrite them ?I'd hold back a little bit. I know Arne, Heiko and some people from #cmocka on FreeNode had a discussion about this issue earlier this
week.
I don't know what they agreed on, but there was a discussion where
they
looked at a few alternatives at least.Quoted 3 lines
any news on that ?
We discussed this in previous IRC meeting, and there is still no real fix:
Quoted 9 lines
<https://www.mail-archive.com/[email protected]...
e.net/msg13558.html>The easiest "fix" would be to just disable cmocka unit tests for MacOS X in .travis.yml. I believe the unit tests behave exactly the same on every platform(?), so removing MacOS X would not have any negative impact on code quality.
ok, can you send a patch on that ?
Quoted 7 lines
--
Samuli Seppänen
Community Manager
OpenVPN Technologies, Incirc freenode net: mattock
Il 19/12/2016 11:38, Илья Шипицин ha scritto:
Quoted 96 lines
2016-12-19 14:11 GMT+05:00 Samuli Seppänen <[email protected]... <mailto:[email protected]...>>:
Il 19/12/2016 10:22, Илья Шипицин ha scritto: 2016-11-27 4:29 GMT+05:00 David Sommerseth <[email protected]... <mailto:[email protected]...> <mailto:[email protected]... <mailto:[email protected]...>>>: On 26/11/16 12:32, Илья Шипицин wrote: > > > 2016-11-21 22:49 GMT+05:00 Gert Doering <[email protected]... <mailto:[email protected]...> <mailto:[email protected]... <mailto:[email protected]...>> > <mailto:[email protected]... <mailto:[email protected]...> <mailto:[email protected]... <mailto:[email protected]...>>>>: > > Hi, > > On Mon, Nov 21, 2016 at 10:31:45PM +0500, ???????? ?????????????? wrote: > > this line > > > > https://github.com/OpenVPN/openvpn/blob/master/tests/unit_tests/openvpn/Makefile.am#L17 <https://github.com/OpenVPN/openvpn/blob/master/tests/unit_tests/openvpn/Makefile.am#L17> <https://github.com/OpenVPN/openvpn/blob/master/tests/unit_tests/openvpn/Makefile.am#L17 <https://github.com/OpenVPN/openvpn/blob/master/tests/unit_tests/openvpn/Makefile.am#L17>> > <https://github.com/OpenVPN/openvpn/blob/master/tests/unit_tests/openvpn/Makefile.am#L17 <https://github.com/OpenVPN/openvpn/blob/master/tests/unit_tests/openvpn/Makefile.am#L17> <https://github.com/OpenVPN/openvpn/blob/master/tests/unit_tests/openvpn/Makefile.am#L17 <https://github.com/OpenVPN/openvpn/blob/master/tests/unit_tests/openvpn/Makefile.am#L17>>> > > > > causes an error > > GNU LD manpage says this is a trick to make it link "another function" > "--wrap parse_line" would make it link __wrap_parse_line() instead - > most likely because @d12fk provided a stub function that mocks the > result (or whatever). > > Have not looked into this in more detail. > > > http://www.mockator.com/projects/mockator/wiki/Wrap_Functions <http://www.mockator.com/projects/mockator/wiki/Wrap_Functions> <http://www.mockator.com/projects/mockator/wiki/Wrap_Functions <http://www.mockator.com/projects/mockator/wiki/Wrap_Functions>> > > "Alas, this feature is *only available with the GNU tool chain on > Linux*. GCC for Mac OS X does not offer the linker flag |-wrap|. " > > should we skip those tests on osx ? or someone will rewrite them ? I'd hold back a little bit. I know Arne, Heiko and some people from #cmocka on FreeNode had a discussion about this issue earlier this week. I don't know what they agreed on, but there was a discussion where they looked at a few alternatives at least. any news on that ? We discussed this in previous IRC meeting, and there is still no real fix: <https://www.mail-archive.com/[email protected]/msg13558.html <https://www.mail-archive.com/[email protected]/msg13558.html>> The easiest "fix" would be to just disable cmocka unit tests for MacOS X in .travis.yml. I believe the unit tests behave exactly the same on every platform(?), so removing MacOS X would not have any negative impact on code quality.
Quoted 2 lines
ok, can you send a patch on that ?
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)
2) Ensure that CMake is not installed on MacOS X (does mbedTLS require this?)
3) Allow the user to select if cmocka tests are run or not
Thoughts anyone?
Signature · 5 lines
Samuli Seppänen Community Manager OpenVPN Technologies, Inc irc freenode net: mattock
On 19/12/16 11:01, Samuli Seppänen wrote:
[...snip...]
Quoted 9 lines
Right now cmocka tests are skipped if
a) cmocka Git submodule is not initialized
b) CMake is not installedSee commit
45f6e7991cffor details.Travis logs say this:
Quoted 8 lines
$ git clone --depth=50 --branch=master https://github.com/OpenVPN/openvpn.git OpenVPN/openvpn $ git submodule update --init --recursiveWhich 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?
Quoted 2 lines
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.
Quoted 1 line
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)
Signature · 4 lines
kind regards, David Sommerseth OpenVPN Technologies, Inc
Il 19/12/2016 15:44, David Sommerseth ha scritto:
Quoted 15 lines · Samuli Seppänen
[...snip...]
Quoted 13 lines
Right now cmocka tests are skipped if
a) cmocka Git submodule is not initialized
b) CMake is not installedSee commit
45f6e7991cffor details.Travis logs say this:
$ git clone --depth=50 --branch=master https://github.com/OpenVPN/openvpn.git OpenVPN/openvpn $ git submodule update --init --recursive
Quoted 7 lines
Quoted 4 lines
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.
Quoted 15 lines
Quoted 4 lines
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.
Quoted 1 line
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)
2016-12-19 18:49 GMT+05:00 Samuli Seppänen <[email protected]...>:
Quoted 24 lines
Il 19/12/2016 15:44, David Sommerseth ha scritto:
Quoted 22 lines · Samuli Seppänen
[...snip...]
Quoted 18 lines
Right now cmocka tests are skipped if
a) cmocka Git submodule is not initialized
b) CMake is not installedSee commit
45f6e7991cffor details.Travis logs say this:
$ git clone --depth=50 --branch=master https://github.com/OpenVPN/openvpn.git OpenVPN/openvpn $ git submodule update --init --recursiveWhich 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)
Quoted 8 lines
Quoted 3 lines
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 2016-12-19 18:57:43.145828431 +0500 renamed from configure.ac.orig 2016-12-19 18:50:30.657739835 +0500 +5 -1
@@ -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
Quoted 21 lines
Quoted 21 lines
2) Ensure that CMake is not installed on MacOS X (does mbedTLS require
Quoted 2 lines
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
Quoted 1 line
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)
Quoted 67 lines · Илья Шипицин
2016-12-19 18:49 GMT+05:00 Samuli Seppänen <[email protected]... <mailto:[email protected]...>>:
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 installedSee commit
45f6e7991cffor 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 --recursiveWhich 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> 2016-12-19 18:57:43.145828431 renamed from configure.ac.orig 2016-12-19 18:50:30.657739835 +0500 +7
-1+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.])
Quoted 1 line
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.
Signature · 4 lines
kind regards, David Sommerseth OpenVPN Technologies, Inc
Hi,
Quoted 5 lines · David Sommerseth
Quoted 1 line
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.
For a change, I agree with David :-)
Given that configure.ac does a good job in OS autodetection already
*-*-darwin*)
AC_DEFINE([TARGET_DARWIN], [1], [Are we running on Mac OS X?])
AC_DEFINE_UNQUOTED([TARGET_PREFIX], ["M"], [Target prefix])
have_tap_header="yes"
dnl some Mac OS X tendering (we use vararg macros...)
CPPFLAGS="$CPPFLAGS -no-cpp-precomp"
ac_cv_type_struct_in_pktinfo=no
;;... it should not be too hard to add a check for "TARGET_DARWIN" to the CMOCKA_INITIALIZED section.
Or add a "disable_cmocka=yes" to the *-*-darwin* section and test for that later on (makes it easier to add other platforms that are not using GNU ld).
*Or* just check for GNU ld, and disable cmocka testing if that's not available - we already have a check in there that talks about "checking for ld used by $CC", which seems to result in
"with_gnu_ld=yes"
if, well, GNU ld is used. So the cmocka init part could just add a check
if [ yes != "$with_gnu_ld" ] ...
and set CMOCKA_INITIALIZED to "false". Done.
(I'm not very good in actual coding using the right macros, so I'm not even suggesting a patch - but I'm happy to help concept-wise and run tests)
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...any progress on the subject ?
any hope to get green builds again ?
2016-12-19 20:46 GMT+05:00 Gert Doering <[email protected]...>:
Quoted 60 lines
Hi,
Quoted 5 lines · David Sommerseth
Quoted 1 line
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.
For a change, I agree with David :-)
Given that configure.ac does a good job in OS autodetection already
*-*-darwin*)
AC_DEFINE([TARGET_DARWIN], [1], [Are we running on Mac OS
X?])AC_DEFINE_UNQUOTED([TARGET_PREFIX], ["M"], [Targetprefix])
have_tap_header="yes"
dnl some Mac OS X tendering (we use vararg macros...) CPPFLAGS="$CPPFLAGS -no-cpp-precomp" ac_cv_type_struct_in_pktinfo=no
;;... it should not be too hard to add a check for "
TARGET_DARWIN" to theCMOCKA_INITIALIZEDsection.Or add a "disable_cmocka=yes" to the *-*-darwin* section and test for that later on (makes it easier to add other platforms that are not using GNU ld).
*Or* just check for GNU ld, and disable cmocka testing if that's not available - we already have a check in there that talks about "checking for ld used by $CC", which seems to result in
"with_gnu_ld=yes"
if, well, GNU ld is used. So the cmocka init part could just add a check
if [ yes != "$with_gnu_ld" ] ...and set
CMOCKA_INITIALIZEDto "false". Done.(I'm not very good in actual coding using the right macros, so I'm not even suggesting a patch - but I'm happy to help concept-wise and run tests)
gert
--
USENET is *not* the non-clickable part of WWW!//www.muc.de/~gert/
Gert Doering - Munich, Germany
[email protected]...
fax: +49-89-35655025 [email protected]...
muenchen.de
Hi,
Quoted 4 lines · Gert Doering
*Or* just check for GNU ld, and disable cmocka testing if that's not available - we already have a check in there that talks about "checking for ld used by $CC", which seems to result in
Quoted 8 lines
"with_gnu_ld=yes"
if, well, GNU ld is used. So the cmocka init part could just add a check
if [ yes != "$with_gnu_ld" ] ...and set
CMOCKA_INITIALIZEDto "false". Done.
Trying this avenue. Configure.ac looks reasonable, the resulting configure script is a nightmare on steroids, but that wasn't *my* doing (AM_CONDITIONAL() does some really crazy stuff).
Arne or Ilya, could you test this on MacOS and/or Travis? I do not have a working OSX 10.11 build environment right now, so this is "tested on linux" only - it's not breaking things here, but I can't see if it fixes OSX breakage.
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...From 44f3536e13cbe2814406448d230d175aaac74226 Mon Sep 17 00:00:00 2001
From: Gert Doering <[email protected]...>
Date: Mon, 9 Jan 2017 21:08:02 +0100
Subject: [PATCH] Skip unit-testing on systems without GNU ld.
Current unit-testing modules rely on using -Wl,wrap= to tell GNU ld to wrap certain functions for easier mocking. This fails (at least on) MacOS X which is no longer using GNU ld.
So, treat GNU ld the same thing as cmake - if it's not there, cmocka tests are not built and run.
Trac: #813
--- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
configure.ac +2 -2
@@ -1266,7 +1266,7 @@ AC_SUBST([TEST_CFLAGS]) # Check if cmake is available and cmocka git submodule is initialized, # needed for unit testing AC_CHECK_PROGS([CMAKE], [cmake]) -if test -n "${CMAKE}"; then +if test -n "${CMAKE}" -a "$with_gnu_ld" = "yes"; then if test -f "${srcdir}/vendor/cmocka/CMakeLists.txt"; then AM_CONDITIONAL([CMOCKA_INITIALIZED], [true]) else
@@ -1274,7 +1274,7 @@ if test -n "${CMAKE}"; then AC_MSG_RESULT([!! WARNING !! The cmoka git submodule has not been initialized or updated. Unit testing cannot be performed.]) fi else - AC_MSG_RESULT([!! WARNING !! CMake is NOT available. Unit testing cannot be performed.]) + AC_MSG_RESULT([!! WARNING !! CMake is NOT available or not using GNU ld. Unit testing cannot be performed.]) AM_CONDITIONAL([CMOCKA_INITIALIZED], [false]) fi
Signature · 1 line
2.10.2
2017-01-10 1:16 GMT+05:00 Gert Doering <[email protected]...>:
Quoted 16 lines
Hi,
Quoted 4 lines · Gert Doering
*Or* just check for GNU ld, and disable cmocka testing if that's not available - we already have a check in there that talks about "checking for ld used by $CC", which seems to result in
Quoted 8 lines
"with_gnu_ld=yes"
if, well, GNU ld is used. So the cmocka init part could just add a check
if [ yes != "$with_gnu_ld" ] ...and set
CMOCKA_INITIALIZEDto "false". Done.
Quoted 9 lines
Trying this avenue. Configure.ac looks reasonable, the resulting configure script is a nightmare on steroids, but that wasn't *my* doing (
AM_CONDITIONAL()does some really crazy stuff).Arne or Ilya, could you test this on MacOS and/or Travis? I do not have a working OSX 10.11 build environment right now, so this is "tested on linux" only - it's not breaking things here, but I can't see if it fixes OSX breakage.
I do not have OSX10 neither :-)
https://github.com/chipitsine/openvpn/commit/16a91484e640ed12680dc79faf7675bf70fc21a5
https://travis-ci.org/chipitsine/openvpn/builds/190515718
OSX10 is ok, you can merge it.
I will resolve other "red" things today
Quoted 12 lines
gert
--
USENET is *not* the non-clickable part of WWW!//www.muc.de/~gert/ <http://www.muc.de/%7Egert/>
Gert Doering - Munich, Germany
[email protected]...
fax: +49-89-35655025 [email protected]...
muenchen.de
Hi,
Quoted 3 lines · David Sommerseth
Quoted 2 lines
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.
"generally speaking", mbedTLS builds fine with normal make.
In the context of Travis, I'm not sure what it does.
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...