Commit e395a3ae authored by pieper's avatar pieper
Browse files

BUG: fix discovery of command line modules in test by specifying that the...

BUG: fix discovery of command line modules in test by specifying that the slicer launcher should be used to set up the environment before running the test

git-svn-id: http://svn.slicer.org/Slicer4/trunk@5732 3bd1e089-480b-0410-8dfb-8563597acbee
parent f1343478
......@@ -66,6 +66,7 @@ SET (SLICER_LIBRARIES_DIR "${Slicer3_BINARY_DIR}/${SLICER_INSTALL_LIBRARIES_DIR}
OPTION(BUILD_TESTING "Test the project" ON)
SET(Slicer3_BUILD_TESTING ${BUILD_TESTING})
SET(LAUNCH_EXE ${Slicer3_BINARY_DIR}/Slicer3 --launch)
IF(Slicer3_BUILD_TESTING)
ENABLE_TESTING()
INCLUDE (CTest)
......
......@@ -12,12 +12,17 @@ INCLUDE_DIRECTORIES(
${ModuleDescriptionParser_SOURCE_DIR}
)
SET( EXE_PREFIX ${EXECUTABLE_OUTPUT_PATH} )
IF (WIN32)
SET( EXE_PREFIX ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_BUILD_TYPE})
ENDIF (WIN32)
SET (TEST_DATA ${ModuleDescriptionParserTesting_SOURCE_DIR}/TestData)
ADD_TEST(Parser1Test1 ${EXECUTABLE_OUTPUT_PATH}/Parser1Test ${TEST_DATA}/ParserTest1.xml)
ADD_TEST(Parser1Test1 ${LAUNCH_EXE} ${EXE_PREFIX}/Parser1Test ${TEST_DATA}/ParserTest1.xml)
ADD_TEST(Parser1Test2 ${EXECUTABLE_OUTPUT_PATH}/Parser1Test ${TEST_DATA}/ParserTest2.xml)
ADD_TEST(Parser1Test2 ${LAUNCH_EXE} ${EXE_PREFIX}/Parser1Test ${TEST_DATA}/ParserTest2.xml)
IF(Slicer3_BINARY_DIR)
ADD_TEST(ModuleFactoryTest ${EXECUTABLE_OUTPUT_PATH}/ModuleFactoryTest ${Slicer3_BINARY_DIR}/${SLICER_INSTALL_LIBRARIES_DIR}/Plugins/)
ADD_TEST(ModuleFactoryTest ${LAUNCH_EXE} ${EXE_PREFIX}/ModuleFactoryTest ${Slicer3_BINARY_DIR}/${SLICER_INSTALL_LIBRARIES_DIR}/Plugins/)
ENDIF(Slicer3_BINARY_DIR)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment