From 5dd4f7604f8007df1a11ff0cab55423a622342bc Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 3 Jun 2010 12:36:00 +0200 Subject: [PATCH] tests: Move client tests to a seperate directory. Tests which require a running sshd should go to tests/client. --- DefineOptions.cmake | 2 +- tests/CMakeLists.txt | 3 +++ tests/client/CMakeLists.txt | 4 ++++ tests/{unittests => client}/torture_algorithms.c | 0 tests/{unittests => client}/torture_auth.c | 0 tests/unittests/CMakeLists.txt | 2 -- 6 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 tests/client/CMakeLists.txt rename tests/{unittests => client}/torture_algorithms.c (100%) rename tests/{unittests => client}/torture_auth.c (100%) diff --git a/DefineOptions.cmake b/DefineOptions.cmake index f7a52442..3d9dc642 100644 --- a/DefineOptions.cmake +++ b/DefineOptions.cmake @@ -9,7 +9,7 @@ option(WITH_GCRYPT "Compile against libgcrypt" OFF) option(WITH_PCAP "Compile with Pcap generation support" ON) option(WITH_INTERNAL_DOC "Compile doxygen internal documentation" OFF) option(WITH_TESTING "Build with unit tests" OFF) +option(WITH_CLIENT_TESTING "Build with client tests; requires a running sshd" OFF) if (WITH_TESTING) set(WITH_STATIC_LIB ON) endif (WITH_TESTING) - diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 817d3a73..29986631 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -17,3 +17,6 @@ target_link_libraries(${TORTURE_LIBRARY} ${CHECK_LIBRARIES} ${LIBSSH_STATIC_LIBR set(TEST_TARGET_LIBRARIES ${SUPPORT_LIBRARY} ${LIBSSH_LINK_LIBRARIES}) add_subdirectory(unittests) +if (WITH_CLIENT_TESTING) + add_subdirectory(client) +endif (WITH_CLIENT_TESTING) diff --git a/tests/client/CMakeLists.txt b/tests/client/CMakeLists.txt new file mode 100644 index 00000000..b92f08e6 --- /dev/null +++ b/tests/client/CMakeLists.txt @@ -0,0 +1,4 @@ +project(clienttests C) + +add_check_test(torture_algorithms torture_algorithms.c ${TORTURE_LIBRARY}) +add_check_test(torture_auth torture_auth.c ${TORTURE_LIBRARY}) diff --git a/tests/unittests/torture_algorithms.c b/tests/client/torture_algorithms.c similarity index 100% rename from tests/unittests/torture_algorithms.c rename to tests/client/torture_algorithms.c diff --git a/tests/unittests/torture_auth.c b/tests/client/torture_auth.c similarity index 100% rename from tests/unittests/torture_auth.c rename to tests/client/torture_auth.c diff --git a/tests/unittests/CMakeLists.txt b/tests/unittests/CMakeLists.txt index 3ac043cf..8eb7d296 100644 --- a/tests/unittests/CMakeLists.txt +++ b/tests/unittests/CMakeLists.txt @@ -1,10 +1,8 @@ project(unittests C) -add_check_test(torture_algorithms torture_algorithms.c ${TORTURE_LIBRARY}) add_check_test(torture_init torture_init.c ${TORTURE_LIBRARY}) add_check_test(torture_list torture_list.c ${TORTURE_LIBRARY}) add_check_test(torture_misc torture_misc.c ${TORTURE_LIBRARY}) -add_check_test(torture_auth torture_auth.c ${TORTURE_LIBRARY}) add_check_test(torture_keyfiles torture_keyfiles.c ${TORTURE_LIBRARY}) add_check_test(torture_options torture_options.c ${TORTURE_LIBRARY}) add_check_test(torture_knownhosts torture_knownhosts.c ${TORTURE_LIBRARY})