From 010b828759d2a43ee774522524c18e9d94eb1333 Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Sun, 17 Sep 2006 16:49:31 +0200 Subject: [PATCH] implemented testsuite --- CMakeLists.txt | 1 + src/test/CMakeLists.txt | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 0 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c668d2..ccbd371 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -198,6 +198,7 @@ set(bindir "${prefix}/${_bin}") set(pkgconfdir "${libdir}/pkgconfig") set(includedir "${prefix}/include") +enable_testing() add_subdirectory(lib) add_subdirectory(Windows) diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt new file mode 100644 index 0000000..3deb9cb --- /dev/null +++ b/src/test/CMakeLists.txt @@ -0,0 +1,27 @@ +# -*- cmake -*- + +set(test_SOURCES + test.c abyss.c cgi.c method_registry.c parse_xml.c serialize.c server_abyss.c + value.c xml_data.c) + +if(MUST_BUILD_CLIENT) + list(APPEND test_SOURCES client.c) + list(APPEND test_LIBS xmlrpc_client) +else(MUST_BUILD_CLIENT) + list(APPEND test_SOURCES client_dummy.c) +endif(MUST_BUILD_CLIENT) + + +add_executable(src-test ${test_SOURCES}) +target_link_libraries(src-test xmlrpc_server_abyss util ${test_LIBS}) + +add_executable(cgitest1 cgitest1.c) +target_link_libraries(cgitest1 xmlrpc_server_cgi) + +add_custom_command(TARGET src-test + POST_BUILD + COMMAND rm -f ${CMAKE_CURRENT_BINARY_DIR}/data + COMMAND ln -s ${CMAKE_CURRENT_SOURCE_DIR}/data ${CMAKE_CURRENT_BINARY_DIR}) + +enable_testing() +add_test(runtests src-test) -- 1.4.2