Added hint tests

Fixed readwritesplit tests looking for test input in the wrong directory
Updated the canonical query test expected output
This commit is contained in:
Markus Makela
2014-09-15 09:27:47 +03:00
parent 5d26cf6fd5
commit 0f07c9f08c
8 changed files with 59 additions and 55 deletions

View File

@ -1,5 +1,5 @@
add_test(NAME RunExecutable COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/startmaxscale.sh $<TARGET_FILE:maxscale> "-c ${CMAKE_BINARY_DIR}/")
add_test(NAME WaitForExecutable COMMAND sleep 5)
add_test(NAME KillExecutable COMMAND killall maxscale)
set_tests_properties(WaitForExecutable PROPERTIES DEPENDS RunExecutable)
set_tests_properties(KillExecutable PROPERTIES DEPENDS ReadWriteSplitTest)
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 10)
set_tests_properties(RunExecutable PROPERTIES WILL_FAIL TRUE)

6
server/test/startmaxscale.sh Normal file → Executable file
View File

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