Commit aceee71e authored by saubatn's avatar saubatn
Browse files

FIXED Error in configuring tests.

UPDATED Better readibility on tests names.

git-svn-id: svn+ssh://scm.forge.imag.fr/var/lib/gforge/chroot/scmrepos/svn/camitk/trunk/camitk@2196 ec899d31-69d1-42ba-9299-647d76f65fb3
parent 582d0c62
......@@ -50,11 +50,12 @@ macro(camitk_add_test)
"" # possible options
${ARGN}
)
math(EXPR CAMITK_TEST_ID "${CAMITK_TEST_ID} + 1")
set(CAMITK_TEST_NAME "${CAMITK_TEST_BASENAME}${CAMITK_ADD_TEST_TEST_SUFFIX}${CAMITK_TEST_ID}")
set(CAMITK_TEST_NAME "${CAMITK_ADD_TEST_PROJECT_NAME}${CAMITK_ADD_TEST_TEST_SUFFIX}${CAMITK_TEST_ID}")
set(CAMITK_TEST_LIST ${CAMITK_TEST_LIST} ${CAMITK_TEST_NAME})
# message(STATUS "Configuring test ${CAMITK_TEST_NAME}")
# message(STATUS "Configuring test ${CAMITK_TEST_NAME}")
# determine cmake macro path
if (NOT EXISTS SDK_TOP_LEVEL_SOURCE_DIR)
......
......@@ -1409,7 +1409,7 @@ macro(camitk_extension)
set( TESTLEVEL ${LEVEL3} )
# 1st test should pass because application test runs with no arguments - shows usage and exit success
camitk_add_test( TEST_SUFFIX LEVEL${LEVEL0}_
camitk_add_test( TEST_SUFFIX [LEVEL0]
PROJECT_NAME ${${TYPE_EXTENSION_CMAKE}_TARGET_NAME}
)
......@@ -1439,7 +1439,7 @@ macro(camitk_extension)
-c ${CAMITK_BUILD_PRIVATE_LIB_DIR}/${TYPE_EXTENSION}s/${${TYPE_EXTENSION_CMAKE}_OUTPUT_NAME}${CAMITK_DEBUG_POSTFIX}.dll
-l ${TESTLEVEL}"
PASS_FILE_OUTPUT ${CAMITK_BUILD_TESTDATA_DIR}/ctestdata/${DATA_FILE}
TEST_SUFFIX LEVEL ${TESTLEVEL}_
TEST_SUFFIX [LEVEL${TESTLEVEL}]
PROJECT_NAME ${${TYPE_EXTENSION_CMAKE}_TARGET_NAME}
)
elseif(APPLE)
......@@ -1447,7 +1447,7 @@ macro(camitk_extension)
-c ${CAMITK_BUILD_PRIVATE_LIB_DIR}/${TYPE_EXTENSION}s/lib${${TYPE_EXTENSION_CMAKE}_OUTPUT_NAME}.dylib
-l ${TESTLEVEL}"
PASS_FILE_OUTPUT ${CAMITK_BUILD_TESTDATA_DIR}/ctestdata/${DATA_FILE}
TEST_SUFFIX LEVEL ${TESTLEVEL}_
TEST_SUFFIX [LEVEL${TESTLEVEL}]
PROJECT_NAME ${${TYPE_EXTENSION_CMAKE}_TARGET_NAME}
)
elseif(UNIX)
......@@ -1455,7 +1455,7 @@ macro(camitk_extension)
-c ${CAMITK_BUILD_PRIVATE_LIB_DIR}/${TYPE_EXTENSION}s/lib${${TYPE_EXTENSION_CMAKE}_OUTPUT_NAME}.so
-l ${TESTLEVEL}"
PASS_FILE_OUTPUT ${CAMITK_BUILD_TESTDATA_DIR}/ctestdata/${DATA_FILE}
TEST_SUFFIX LEVEL ${TESTLEVEL}_
TEST_SUFFIX [LEVEL${TESTLEVEL}]
PROJECT_NAME ${${TYPE_EXTENSION_CMAKE}_TARGET_NAME}
)
endif()
......@@ -1469,21 +1469,21 @@ macro(camitk_extension)
camitk_add_test( EXECUTABLE_ARGS "-i ${CAMITK_BUILD_TESTDATA_DIR}/ctestdata/${DATA_FILE}
-c ${CAMITK_BUILD_PRIVATE_LIB_DIR}/${TYPE_EXTENSION}s/${${TYPE_EXTENSION_CMAKE}_OUTPUT_NAME}${CAMITK_DEBUG_POSTFIX}.dll
-l ${TESTLEVEL}"
TEST_SUFFIX LEVEL ${TESTLEVEL}_
TEST_SUFFIX [LEVEL${TESTLEVEL}]
PROJECT_NAME ${${TYPE_EXTENSION_CMAKE}_TARGET_NAME}
)
elseif(APPLE)
camitk_add_test( EXECUTABLE_ARGS "-i ${CAMITK_BUILD_TESTDATA_DIR}/ctestdata/${DATA_FILE}
-c ${CAMITK_BUILD_PRIVATE_LIB_DIR}/${TYPE_EXTENSION}s/lib${${TYPE_EXTENSION_CMAKE}_OUTPUT_NAME}.dylib
-l ${TESTLEVEL}"
TEST_SUFFIX LEVEL ${TESTLEVEL}_
TEST_SUFFIX [LEVEL${TESTLEVEL}]
PROJECT_NAME ${${TYPE_EXTENSION_CMAKE}_TARGET_NAME}
)
elseif(UNIX)
camitk_add_test( EXECUTABLE_ARGS "-i ${CAMITK_BUILD_TESTDATA_DIR}/ctestdata/${DATA_FILE}
-c ${CAMITK_BUILD_PRIVATE_LIB_DIR}/${TYPE_EXTENSION}s/lib${${TYPE_EXTENSION_CMAKE}_OUTPUT_NAME}.so
-l ${TESTLEVEL}"
TEST_SUFFIX LEVEL ${TESTLEVEL}_
TEST_SUFFIX [LEVEL${TESTLEVEL}]
PROJECT_NAME ${${TYPE_EXTENSION_CMAKE}_TARGET_NAME}
)
endif()
......@@ -1506,7 +1506,7 @@ macro(camitk_extension)
get_directory_name( ${CMAKE_CURRENT_SOURCE_DIR} COMP_DIR_NAME )
# Test should pass because application test runs with no arguments - shows usage and exit success
camitk_add_test( TEST_SUFFIX LEVEL${LEVEL0}_ PROJECT_NAME ${${TYPE_EXTENSION_CMAKE}_TARGET_NAME} )
camitk_add_test( TEST_SUFFIX [LEVEL0] PROJECT_NAME ${${TYPE_EXTENSION_CMAKE}_TARGET_NAME} )
#get the names of actions .dlls in lib directory
get_subdirectoryfiles( ${CAMITK_BUILD_PRIVATE_LIB_DIR}/actions/ ACTIONSDLLS )
......@@ -1520,19 +1520,19 @@ macro(camitk_extension)
if(MSVC)
camitk_add_test( EXECUTABLE_ARGS "-i ${CAMITK_BUILD_TESTDATA_DIR}/ctestdata/${ACTION_TESTDATA_FILE}
-a lib${${TYPE_EXTENSION_CMAKE}_OUTPUT_NAME}${CAMITK_DEBUG_POSTFIX}.dll"
TEST_SUFFIX ${COMP_DIR_NAME}
TEST_SUFFIX [LEVEL1]
PROJECT_NAME ${${TYPE_EXTENSION_CMAKE}_TARGET_NAME}
)
elseif(APPLE)
camitk_add_test( EXECUTABLE_ARGS "-i ${CAMITK_BUILD_TESTDATA_DIR}/ctestdata/${ACTION_TESTDATA_FILE}
-a lib${${TYPE_EXTENSION_CMAKE}_OUTPUT_NAME}.dylib"
TEST_SUFFIX ${COMP_DIR_NAME}
TEST_SUFFIX [LEVEL1]
PROJECT_NAME ${${TYPE_EXTENSION_CMAKE}_TARGET_NAME}
)
elseif(UNIX)
camitk_add_test( EXECUTABLE_ARGS "-i ${CAMITK_BUILD_TESTDATA_DIR}/ctestdata/${ACTION_TESTDATA_FILE}
-a lib${${TYPE_EXTENSION_CMAKE}_OUTPUT_NAME}.so"
TEST_SUFFIX LEVEL1_
TEST_SUFFIX [LEVEL1]
PROJECT_NAME ${${TYPE_EXTENSION_CMAKE}_TARGET_NAME}
)
endif()
......
Supports Markdown
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