5 ${CMAKE_CURRENT_SOURCE_DIR}
9 set(TORTURE_LIBRARY torture)
12 add_executable(echo_srv echo_srv.c)
13 target_link_libraries(echo_srv ${SWRAP_REQUIRED_LIBRARIES})
15 add_library(${TORTURE_LIBRARY} STATIC torture.c)
16 target_link_libraries(${TORTURE_LIBRARY}
18 ${SWRAP_REQUIRED_LIBRARIES})
23 test_echo_tcp_socket_options
24 test_echo_tcp_write_read
25 test_echo_tcp_writev_readv
26 test_echo_udp_sendto_recvfrom
27 test_echo_udp_send_recv
28 test_echo_udp_sendmsg_recvmsg)
30 if (HAVE_STRUCT_MSGHDR_MSG_CONTROL)
31 set(SWRAP_TESTS ${SWRAP_TESTS} test_sendmsg_recvmsg_fd)
32 endif (HAVE_STRUCT_MSGHDR_MSG_CONTROL)
34 foreach(_SWRAP_TEST ${SWRAP_TESTS})
35 add_cmocka_test(${_SWRAP_TEST} ${_SWRAP_TEST}.c ${TORTURE_LIBRARY})
42 ENVIRONMENT DYLD_FORCE_FLAT_NAMESPACE=1;DYLD_INSERT_LIBRARIES=${CMAKE_BINARY_DIR}/src/libsocket_wrapper.dylib)
48 ENVIRONMENT LD_PRELOAD=${CMAKE_BINARY_DIR}/src/libsocket_wrapper.so)