Commit 78cc2892 authored by Emmanuel Promayon's avatar Emmanuel Promayon
Browse files

Merge branch 'bug/gitlab-#3-fix-additional-test' into 'develop'

fix additional test

Closes #3

See merge request !12
parents 15033ab0 c728922f
......@@ -155,9 +155,6 @@ while (${CTEST_ELAPSED_TIME} LESS ${CONTINUOUS_BUILD_DURATION})
set(CTEST_BUILD_TARGET ${subproject})
ctest_build()
ctest_submit(PARTS Build)
# build binary for testing
set(CTEST_BUILD_TARGET ${subproject}test)
ctest_build()
# Run tests
ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}" INCLUDE_LABEL "${subproject}")
......
......@@ -174,16 +174,11 @@ foreach(subproject ${CAMITK_SUBPROJECTS})
ctest_build()
ctest_submit(PARTS Build)
# building binary for testing
message(STATUS "- Building tests for ${subproject}...")
set(CTEST_BUILD_TARGET ${subproject}test)
ctest_build()
# Run tests
# run tests
message(STATUS "- Running tests for ${subproject}...")
ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}" INCLUDE_LABEL "${subproject}")
ctest_submit(PARTS Test)
endforeach()
endforeach()
# ------------------------ STEP 4: Test coverage ------------------------
message(STATUS "- Running test coverage ${subproject}...")
......
......@@ -159,9 +159,6 @@ foreach(subproject ${CAMITK_SUBPROJECTS})
set(CTEST_BUILD_TARGET ${subproject})
ctest_build()
ctest_submit(PARTS Build)
# building binary for testing
set(CTEST_BUILD_TARGET ${subproject}test)
ctest_build()
# Run tests
ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}" INCLUDE_LABEL "${subproject}")
......
......@@ -24,22 +24,17 @@
#! testdata dir are used.
#! If provided, only the filenames are required (not the absolute paths) and
#! all the given files should be in the testdata subdir.
#! \param TEST_SUFFIX Optional. suffix name for the additional test. default value is the name of the
#! current component extension.
#!
#! This will add tests named as follow:
#! "component-[name of the current component extension]-additional-[name of the action extension]-level1-[index]"
#!
#! @sa camitk_extension
macro(camitk_additional_action_test)
if (NOT PACKAGING_NSIS AND BUILD_TESTING)
set(options "")
set(oneValueArgs TEST_SUFFIX)
set(oneValueArgs "")
set(multiValueArgs ACTION_EXTENSIONS TEST_FILES)
cmake_parse_arguments(CAMITK_ADDITIONAL_ACTION_TEST "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
if (CAMITK_ADDITIONAL_ACTION_TEST_TEST_SUFFIX)
set(CAMITK_ADDITIONAL_ACTION_TEST_SUFFIX ${CAMITK_ADDITIONAL_ACTION_TEST_TEST_SUFFIX})
else()
set(CAMITK_ADDITIONAL_ACTION_TEST_SUFFIX ${EXTENSION_NAME})
endif()
cmake_parse_arguments(CAMITK_ADDITIONAL_ACTION_TEST "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
# COMPONENT_EXTENSION_PLUGIN_FILE
# determine the extension full file name depending on the plateform
......@@ -99,6 +94,7 @@ macro(camitk_additional_action_test)
camitk_init_test(camitk-testactions)
endif()
# add a separator to the wiki page information
camitk_parse_test_add_separator(EXTENSION_TYPE actions EXTENSION_NAME ${ACTION_EXTENSION})
# Retrieve the files in testdata directory - a test will be applied for each of these files
......@@ -116,9 +112,10 @@ macro(camitk_additional_action_test)
foreach( ACTION_TESTDATA_FILE ${TESTFILES})
# Test procedure: Open a file - load an action extension - Apply an action on the component wrapping the file
camitk_add_test(EXECUTABLE_ARGS "-i ${ACTION_TESTDATA_FILE} -a ${ACTION_EXTENSION_PLUGIN_FILE} ${ADDITIONAL_COMPONENT_EXTENSION_ARG}"
TEST_SUFFIX "-additional-${CAMITK_ADDITIONAL_ACTION_TEST_SUFFIX}-level1-"
PROJECT_NAME "action-${ACTION_EXTENSION}"
TEST_SUFFIX "-additional-${ACTION_EXTENSION}-level1-"
PROJECT_NAME "component-${EXTENSION_NAME}"
)
# add test to the wiki page information
camitk_parse_test_add(NAME ${CAMITK_TEST_NAME} LEVEL 1 DESCRIPTION "Open a file, load the action and apply it on the component.")
endforeach()
......
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