diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2013-12-10 11:03:12 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2013-12-10 14:23:26 +0100 |
commit | 1e12eb0b3e4f974c33a2b628d0857e137fce8cfa (patch) | |
tree | 3ebe5ec1939f831479e684b2c75bec8d142c1b09 /tests/CMakeLists.txt | |
parent | 78cc4fb76d14d4df313e412bf148312eea2c706b (diff) | |
download | socket_wrapper-1e12eb0b3e4f974c33a2b628d0857e137fce8cfa.tar.gz socket_wrapper-1e12eb0b3e4f974c33a2b628d0857e137fce8cfa.tar.xz socket_wrapper-1e12eb0b3e4f974c33a2b628d0857e137fce8cfa.zip |
tests: Add a torture library with helpers.
Diffstat (limited to 'tests/CMakeLists.txt')
-rw-r--r-- | tests/CMakeLists.txt | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 49cd62a..1154561 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -6,13 +6,21 @@ include_directories( ${CMOCKA_INCLUDE_DIR} ) +set(TORTURE_LIBRARY torture) + +# RFC862 echo server add_executable(echo_srv echo_srv.c) -add_cmocka_test(testsuite testsuite.c ${CMOCKA_LIBRARY} ${SWRAP_REQUIRED_LIBRARIES}) -add_cmocka_test(test_echo_udp_sendto_recvfrom test_echo_udp_sendto_recvfrom.c ${CMOCKA_LIBRARY} ${SWRAP_REQUIRED_LIBRARIES}) +add_library(${TORTURE_LIBRARY} STATIC torture.c) +target_link_libraries(${TORTURE_LIBRARY} + ${CMOCKA_LIBRARY} + ${SWRAP_REQUIRED_LIBRARIES}) set(SWRAP_TESTS testsuite test_echo_udp_sendto_recvfrom) + foreach(_SWRAP_TEST ${SWRAP_TESTS}) + add_cmocka_test(${_SWRAP_TEST} ${_SWRAP_TEST}.c ${TORTURE_LIBRARY}) + if (OSX) set_property( TEST |