tests: Do not build test_swrap_unit with LFS support
authorAndreas Schneider <asn@samba.org>
Tue, 27 Jun 2023 10:01:46 +0000 (12:01 +0200)
committerAndreas Schneider <asn@samba.org>
Tue, 27 Jun 2023 11:39:29 +0000 (13:39 +0200)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
tests/CMakeLists.txt

index 17d8d3ceb5c6d0010115fec4b144b00515f55187..afd90929fc195a454301e26d227624cfe5748c8b 100644 (file)
@@ -71,7 +71,6 @@ set(SWRAP_TESTS
     test_echo_udp_sendto_recvfrom
     test_echo_udp_send_recv
     test_echo_udp_sendmsg_recvmsg
-    test_swrap_unit
     test_max_sockets
     test_public_functions
     test_close_failure
@@ -167,6 +166,14 @@ if (HELGRIND_TESTING)
     endif()
 endif()
 
+# test_swrap_unit (don't use LFS)
+add_cmocka_test(test_swrap_unit
+                SOURCES test_swrap_unit.c
+                COMPILE_OPTIONS ${DEFAULT_C_COMPILE_FLAGS} -D_GNU_SOURCE
+                LINK_LIBRARIES ${TORTURE_LIBRARY} socket_wrapper_noop
+                LINK_OPTIONS ${DEFAULT_LINK_FLAGS})
+add_cmocka_test_environment(test_swrap_unit)
+
 # test_fork_pthread
 add_library(thread_deadlock SHARED thread_deadlock.c)
 target_link_libraries(thread_deadlock ${CMAKE_THREAD_LIBS_INIT})