mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-26 01:03:15 +03:00
tests: Run thread tests on Windows
When pthreads is available, run the threads tests on Windows Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
708f127788
commit
e0e0d62a71
@@ -12,6 +12,18 @@ add_cmocka_test(torture_config torture_config.c ${TORTURE_LIBRARY})
|
||||
add_cmocka_test(torture_options torture_options.c ${TORTURE_LIBRARY})
|
||||
add_cmocka_test(torture_isipaddr torture_isipaddr.c ${TORTURE_LIBRARY})
|
||||
add_cmocka_test(torture_knownhosts_parsing torture_knownhosts_parsing.c ${TORTURE_LIBRARY})
|
||||
|
||||
if (CMAKE_USE_PTHREADS_INIT)
|
||||
add_cmocka_test(torture_rand torture_rand.c ${TORTURE_LIBRARY})
|
||||
target_link_libraries(torture_rand Threads::Threads)
|
||||
add_cmocka_test(torture_threads_init torture_threads_init.c ${TORTURE_LIBRARY})
|
||||
target_link_libraries(torture_threads_init Threads::Threads)
|
||||
add_cmocka_test(torture_threads_buffer torture_threads_buffer.c ${TORTURE_LIBRARY})
|
||||
target_link_libraries(torture_threads_buffer Threads::Threads)
|
||||
add_cmocka_test(torture_threads_crypto torture_threads_crypto.c ${TORTURE_LIBRARY})
|
||||
target_link_libraries(torture_threads_crypto Threads::Threads)
|
||||
endif ()
|
||||
|
||||
if (UNIX AND NOT WIN32)
|
||||
# this uses a socketpair
|
||||
add_cmocka_test(torture_packet torture_packet.c ${TORTURE_LIBRARY})
|
||||
@@ -33,14 +45,6 @@ if (UNIX AND NOT WIN32)
|
||||
add_cmocka_test(torture_channel torture_channel.c ${TORTURE_LIBRARY})
|
||||
# requires pthread
|
||||
if (CMAKE_USE_PTHREADS_INIT)
|
||||
add_cmocka_test(torture_rand torture_rand.c ${TORTURE_LIBRARY})
|
||||
target_link_libraries(torture_rand Threads::Threads)
|
||||
add_cmocka_test(torture_threads_init torture_threads_init.c ${TORTURE_LIBRARY})
|
||||
target_link_libraries(torture_threads_init Threads::Threads)
|
||||
add_cmocka_test(torture_threads_buffer torture_threads_buffer.c ${TORTURE_LIBRARY})
|
||||
target_link_libraries(torture_threads_buffer Threads::Threads)
|
||||
add_cmocka_test(torture_threads_crypto torture_threads_crypto.c ${TORTURE_LIBRARY})
|
||||
target_link_libraries(torture_threads_crypto Threads::Threads)
|
||||
add_cmocka_test(torture_threads_pki_rsa torture_threads_pki_rsa.c ${TORTURE_LIBRARY})
|
||||
target_link_libraries(torture_threads_pki_rsa Threads::Threads)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user