2014-08-05 13:24:32 +02:00
|
|
|
# CMake build script for ZeroMQ tests
|
|
|
|
|
|
|
|
set(tests
|
|
|
|
test_system
|
|
|
|
test_pair_inproc
|
|
|
|
test_pair_tcp
|
|
|
|
test_reqrep_inproc
|
|
|
|
test_reqrep_tcp
|
|
|
|
test_hwm
|
2014-08-08 19:36:00 +02:00
|
|
|
test_hwm_pubsub
|
2014-08-05 13:24:32 +02:00
|
|
|
test_reqrep_device
|
|
|
|
test_sub_forward
|
|
|
|
test_invalid_rep
|
|
|
|
test_msg_flags
|
2015-06-08 22:16:50 +02:00
|
|
|
test_msg_ffn
|
2014-08-05 13:24:32 +02:00
|
|
|
test_connect_resolve
|
|
|
|
test_immediate
|
|
|
|
test_last_endpoint
|
|
|
|
test_term_endpoint
|
|
|
|
test_router_mandatory
|
|
|
|
test_probe_router
|
|
|
|
test_stream
|
|
|
|
test_stream_empty
|
|
|
|
test_stream_disconnect
|
|
|
|
test_disconnect_inproc
|
2015-06-29 04:23:25 +02:00
|
|
|
test_unbind_inproc
|
|
|
|
test_unbind_wildcard
|
2014-08-05 13:24:32 +02:00
|
|
|
test_ctx_options
|
|
|
|
test_ctx_destroy
|
|
|
|
test_security_null
|
|
|
|
test_security_plain
|
|
|
|
test_security_curve
|
|
|
|
test_iov
|
|
|
|
test_spec_req
|
|
|
|
test_spec_rep
|
|
|
|
test_spec_dealer
|
|
|
|
test_spec_router
|
|
|
|
test_spec_pushpull
|
|
|
|
test_req_correlate
|
|
|
|
test_req_relaxed
|
|
|
|
test_conflate
|
|
|
|
test_inproc_connect
|
|
|
|
test_issue_566
|
|
|
|
test_shutdown_stress
|
|
|
|
test_timeo
|
|
|
|
test_many_sockets
|
|
|
|
test_diffserv
|
|
|
|
test_connect_rid
|
2014-08-12 21:34:30 +02:00
|
|
|
test_xpub_nodrop
|
2015-01-26 15:59:19 +01:00
|
|
|
test_pub_invert_matching
|
2015-02-12 15:56:14 +01:00
|
|
|
test_thread_safe
|
|
|
|
test_client_server
|
2015-11-13 10:41:00 +01:00
|
|
|
test_setsockopt
|
2015-10-23 00:33:27 +02:00
|
|
|
test_sockopt_hwm
|
2015-03-17 02:39:16 +01:00
|
|
|
test_heartbeats
|
2015-10-18 20:07:23 +02:00
|
|
|
test_poller
|
2015-10-23 16:14:30 +02:00
|
|
|
test_atomics
|
|
|
|
test_bind_src_address
|
|
|
|
test_capabilities
|
|
|
|
test_ipc_wildcard
|
|
|
|
test_metadata
|
|
|
|
test_pair_tipc
|
|
|
|
test_reqrep_device_tipc
|
|
|
|
test_reqrep_tipc
|
|
|
|
test_router_handover
|
|
|
|
test_router_mandatory_tipc
|
|
|
|
test_srcfd
|
|
|
|
test_stream_timeout
|
|
|
|
test_sub_forward_tipc
|
|
|
|
test_xpub_manual
|
|
|
|
test_xpub_welcome_msg
|
2015-12-18 11:12:18 +01:00
|
|
|
test_timers
|
2016-01-30 08:10:01 +01:00
|
|
|
test_large_msg
|
2016-01-27 17:19:14 +01:00
|
|
|
test_radio_dish
|
2016-01-30 08:10:01 +01:00
|
|
|
test_udp
|
2014-08-05 13:24:32 +02:00
|
|
|
)
|
|
|
|
if(NOT WIN32)
|
|
|
|
list(APPEND tests
|
|
|
|
test_monitor
|
|
|
|
test_pair_ipc
|
|
|
|
test_reqrep_ipc
|
|
|
|
test_abstract_ipc
|
|
|
|
test_proxy
|
2015-06-07 06:05:55 +02:00
|
|
|
test_proxy_single_socket
|
2015-04-24 23:01:20 +02:00
|
|
|
test_proxy_terminate
|
2015-08-11 21:37:50 +02:00
|
|
|
test_getsockopt_memset
|
2014-08-05 13:24:32 +02:00
|
|
|
test_filter_ipc
|
2015-10-23 16:14:30 +02:00
|
|
|
test_connect_delay_tipc
|
|
|
|
test_shutdown_stress_tipc
|
|
|
|
test_stream_exceeds_buffer
|
|
|
|
test_router_mandatory_hwm
|
|
|
|
test_term_endpoint_tipc
|
2016-02-09 10:36:14 +01:00
|
|
|
test_use_fd_ipc
|
|
|
|
test_use_fd_tcp
|
2014-08-05 13:24:32 +02:00
|
|
|
)
|
|
|
|
if(HAVE_FORK)
|
|
|
|
list(APPEND tests test_fork)
|
|
|
|
endif()
|
|
|
|
endif()
|
2015-12-07 13:19:45 +01:00
|
|
|
|
|
|
|
if(WITH_VMCI)
|
|
|
|
list(APPEND tests
|
|
|
|
test_pair_vmci
|
|
|
|
test_reqrep_vmci
|
|
|
|
)
|
|
|
|
endif()
|
2014-08-05 13:24:32 +02:00
|
|
|
|
|
|
|
foreach(test ${tests})
|
2015-02-12 20:29:09 +01:00
|
|
|
add_executable(${test} ${test}.cpp)
|
2016-01-14 01:35:41 +01:00
|
|
|
target_include_directories(${test} PRIVATE "${CMAKE_SOURCE_DIR}/src")
|
2015-02-12 20:29:09 +01:00
|
|
|
target_link_libraries(${test} libzmq)
|
2014-08-05 13:24:32 +02:00
|
|
|
|
|
|
|
if(RT_LIBRARY)
|
2015-02-12 20:29:09 +01:00
|
|
|
target_link_libraries(${test} ${RT_LIBRARY} )
|
2014-08-05 13:24:32 +02:00
|
|
|
endif()
|
|
|
|
if(WIN32)
|
2015-02-12 20:29:09 +01:00
|
|
|
add_test(NAME ${test} WORKING_DIRECTORY ${LIBRARY_OUTPUT_PATH} COMMAND ${test})
|
2014-08-05 13:24:32 +02:00
|
|
|
else()
|
2015-02-12 20:29:09 +01:00
|
|
|
add_test(NAME ${test} COMMAND ${test})
|
2014-08-05 13:24:32 +02:00
|
|
|
endif()
|
2015-10-23 00:33:27 +02:00
|
|
|
set_tests_properties(${test} PROPERTIES TIMEOUT 10)
|
2014-08-05 13:24:32 +02:00
|
|
|
endforeach()
|
|
|
|
|
|
|
|
if(NOT WIN32)
|
|
|
|
if(NOT CMAKE_SYSTEM_NAME MATCHES "Linux")
|
|
|
|
set_tests_properties(test_abstract_ipc PROPERTIES WILL_FAIL true)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2015-10-23 16:14:30 +02:00
|
|
|
#Check whether all tests in the current folder are present
|
|
|
|
file(READ "${CMAKE_CURRENT_LIST_FILE}" CURRENT_LIST_FILE_CONTENT)
|
|
|
|
file(GLOB ALL_TEST_SOURCES "test_*.cpp")
|
|
|
|
foreach(TEST_SOURCE ${ALL_TEST_SOURCES})
|
|
|
|
get_filename_component(TESTNAME "${TEST_SOURCE}" NAME_WE)
|
|
|
|
string(REGEX MATCH "${TESTNAME}" MATCH_TESTNAME "${CURRENT_LIST_FILE_CONTENT}")
|
|
|
|
if (NOT MATCH_TESTNAME)
|
|
|
|
message(AUTHOR_WARNING "Test '${TESTNAME}' is not known to CTest.")
|
|
|
|
endif()
|
|
|
|
endforeach()
|