2010-06-03 12:36:00 +02:00
|
|
|
project(clienttests C)
|
|
|
|
|
2014-10-13 10:00:25 +02:00
|
|
|
find_package(socket_wrapper)
|
|
|
|
|
|
|
|
set(LIBSSH_CLIENT_TESTS
|
2015-09-10 14:46:43 +02:00
|
|
|
torture_algorithms
|
2018-10-30 12:55:19 +01:00
|
|
|
torture_client_config
|
2015-09-10 14:07:51 +02:00
|
|
|
torture_connect
|
2018-06-26 12:24:14 +02:00
|
|
|
torture_hostkey
|
2015-09-10 15:07:12 +02:00
|
|
|
torture_auth
|
2018-11-16 12:49:08 +01:00
|
|
|
torture_rekey
|
2015-09-10 15:40:00 +02:00
|
|
|
torture_forward
|
2015-09-11 11:24:53 +02:00
|
|
|
torture_knownhosts
|
2018-02-04 18:33:19 +01:00
|
|
|
torture_knownhosts_verify
|
2015-09-11 14:25:59 +02:00
|
|
|
torture_proxycommand
|
2015-09-11 16:08:35 +02:00
|
|
|
torture_session
|
2019-06-25 13:27:41 +02:00
|
|
|
torture_request_env
|
|
|
|
torture_client_global_requests)
|
2014-10-13 10:00:25 +02:00
|
|
|
|
2019-10-25 13:27:48 +02:00
|
|
|
find_program(SCP_EXECUTABLE NAMES scp)
|
|
|
|
if (SCP_EXECUTABLE)
|
|
|
|
set(LIBSSH_CLIENT_TESTS
|
|
|
|
${LIBSSH_CLIENT_TESTS}
|
|
|
|
torture_scp)
|
|
|
|
endif()
|
|
|
|
|
2019-12-20 09:16:29 +01:00
|
|
|
if (WITH_PKCS11_URI)
|
|
|
|
set(LIBSSH_CLIENT_TESTS
|
|
|
|
${LIBSSH_CLIENT_TESTS}
|
|
|
|
torture_auth_pkcs11)
|
|
|
|
endif()
|
|
|
|
|
2018-10-16 08:56:46 +02: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 13:27:48 +02:00
|
|
|
|
2015-09-11 16:26:53 +02:00
|
|
|
if (WITH_SFTP)
|
2018-09-04 14:22:40 +02:00
|
|
|
if (WITH_BENCHMARKS)
|
|
|
|
set(SFTP_BENCHMARK_TESTS
|
|
|
|
torture_sftp_benchmark)
|
|
|
|
endif()
|
2015-09-11 16:26:53 +02:00
|
|
|
set(LIBSSH_CLIENT_TESTS
|
|
|
|
${LIBSSH_CLIENT_TESTS}
|
2015-09-16 08:43:49 +02:00
|
|
|
torture_sftp_ext
|
2018-09-04 18:12:55 +02:00
|
|
|
torture_sftp_canonicalize_path
|
2015-09-16 08:41:19 +02:00
|
|
|
torture_sftp_dir
|
2016-10-08 13:38:56 +02:00
|
|
|
torture_sftp_read
|
2018-09-04 14:22:40 +02:00
|
|
|
torture_sftp_fsync
|
|
|
|
${SFTP_BENCHMARK_TESTS})
|
2015-09-11 16:26:53 +02:00
|
|
|
endif (WITH_SFTP)
|
|
|
|
|
2014-10-13 10:00:25 +02:00
|
|
|
foreach(_CLI_TEST ${LIBSSH_CLIENT_TESTS})
|
2018-09-21 13:10:54 +02:00
|
|
|
add_cmocka_test(${_CLI_TEST}
|
|
|
|
SOURCES ${_CLI_TEST}.c
|
|
|
|
COMPILE_OPTIONS ${DEFAULT_C_COMPILE_FLAGS}
|
|
|
|
LINK_LIBRARIES ${TORTURE_LIBRARY}
|
|
|
|
)
|
2014-10-13 10:00:25 +02: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()
|