added a 'testall' target which builds and runs the tests

This commit is contained in:
Markus Makela
2014-09-17 10:39:47 +03:00
parent cde74cfaa5
commit 3776fdb015
6 changed files with 16 additions and 20 deletions

View File

@ -2,7 +2,6 @@ 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 "$<TARGET_FILE_DIR:maxscale>" "-c ${CMAKE_BINARY_DIR}")
set_tests_properties(RunExecutable PROPERTIES TIMEOUT 5)
set_tests_properties(RunExecutable PROPERTIES WILL_FAIL TRUE)
add_test(NAME KillExecutable COMMAND killall -KILL maxscale)
set_tests_properties(KillExecutable PROPERTIES DEPENDS StackHintTest )
set_tests_properties(KillExecutable PROPERTIES DEPENDS StackHintTest ) #this needs to be the last test that requires a running maxscale

View File

@ -1,6 +1,5 @@
#!/bin/sh
killall -KILL maxscale
sleep 1
nohup $1/maxscale $2 &
trap "echo trap triggered." SIGABRT
/bin/sh $1/maxscale $2 &
exit 0