From e5ab9a2b9f145080ca95a699d112aed77255c83a Mon Sep 17 00:00:00 2001 From: Markus Makela Date: Wed, 24 Sep 2014 14:22:10 +0300 Subject: [PATCH] changed the way MaxScale starts when testing. Now the test times out but the executable is surely started. --- server/test/CMakeLists.txt | 4 ++-- server/test/startmaxscale.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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