diff --git a/server/test/CMakeLists.txt b/server/test/CMakeLists.txt index 7f0d55bf6..ebddebef2 100644 --- a/server/test/CMakeLists.txt +++ b/server/test/CMakeLists.txt @@ -1,7 +1,7 @@ file(COPY MaxScale_test.cnf DESTINATION ${CMAKE_BINARY_DIR}/etc) file(RENAME ${CMAKE_BINARY_DIR}/etc/MaxScale_test.cnf ${CMAKE_BINARY_DIR}/etc/MaxScale.cnf) -add_test(NAME RunExecutable COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/startmaxscale.sh "$" "-c ${CMAKE_BINARY_DIR}") -set_tests_properties(RunExecutable PROPERTIES TIMEOUT 5) +add_test(NAME RunExecutable COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/startmaxscale.sh "${CMAKE_BINARY_DIR}/bin/" "-c ${CMAKE_BINARY_DIR}") +set_tests_properties(RunExecutable PROPERTIES TIMEOUT 2) add_test(NAME KillExecutable COMMAND killall -KILL maxscale) set_tests_properties(KillExecutable PROPERTIES DEPENDS StackHintTest ) #this needs to be the last test that requires a running maxscale diff --git a/server/test/startmaxscale.sh b/server/test/startmaxscale.sh index b67aebbf3..979034476 100755 --- a/server/test/startmaxscale.sh +++ b/server/test/startmaxscale.sh @@ -1,5 +1,5 @@ #!/bin/sh killall -KILL maxscale sleep 1 -/bin/sh $1/maxscale $2 & +setsid $1/maxscale $2 exit 0