Fixed CMake builds overwriting MaxScale.cnf when installing after tests were built.

This commit is contained in:
Markus Makela 2014-10-14 19:15:59 +03:00
parent 80e4d733bd
commit 56b82acb1b
3 changed files with 1 additions and 6 deletions

View File

@ -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

View File

@ -1,6 +1,3 @@
add_subdirectory(core)
add_subdirectory(modules)
add_subdirectory(inih)
if(BUILD_TESTS)
add_subdirectory(test)
endif()

View File

@ -1,3 +0,0 @@
if(BUILD_TESTS)
install(FILES MaxScale_test.cnf DESTINATION etc RENAME MaxScale.cnf)
endif()