2 #! \brief Add a custom test for MITK module 4 #! \param test_name Unique identifier for the test 5 #! \param test_function Name of the test function (the one with the argc,argv signature) 7 #! Additional parameters will be passed as command line parameters to the test. 13 set(xvfb_run
"xvfb-run" "--auto-servernum")
17 add_test(
NAME ${test_name} COMMAND ${xvfb_run} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TESTDRIVER} ${test_function} ${ARGN})
18 set_property(TEST ${test_name} PROPERTY LABELS ${MODULE_SUBPROJECTS} MITK)
21 set(test_env_path ${MITK_RUNTIME_PATH_RELEASE} ${MITK_RUNTIME_PATH_DEBUG} $ENV{PATH})
22 list(REMOVE_DUPLICATES test_env_path)
23 string (REGEX REPLACE
"\;" "\\\;" test_env_path
"${test_env_path}")
24 set_property(TEST ${test_name} PROPERTY ENVIRONMENT
"PATH=${test_env_path}" APPEND)
25 set_property(TEST ${test_name} PROPERTY SKIP_RETURN_CODE 77)
mitkFunctionGetLibrarySearchPaths(search_path, intermediate_dir)
mitkAddCustomModuleTest(test_name, test_function)
Add a custom test for MITK module.