2010-06-03 14:36:00 +04:00
|
|
|
project(clienttests C)
|
|
|
|
|
2014-10-13 12:00:25 +04:00
|
|
|
find_package(socket_wrapper)
|
|
|
|
|
|
|
|
set(LIBSSH_CLIENT_TESTS
|
2015-09-10 15:46:43 +03:00
|
|
|
torture_algorithms
|
2018-10-30 14:55:19 +03:00
|
|
|
torture_client_config
|
2015-09-10 15:07:51 +03:00
|
|
|
torture_connect
|
2018-06-26 13:24:14 +03:00
|
|
|
torture_hostkey
|
2015-09-10 16:07:12 +03:00
|
|
|
torture_auth
|
2018-11-16 14:49:08 +03:00
|
|
|
torture_rekey
|
2015-09-10 16:40:00 +03:00
|
|
|
torture_forward
|
2015-09-11 12:24:53 +03:00
|
|
|
torture_knownhosts
|
2018-02-04 20:33:19 +03:00
|
|
|
torture_knownhosts_verify
|
2015-09-11 15:25:59 +03:00
|
|
|
torture_proxycommand
|
2015-09-11 17:08:35 +03:00
|
|
|
torture_session
|
2019-06-25 14:27:41 +03:00
|
|
|
torture_request_env
|
|
|
|
torture_client_global_requests)
|
2014-10-13 12:00:25 +04:00
|
|
|
|
2019-10-25 14:27:48 +03:00
|
|
|
find_program(SCP_EXECUTABLE NAMES scp)
|
|
|
|
if (SCP_EXECUTABLE)
|
|
|
|
set(LIBSSH_CLIENT_TESTS
|
|
|
|
${LIBSSH_CLIENT_TESTS}
|
|
|
|
torture_scp)
|
|
|
|
endif()
|
|
|
|
|
2019-12-20 11:16:29 +03:00
|
|
|
if (WITH_PKCS11_URI)
|
|
|
|
set(LIBSSH_CLIENT_TESTS
|
|
|
|
${LIBSSH_CLIENT_TESTS}
|
|
|
|
torture_auth_pkcs11)
|
|
|
|
endif()
|
|
|
|
|
2018-10-16 09:56:46 +03:00
|
|
|
if (DEFAULT_C_NO_DEPRECATION_FLAGS)
|
|
|
|
set_source_files_properties(torture_knownhosts.c
|
|
|
|
PROPERTIES
|
|
|
|
COMPILE_FLAGS ${DEFAULT_C_NO_DEPRECATION_FLAGS})
|
|
|
|
endif()
|
2019-10-25 14:27:48 +03:00
|
|
|
|
2015-09-11 17:26:53 +03:00
|
|
|
if (WITH_SFTP)
|
2018-09-04 15:22:40 +03:00
|
|
|
if (WITH_BENCHMARKS)
|
|
|
|
set(SFTP_BENCHMARK_TESTS
|
|
|
|
torture_sftp_benchmark)
|
|
|
|
endif()
|
2015-09-11 17:26:53 +03:00
|
|
|
set(LIBSSH_CLIENT_TESTS
|
|
|
|
${LIBSSH_CLIENT_TESTS}
|
2015-09-16 09:43:49 +03:00
|
|
|
torture_sftp_ext
|
2018-09-04 19:12:55 +03:00
|
|
|
torture_sftp_canonicalize_path
|
2015-09-16 09:41:19 +03:00
|
|
|
torture_sftp_dir
|
2016-10-08 14:38:56 +03:00
|
|
|
torture_sftp_read
|
2018-09-04 15:22:40 +03:00
|
|
|
torture_sftp_fsync
|
|
|
|
${SFTP_BENCHMARK_TESTS})
|
2015-09-11 17:26:53 +03:00
|
|
|
endif (WITH_SFTP)
|
|
|
|
|
2014-10-13 12:00:25 +04:00
|
|
|
foreach(_CLI_TEST ${LIBSSH_CLIENT_TESTS})
|
2018-09-21 14:10:54 +03:00
|
|
|
add_cmocka_test(${_CLI_TEST}
|
|
|
|
SOURCES ${_CLI_TEST}.c
|
|
|
|
COMPILE_OPTIONS ${DEFAULT_C_COMPILE_FLAGS}
|
|
|
|
LINK_LIBRARIES ${TORTURE_LIBRARY}
|
|
|
|
)
|
2014-10-13 12:00:25 +04:00
|
|
|
|
|
|
|
if (OSX)
|
|
|
|
set_property(
|
|
|
|
TEST
|
|
|
|
${_CLI_TEST}
|
|
|
|
PROPERTY
|
|
|
|
ENVIRONMENT DYLD_FORCE_FLAT_NAMESPACE=1;DYLD_INSERT_LIBRARIES=${SOCKET_WRAPPER_LIBRARY})
|
|
|
|
else ()
|
|
|
|
set_property(
|
|
|
|
TEST
|
|
|
|
${_CLI_TEST}
|
|
|
|
PROPERTY
|
|
|
|
ENVIRONMENT ${TORTURE_ENVIRONMENT})
|
|
|
|
endif()
|
|
|
|
endforeach()
|