summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt4
-rw-r--r--DefineOptions.cmake2
-rw-r--r--tests/CMakeLists.txt2
3 files changed, 5 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e89ac84..fbde205 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -50,8 +50,8 @@ configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
# check subdirectories
add_subdirectory(src)
-if (WITH_TESTING)
+if (UNIT_TESTING)
find_package(CMocka REQUIRED)
include(AddCMockaTest)
add_subdirectory(tests)
-endif (WITH_TESTING)
+endif (UNIT_TESTING)
diff --git a/DefineOptions.cmake b/DefineOptions.cmake
index aca40a5..6030e79 100644
--- a/DefineOptions.cmake
+++ b/DefineOptions.cmake
@@ -1 +1 @@
-option(WITH_TESTING "Build with unit tests" OFF)
+option(UNIT_TESTING "Build with unit tests" OFF)
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 545e2aa..dc845b9 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -10,4 +10,6 @@ add_cmocka_test(testsuite testsuite.c ${CMOCKA_LIBRARY})
set_tests_properties(
testsuite
PROPERTIES
+ ENVIRONMENT SOCKET_WRAPPER_DIR=${CMAKE_CURRENT_BINARY_DIR}
+ ENVIRONMENT SOCKET_WRAPPER_DEFAULT_IFACE=11
ENVIRONMENT LD_PRELOAD=${CMAKE_BINARY_DIR}/src/libsocket_wrapper.so)