5 ${CMAKE_CURRENT_SOURCE_DIR}
6 ${CMAKE_SOURCE_DIR}/src
10 set(TORTURE_LIBRARY torture)
13 add_executable(echo_srv echo_srv.c)
14 target_link_libraries(echo_srv ${SWRAP_REQUIRED_LIBRARIES})
16 add_library(${TORTURE_LIBRARY} STATIC torture.c)
17 target_link_libraries(${TORTURE_LIBRARY}
19 ${SWRAP_REQUIRED_LIBRARIES})
26 test_echo_tcp_socket_options
27 test_echo_tcp_write_read
28 test_echo_tcp_writev_readv
29 test_echo_tcp_get_peer_sock_name
30 test_echo_udp_sendto_recvfrom
31 test_echo_udp_send_recv
32 test_echo_udp_sendmsg_recvmsg)
34 if (HAVE_STRUCT_MSGHDR_MSG_CONTROL)
35 set(SWRAP_TESTS ${SWRAP_TESTS} test_sendmsg_recvmsg_fd)
36 endif (HAVE_STRUCT_MSGHDR_MSG_CONTROL)
38 foreach(_SWRAP_TEST ${SWRAP_TESTS})
39 add_cmocka_test(${_SWRAP_TEST} ${_SWRAP_TEST}.c ${TORTURE_LIBRARY})
46 ENVIRONMENT DYLD_FORCE_FLAT_NAMESPACE=1;DYLD_INSERT_LIBRARIES=${SOCKET_WRAPPER_LOCATION})
52 ENVIRONMENT LD_PRELOAD=${SOCKET_WRAPPER_LOCATION})