Files
libssh/tests/server/CMakeLists.txt
Gauravsingh Sisodia 74d42ca38b feat: add tests for gssapi-with-mic
feat: tests set hostname for sshd, make GSSAPIStrictAcceptorCheck yes pass

feat: add GSSAPI_TESTING cmake option

feat: gssapi libssh server test

feat: make kdc setup and teardown functions

feat: add kinit, kadmin scripts to kdc setup function

feat: add some client gssapi auth tests

Signed-off-by: Gauravsingh Sisodia <xaerru@gmail.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Sahana Prasad <sahana@redhat.com>
2024-07-11 16:44:07 +02:00

58 lines
1.5 KiB
CMake

project(servertests C)
if (WITH_SERVER AND UNIX AND NOT WIN32)
find_package(socket_wrapper)
add_subdirectory(test_server)
set(LIBSSH_SERVER_TESTS
torture_server_default
torture_server_auth_kbdint
torture_server_config
torture_server_algorithms
torture_sftpserver
)
if (WITH_GSSAPI AND GSSAPI_FOUND AND GSSAPI_TESTING)
set(LIBSSH_SERVER_TESTS
${LIBSSH_SERVER_TESTS}
torture_gssapi_server_auth)
endif()
include_directories(${libssh_SOURCE_DIR}/include
${libssh_BINARY_DIR}/include
${libssh_BINARY_DIR}
test_server)
set(TORTURE_SERVER_ENVIRONMENT ${TORTURE_ENVIRONMENT})
list(APPEND TORTURE_SERVER_ENVIRONMENT NSS_WRAPPER_HOSTS=${CMAKE_BINARY_DIR}/tests/etc/hosts)
if (ARGP_INCLUDE_DIR)
include_directories(${ARGP_INCLUDE_DIR})
endif ()
foreach(_SRV_TEST ${LIBSSH_SERVER_TESTS})
add_cmocka_test(${_SRV_TEST}
SOURCES ${_SRV_TEST}.c
COMPILE_OPTIONS ${DEFAULT_C_COMPILE_FLAGS}
LINK_LIBRARIES ${TORTURE_LIBRARY} testserver util
)
if (OSX)
set_property(
TEST
${_SRV_TEST}
PROPERTY
ENVIRONMENT DYLD_FORCE_FLAT_NAMESPACE=1;DYLD_INSERT_LIBRARIES=${SOCKET_WRAPPER_LIBRARY})
else ()
set_property(
TEST
${_SRV_TEST}
PROPERTY
ENVIRONMENT ${TORTURE_SERVER_ENVIRONMENT})
endif()
endforeach()
endif (WITH_SERVER AND UNIX AND NOT WIN32)