2010-03-02 15:47:14 +03:00
|
|
|
project(unittests C)
|
|
|
|
|
2015-05-05 20:04:49 +03:00
|
|
|
include_directories(${OPENSSL_INCLUDE_DIR})
|
|
|
|
|
2012-10-07 13:10:27 +04:00
|
|
|
add_cmocka_test(torture_buffer torture_buffer.c ${TORTURE_LIBRARY})
|
|
|
|
add_cmocka_test(torture_callbacks torture_callbacks.c ${TORTURE_LIBRARY})
|
2015-09-17 15:05:41 +03:00
|
|
|
add_cmocka_test(torture_crypto torture_crypto.c ${TORTURE_LIBRARY})
|
2012-10-07 13:10:27 +04:00
|
|
|
add_cmocka_test(torture_init torture_init.c ${TORTURE_LIBRARY})
|
|
|
|
add_cmocka_test(torture_list torture_list.c ${TORTURE_LIBRARY})
|
|
|
|
add_cmocka_test(torture_misc torture_misc.c ${TORTURE_LIBRARY})
|
2017-08-24 16:09:08 +03:00
|
|
|
add_cmocka_test(torture_config torture_config.c ${TORTURE_LIBRARY})
|
2012-10-07 13:10:27 +04:00
|
|
|
add_cmocka_test(torture_options torture_options.c ${TORTURE_LIBRARY})
|
|
|
|
add_cmocka_test(torture_isipaddr torture_isipaddr.c ${TORTURE_LIBRARY})
|
2017-02-05 22:30:04 +03:00
|
|
|
add_cmocka_test(torture_knownhosts_parsing torture_knownhosts_parsing.c ${TORTURE_LIBRARY})
|
2018-07-04 19:35:58 +03:00
|
|
|
|
|
|
|
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 ()
|
|
|
|
|
2010-12-29 22:33:32 +03:00
|
|
|
if (UNIX AND NOT WIN32)
|
2018-06-29 11:57:36 +03:00
|
|
|
# this uses a socketpair
|
|
|
|
add_cmocka_test(torture_packet torture_packet.c ${TORTURE_LIBRARY})
|
|
|
|
|
2011-01-01 20:50:32 +03:00
|
|
|
# requires ssh-keygen
|
2012-10-07 13:10:27 +04:00
|
|
|
add_cmocka_test(torture_keyfiles torture_keyfiles.c ${TORTURE_LIBRARY})
|
|
|
|
add_cmocka_test(torture_pki torture_pki.c ${TORTURE_LIBRARY})
|
2018-01-09 01:10:07 +03:00
|
|
|
add_cmocka_test(torture_pki_rsa torture_pki_rsa.c ${TORTURE_LIBRARY})
|
2018-01-09 01:12:06 +03:00
|
|
|
add_cmocka_test(torture_pki_ed25519 torture_pki_ed25519.c ${TORTURE_LIBRARY})
|
2018-01-08 23:49:49 +03:00
|
|
|
|
|
|
|
if (HAVE_DSA)
|
|
|
|
add_cmocka_test(torture_pki_dsa torture_pki_dsa.c ${TORTURE_LIBRARY})
|
|
|
|
endif()
|
2018-01-09 00:36:53 +03:00
|
|
|
if (HAVE_ECC)
|
|
|
|
add_cmocka_test(torture_pki_ecdsa torture_pki_ecdsa.c ${TORTURE_LIBRARY})
|
|
|
|
endif()
|
|
|
|
|
2013-10-31 15:44:48 +04:00
|
|
|
# requires /dev/null
|
|
|
|
add_cmocka_test(torture_channel torture_channel.c ${TORTURE_LIBRARY})
|
2015-09-07 08:46:11 +03:00
|
|
|
# requires pthread
|
2018-07-02 14:03:12 +03:00
|
|
|
if (CMAKE_USE_PTHREADS_INIT)
|
2018-07-04 18:26:39 +03:00
|
|
|
add_cmocka_test(torture_threads_pki_rsa torture_threads_pki_rsa.c ${TORTURE_LIBRARY})
|
|
|
|
target_link_libraries(torture_threads_pki_rsa Threads::Threads)
|
2018-07-04 14:55:24 +03:00
|
|
|
|
2016-11-02 13:10:54 +03:00
|
|
|
# Not working correctly
|
|
|
|
#if (WITH_SERVER)
|
|
|
|
# add_cmocka_test(torture_server_x11 torture_server_x11.c ${TORTURE_LIBRARY})
|
|
|
|
#endif (WITH_SERVER)
|
2018-07-02 14:03:12 +03:00
|
|
|
endif ()
|
2010-12-29 22:33:32 +03:00
|
|
|
endif (UNIX AND NOT WIN32)
|