mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-19 18:03:50 +00:00
Problem: test_pair_tcp_cap_net_admin requires sudo but is enabled by default in CMake
Solution: add an option to enable it, and default to false. Enable it in the CI so we don't lose coverage, as it works on Travis. Fixes #3725
This commit is contained in:
parent
805564b996
commit
bfa8cf3089
@ -30,6 +30,7 @@ CMAKE_OPTS+=("-DCMAKE_INSTALL_PREFIX:PATH=${BUILD_PREFIX}")
|
|||||||
CMAKE_OPTS+=("-DCMAKE_PREFIX_PATH:PATH=${BUILD_PREFIX}")
|
CMAKE_OPTS+=("-DCMAKE_PREFIX_PATH:PATH=${BUILD_PREFIX}")
|
||||||
CMAKE_OPTS+=("-DCMAKE_LIBRARY_PATH:PATH=${BUILD_PREFIX}/lib")
|
CMAKE_OPTS+=("-DCMAKE_LIBRARY_PATH:PATH=${BUILD_PREFIX}/lib")
|
||||||
CMAKE_OPTS+=("-DCMAKE_INCLUDE_PATH:PATH=${BUILD_PREFIX}/include")
|
CMAKE_OPTS+=("-DCMAKE_INCLUDE_PATH:PATH=${BUILD_PREFIX}/include")
|
||||||
|
CMAKE_OPTS+=("-DENABLE_CAPSH=ON")
|
||||||
|
|
||||||
if [ "$CLANG_FORMAT" != "" ] ; then
|
if [ "$CLANG_FORMAT" != "" ] ; then
|
||||||
CMAKE_OPTS+=("-DCLANG_FORMAT=${CLANG_FORMAT}")
|
CMAKE_OPTS+=("-DCLANG_FORMAT=${CLANG_FORMAT}")
|
||||||
|
@ -85,6 +85,8 @@ if(ZMQ_HAVE_CURVE)
|
|||||||
test_security_curve)
|
test_security_curve)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
option(ENABLE_CAPSH "Run tests that require sudo and capsh (for cap_net_admin)" OFF)
|
||||||
|
if(ENABLE_CAPSH)
|
||||||
find_program(CAPSH_PROGRAM NAMES capsh)
|
find_program(CAPSH_PROGRAM NAMES capsh)
|
||||||
|
|
||||||
if (CAPSH_PROGRAM)
|
if (CAPSH_PROGRAM)
|
||||||
@ -94,6 +96,7 @@ if (CAPSH_PROGRAM)
|
|||||||
else()
|
else()
|
||||||
message(STATUS "capsh not found, skipping tests that require CAP_NET_ADMIN")
|
message(STATUS "capsh not found, skipping tests that require CAP_NET_ADMIN")
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
if(ZMQ_HAVE_IPC)
|
if(ZMQ_HAVE_IPC)
|
||||||
list(APPEND tests
|
list(APPEND tests
|
||||||
|
Loading…
x
Reference in New Issue
Block a user