From 56b82acb1b15bc779cfb72d0e14eece545a12ffd Mon Sep 17 00:00:00 2001 From: Markus Makela Date: Tue, 14 Oct 2014 19:15:59 +0300 Subject: [PATCH] Fixed CMake builds overwriting MaxScale.cnf when installing after tests were built. --- CMakeLists.txt | 1 + server/CMakeLists.txt | 3 --- server/test/CMakeLists.txt | 3 --- 3 files changed, 1 insertion(+), 6 deletions(-) delete mode 100644 server/test/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index e6fbec0d8..37cc1fc0f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -144,6 +144,7 @@ add_custom_target(buildtests add_custom_target(testall COMMAND ${CMAKE_COMMAND} -DDEPS_OK=Y -DBUILD_TESTS=Y -DBUILD_TYPE=Debug -DINSTALL_DIR=${CMAKE_BINARY_DIR} -DINSTALL_SYSTEM_FILES=N ${CMAKE_SOURCE_DIR} COMMAND make install + COMMAND cp -v ${CMAKE_SOURCE_DIR}/server/test/MaxScale_test.cnf ${CMAKE_BINARY_DIR}/etc/MaxScale.cnf COMMAND /bin/sh -c "${CMAKE_BINARY_DIR}/bin/maxscale -c ${CMAKE_BINARY_DIR} &>/dev/null" COMMAND /bin/sh -c "make test || echo \"Test results written to: ${CMAKE_BINARY_DIR}/Testing/Temporary/\"" COMMAND killall maxscale diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt index a42c625ae..6cd174190 100644 --- a/server/CMakeLists.txt +++ b/server/CMakeLists.txt @@ -1,6 +1,3 @@ add_subdirectory(core) add_subdirectory(modules) add_subdirectory(inih) -if(BUILD_TESTS) -add_subdirectory(test) -endif() \ No newline at end of file diff --git a/server/test/CMakeLists.txt b/server/test/CMakeLists.txt deleted file mode 100644 index 47eb22199..000000000 --- a/server/test/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -if(BUILD_TESTS) - install(FILES MaxScale_test.cnf DESTINATION etc RENAME MaxScale.cnf) -endif()