Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit caa6f7ee authored by Emmanuel Promayon's avatar Emmanuel Promayon
Browse files

NEW macros camitk_disable_tests and camitk_tests_requirement

These macros are used to specify how and why some automatic tests
need to be disabled
parent 6d3b0b01
......@@ -23,42 +23,29 @@ camitk_extension(ACTION_EXTENSION
# --------------------------------
# --- Specific test management ---
# --------------------------------
camitk_disable_tests(TESTS action-itkfilters-level1-6
action-itkfilters-level1-8
action-itkfilters-level1-14
REASON " Test failure due to ITK exception.
For now disable these tests until this can be taken care of in the save() method
For input file: biorad.pic, cthead1.lsm, mini-complex-slow1.nrrd
When applying action Gradient Magnitude With Smoothing, the following exception is raised:
\"camitk-testcomponents aborted by std exception: /usr/include/ITK-4.10/itkRecursiveSeparableImageFilter.hxx:245:
itk::ERROR: RecursiveGaussianImageFilter(0x55b3b21bc700): The number of pixels along direction 2 is less than 4. This filter requires a minimum of four pixels along the dimension to be processed...\""
)
# Test failure due to ITK exception
# For now disable these tests until this can be taken care of in the save() method
# TODO check if it possible to avoid this exception
# For input file: biorad.pic
# Applying action Gradient Magnitude With Smoothing...
# camitk-testcomponents aborted by std exception: /usr/include/ITK-4.10/itkRecursiveSeparableImageFilter.hxx:245:
# itk::ERROR: RecursiveGaussianImageFilter(0x55b3b21bc700): The number of pixels along direction 2 is less than 4. This filter requires a minimum of four pixels along the dimension to be processed...
set_tests_properties(action-itkfilters-level1-6 PROPERTIES DISABLED true)
# For input file: cthead1.lsm
# Applying action Gradient Magnitude With Smoothing...
# camitk-testcomponents aborted by std exception: /usr/include/ITK-4.10/itkRecursiveSeparableImageFilter.hxx:245:
# itk::ERROR: RecursiveGaussianImageFilter(0x559652ac6cc0): The number of pixels along direction 2 is less than 4. This filter requires a minimum of four pixels along the dimension to be processed..
set_tests_properties(action-itkfilters-level1-8 PROPERTIES DISABLED true)
# For input file: mini-complex-slow1.nrrd
# Applying action Gradient Magnitude With Smoothing...
# camitk-testcomponents aborted by std exception: /usr/include/ITK-4.10/itkRecursiveSeparableImageFilter.hxx:245:
# itk::ERROR: RecursiveGaussianImageFilter(0x55f942cacac0): The number of pixels along direction 2 is less than 4. This filter requires a minimum of four pixels along the dimension to be processed.
set_tests_properties(action-itkfilters-level1-14 PROPERTIES DISABLED true)
if(WIN32)
message(WARNING "Disabling test action-itkfilters-integration-test\n"
"Reason: WIN32 OpenGL failure on a VM\n"
"This test fails when run inside a VM due to OpenGL crash.\n"
"This test passes when run directly from a physical windows machine.\n")
set_tests_properties(action-itkfilters-integration-test PROPERTIES DISABLED true)
endif()
camitk_tests_requirement(TESTS action-itkfilters-integration-test
REQUIRES "NOT WIN32"
REASON "WIN32 OpenGL failure on a VM
This test will always fail when run inside a VM due to OpenGL crash.
This test will pass when run directly from a physical windows machine."
)
if(NOT "${VTK_VERSION}" VERSION_EQUAL 6.3)
message(WARNING "Disabling test action-itkfilters-integration-test\n"
"Reason: VTK version is not equals than 6.3\n"
"VTK 6.2 has a bug when it saves vtk files: it does not save the proper VTK file format version\n"
"On Ubuntu 16.04 LTS, the default VTK version is 6.2 not 6.3.\n"
"Ubuntu 16.04 LTS is supported but these tests will fail if not disabled\n"
"VTK 7 has a different file format version, which is written in the header\n"
"On debian buster, the default VTK version is 7.1 not 6.3\n"
"Debian buster is supported but these tests will fail if not disabled\n")
set_tests_properties(action-itkfilters-integration-test PROPERTIES DISABLED true)
endif()
camitk_tests_requirement(TESTS action-itkfilters-integration-test
REQUIRES "${VTK_VERSION} VERSION_EQUAL 6.3"
REASON "VTK version is not equals than 6.3
The default test files are written using the currently supported version of VTK (VTK 6.3).
This test will therefore fail when comparing the input to the output if another version of VTK is used.
E.g., Ubuntu 16.04 LTS comes with VTK 6.2 and Debian buster comes with VTK 7.1
Although everything should work well on both OS, this test will unconditionnaly fail."
)
......@@ -12,52 +12,42 @@ camitk_extension(COMPONENT_EXTENSION
# --- Specific test management ---
# --------------------------------
# Test failure due to ITK exception
# For now disable these tests until this can be taken care of in the save() method
# TODO check if it possible to avoid this exception
# Trying to save "biorad.pic" generates the following ITK Exception:
# /build/insighttoolkit4-zpsE3g/insighttoolkit4-4.10.1-dfsg1/Modules/IO/BioRad/src/itkBioRadImageIO.cxx:484:
# itk::ERROR: BioRadImageIO(0x55bf9bc9bb90): Component type not supported.
set_tests_properties(component-itkimage-level3-9 PROPERTIES DISABLED true)
# Saving Error: problem occurs while saving file:/home/promayon/Dev/CamiTK/build/camitk/Testing/Temporary/component-itkimage-level3-10/cthead1.lsm: ITK Exception: /build/insighttoolkit4-zpsE3g/insighttoolkit4-4.10.1-dfsg1/Modules/IO/LSM/src/itkLSMImageIO.cxx:275:
# itk::ERROR: LSMImageIO(0x55a165be7310): TIFF supports unsigned char and unsigned short
set_tests_properties(component-itkimage-level3-10 PROPERTIES DISABLED true)
# Test failure due to bad export (ITK does not save the exact same image it has read by design)
# TODO check why ITK cannot save BigEndian.spr properly
set_tests_properties(component-itkimage-level3-3 PROPERTIES DISABLED true)
# TODO check why ITK cannot save LittleEndianZ.hdr properly
set_tests_properties(component-itkimage-level3-19 PROPERTIES DISABLED true)
# TODO check why ITK cannot save LittleEndianZ.img.gz properly
set_tests_properties(component-itkimage-level3-20 PROPERTIES DISABLED true)
camitk_disable_tests(TESTS component-itkimage-level3-9
component-itkimage-level3-10
component-itkimage-level3-3
component-itkimage-level3-19
component-itkimage-level3-20
REASON " Test failure due to ITK exception.
For now disable these tests until this can be dealt with (if possible)
For input file: biorad.pic, cthead1.lsm, BigEndian.spr, LittleEndianZ.hdr and LittleEndianZ.img.gz
When applying action Gradient Magnitude With Smoothing, the following exception is raised:
\"camitk-testcomponents aborted by std exception: /usr/include/ITK-4.10/itkRecursiveSeparableImageFilter.hxx:245:
itk::ERROR: RecursiveGaussianImageFilter(0x55b3b21bc700): The number of pixels along direction 2 is less than 4. This filter requires a minimum of four pixels along the dimension to be processed...\""
)
if(WIN32)
message(WARNING "Disabling test component-itkimage-level3-6 component-itkimage-level3-16 and component-itkimage-level3-28\n"
"Reason: WIN32 failure (probably) due to double suffix .im.gz or .nii.gz\n")
# TODO confirm diagnostic: check why BigEndianCompressed.img.gz does not work on Windows (maybe because of double suffix .im.gz?)
set_tests_properties(component-itkimage-level3-6 PROPERTIES DISABLED true)
# same for LittleEndianCompressed.img.gz
set_tests_properties(component-itkimage-level3-16 PROPERTIES DISABLED true)
# same for minimal.nii.gz
set_tests_properties(component-itkimage-level3-28 PROPERTIES DISABLED true)
endif()
# TODO confirm diagnostic: check why BigEndianCompressed.img.gz, LittleEndianCompressed.img.gz and minimal.nii.gz does not work on Windows (maybe because of double suffix .im.gz?)
camitk_tests_requirement(TESTS component-itkimage-level3-6
component-itkimage-level3-16
component-itkimage-level3-28
REQUIRES "NOT WIN32"
REASON "WIN32 failure (probably) due to double suffix .im.gz or .nii.gz
For input file: BigEndianCompressed.img.gz, LittleEndianCompressed.img.gz and minimal.nii.gz"
)
if("${ITK_VERSION}" VERSION_GREATER 4.11)
message(WARNING "Disabling test component-itkimage-level3-1 component-itkimage-level3-4 component-itkimage-level3-7 component-itkimage-level3-11 component-itkimage-level3-13 component-itkimage-level3-15 component-itkimage-level3-17 component-itkimage-level3-21 component-itkimage-level3-28\n"
"Reason: ITK version is greater than 4.11\n"
"ITK 4.12 handle export to some format differently. It generates different files and therefore\n"
"generates test errors for level3.\n"
"The following test should be enabled when all plateforms are based on ITK 4.12 or higher\n")
set_tests_properties(component-itkimage-level3-1
component-itkimage-level3-4
component-itkimage-level3-7
component-itkimage-level3-11
component-itkimage-level3-13
component-itkimage-level3-15
component-itkimage-level3-17
component-itkimage-level3-21
component-itkimage-level3-28
PROPERTIES DISABLED true)
endif()
camitk_tests_requirement(TESTS component-itkimage-level3-1
component-itkimage-level3-4
component-itkimage-level3-7
component-itkimage-level3-11
component-itkimage-level3-13
component-itkimage-level3-15
component-itkimage-level3-17
component-itkimage-level3-21
component-itkimage-level3-28
REQUIRES "${ITK_VERSION}" VERSION_LESS 4.12
REASON " ITK version is greater than 4.11
The default test files are written using the currently supported version of ITK (ITK 4.11).
This test will therefore fail when comparing the input to the output if another version of ITK is used."
)
# Additional test for SDK actions: this will add auto test for the given actions using the itkimage component
camitk_additional_action_test(ACTION_EXTENSIONS cropvolume imagelut imageresampling multipicking pixelcolorchanger reconstruction reorientimage showin3d volumerendering
......
......@@ -13,23 +13,18 @@ set(SHIBOKEN_CAMITK_SDK_PATH ${SHIBOKEN_CAMITK_SDK_PATH}:${CMAKE_CURRENT_SOURCE_
# --------------------------------
# --- Specific test management ---
# --------------------------------
camitk_tests_requirement(TESTS action-reconstruction-integration-test
REQUIRES "${VTK_VERSION} VERSION_EQUAL 6.3"
REASON "VTK version is not equals than 6.3
The default test files are written using the currently supported version of VTK (VTK 6.3).
This test will therefore fail when comparing the input to the output if another version of VTK is used.
E.g., Ubuntu 16.04 LTS comes with VTK 6.2 and Debian buster comes with VTK 7.1
Although everything should work well on both OS, this test will unconditionnaly fail."
)
if(NOT "${VTK_VERSION}" VERSION_EQUAL 6.3)
message(WARNING "Disabling test action-reconstruction-integration-test\n"
"Reason: VTK version is not equals than 6.3\n"
"VTK 6.2 has a bug when it saves vtk files: it does not save the proper VTK file format version\n"
"On Ubuntu 16.04 LTS, the default VTK version is 6.2 not 6.3.\n"
"Ubuntu 16.04 LTS is supported but these tests will fail if not disabled\n"
"VTK 7 has a different file format version, which is written in the header\n"
"On debian buster, the default VTK version is 7.1 not 6.3\n"
"Debian buster is supported but these tests will fail if not disabled\n")
set_tests_properties(action-reconstruction-integration-test PROPERTIES DISABLED true)
endif()
if(WIN32)
message(WARNING "Disabling test action-reconstruction-integration-test\n"
"Reason: WIN32 OpenGL failure on a VM\n"
"This test fails when run inside a VM due to OpenGL crash.\n"
"This test passes when run directly from a physical windows machine.\n")
set_tests_properties(action-reconstruction-integration-test PROPERTIES DISABLED true)
endif()
camitk_tests_requirement(TESTS action-reconstruction-integration-test
REQUIRES "NOT WIN32"
REASON "WIN32 OpenGL failure on a VM
This test will always fail when run inside a VM due to OpenGL crash.
This test will pass when run directly from a physical windows machine."
)
......@@ -30,6 +30,8 @@ include(camitk/test/CamiTKInitTest)
include(camitk/test/CamiTKAddTest)
include(camitk/test/CamiTKAddIntegrationTest)
include(camitk/test/CamiTKAdditionalActionTest)
include(camitk/test/CamiTKDisableTests)
include(camitk/test/CamiTKTestsRequirement)
# -- packaging macros
include(camitk/packaging/CamiTKCommunityEditionPackaging)
......
#!
#! @ingroup group_sdk_cmake_camitk_test
#!
#! camitk_disable_tests is a macro to disable one or more tests unconditionally.
#!
#! It encapsulates CMake set_tests_properties in order to manage version older that CMake 3.9
#! and to force the developper to give a (good) reason for bypassing tests.
#! If CMake version is lower than 3.9, the test(s) is/are executed but with the WILL_FAIL (i.e., a
#! failed test is considered as passed).
#!
#! Use in conjunction with the camitk_extension macro. In camitk_extension using ENABLE_AUTO_TEST
#! automatically generate a number of tests. Some of these tests might need to be unconditionally disabled
#! during the development process, in this case use this macro.
#!
#! Usage:
#! \code
#! camitk_disable_tests(TESTS test1 [test2...]
#! REASON "reason"
#! )
#! \endcode
#!
#! \param TESTS Names of the test(s) to disable (names separated by space)
#! \param REASON A text to explain why the tests is/are unconditionally disabled.
#!
#!
#! Example invocation:
#!
#! \code
#!
#! camitk_extension(ACTION_EXTENSION
#! ...
#! ENABLE_AUTO_TEST
#! ...
#! )
#!
#! ...
#! # Specific test management
#! camitk_disable_tests(TESTS action-myaction-level1-10
#! REASON "This test is expected to fail until such and such is implemented. Disable for now"
#! )
#! \endcode
#
#! @sa camitk_tests_requirement
macro(camitk_disable_tests)
set(options "")
set(oneValueArgs REASON)
set(multiValueArgs TESTS)
cmake_parse_arguments(CAMITK_DISABLE_TESTS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
set(DISABLE_MESSAGE "\n")
# CMake < 3.9 did not have the DISABLED test property. Use WILL_FAIL instead
foreach(TEST_NAME ${CAMITK_DISABLE_TESTS_TESTS})
if(${CMAKE_VERSION} VERSION_LESS "3.9")
string(APPEND DISABLE_MESSAGE " Unconditionally disabling test ${TEST_NAME} (using WILL_FAIL property)\n")
set_tests_properties(${TEST_NAME} PROPERTIES WILL_FAIL true)
else()
string(APPEND DISABLE_MESSAGE " Unconditionally disabling test ${TEST_NAME}\n")
set_tests_properties(${TEST_NAME} PROPERTIES DISABLED true)
endif()
endforeach()
string(APPEND DISABLE_MESSAGE " Reason: ${CAMITK_DISABLE_TESTS_REASON}\n")
message(AUTHOR_WARNING ${DISABLE_MESSAGE})
endmacro()
#!
#! @ingroup group_sdk_cmake_camitk_test
#!
#! camitk_tests_requirement is a macro to disable one or more tests.
#! It allows for specific test management in case the developper knows that a given test
#! requires a given environment or can not be run in a given environment.
#!
#! It encapsulates CMake set_tests_properties and adds CamiTK specificities and force the developper
#! to give a (good) reason for bypassing tests.
#!
#! Use this macro in conjunction with the camitk_extension macro. In camitk_extension using ENABLE_AUTO_TEST
#! automatically generate a number of tests. Some of these tests might need to be disabled due to
#! the environment (e.g. a different VTK version, an OpenGL problem on windows VM...).
#! Use camitk_tests_requirement below the camitk_extension (i.e. once the tests are created).
#!
#! Usage:
#! \code
#! camitk_tests_requirement(TESTS test1 [test2...]
#! REASON "reason"
#! REQUIRES environment_test_statement
#! )
#! \endcode
#!
#! \param TESTS Names of the test(s) to disable separated by space
#! \param REASON A text to explain why the test is disabled. This will appear during configuration
#! if the test(s) is/are disabled due to unmet requirement.
#! \param REQUIRES A CMake test statement that can check the current environment (OS,
#! library/dependencies version...etc...
#! If the requirements are not met, the listed test(s) is/are disabled
#! REQUIRES statement looks like a CMake test statement but is restricted to a
#! subset of CMake if statement.
#! There is three types of REQUIRES statement:
#! - one-part statement are used to test the OS.
#! Possible value are "WIN32", "WIN64", "MSVC", "APPLE" or "UNIX"
#! - two-parts statement are used to test the opposite of the one-part statement
#! using the "NOT" prefix.
#! Possible values are "NOT WIN32", "NOT WIN64", "NOT MSVC", "NOT APPLE" or "NOT UNIX"
#! - three-parts statement are used to check the version of library/dependencies.
#! It is composed of a left value (that is evaluated by the caller CMakeList, not here),
#! followed by a test statement and a right value (also evaluated by the caller CMakeList).
#! Possible test statements are VERSION_LESS, VERSION_EQUAL or VERSION_GREATER
#!
#!
#! Example invocation:
#!
#! \code
#!
#! camitk_extension(ACTION_EXTENSION
#! ...
#! ENABLE_AUTO_TEST
#! ...
#! )
#!
#! ...
#! # Specific test management
#!
#! # a three-parts statement to disable test if VTK version is not a specific version
#! camitk_tests_requirement(TESTS action-myaction-level1-3 action-myaction-level1-6 action-myaction-level1-11
#! REQUIRES "${VTK_VERSION} VERSION_EQUAL 6.3"
#! REASON "VTK version is not equals than 6.3
#! The default test files are written using the currently supported version of VTK (VTK 6.3).
#! This test will therefore fail when comparing the input to the output if another version of VTK is used."
#!)
#!
#! # a two-parts statement to disable test on WIN32
#! camitk_tests_requirement(TESTS action-itkfilters-integration-test
#! REQUIRES "NOT WIN32"
#! REASON "WIN32 OpenGL failure on a VM
#! This test will always fail when run inside a VM due to OpenGL crash.
#! This test will pass when run directly from a physical windows machine."
#! )
#!
#! \endcode
#
#! @sa camitk_disable_tests
macro(camitk_tests_requirement)
set(options "")
set(oneValueArgs REASON
REQUIRES)
set(multiValueArgs TESTS)
cmake_parse_arguments(CAMITK_TESTS_REQUIREMENT "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
# -- initialize message
set(DISABLE_MESSAGE "\n")
# -- analyze requirements
# transform statement to list in order to access left/middle/right value if the requirement is a test
string(REPLACE " " ";" REQUIRES_STATEMENT ${CAMITK_TESTS_REQUIREMENT_REQUIRES})
list(LENGTH REQUIRES_STATEMENT REQUIRES_STATEMENT_LENGTH)
if(REQUIRES_STATEMENT_LENGTH EQUAL 3)
# Requirement is a test, separate into parts and evaluate the requirement
list(GET REQUIRES_STATEMENT 0 REQUIRES_STATEMENT_LEFT_VALUE)
list(GET REQUIRES_STATEMENT 1 REQUIRES_STATEMENT_TEST)
list(GET REQUIRES_STATEMENT 2 REQUIRES_STATEMENT_RIGHT_VALUE)
# check the test statement. Can be either VERSION_LESS, VERSION_EQUAL or VERSION_GREATER
if(${REQUIRES_STATEMENT_TEST} STREQUAL "VERSION_LESS")
if (${REQUIRES_STATEMENT_LEFT_VALUE} VERSION_LESS ${REQUIRES_STATEMENT_RIGHT_VALUE})
set(REQUIRES_EVAL TRUE)
else()
set(REQUIRES_EVAL FALSE)
endif()
elseif(${REQUIRES_STATEMENT_TEST} STREQUAL "VERSION_EQUAL")
if (${REQUIRES_STATEMENT_LEFT_VALUE} VERSION_EQUAL ${REQUIRES_STATEMENT_RIGHT_VALUE})
set(REQUIRES_EVAL TRUE)
else()
set(REQUIRES_EVAL FALSE)
endif()
elseif(${REQUIRES_STATEMENT_TEST} STREQUAL "VERSION_GREATER")
if (${REQUIRES_STATEMENT_LEFT_VALUE} VERSION_GREATER ${REQUIRES_STATEMENT_RIGHT_VALUE})
set(REQUIRES_EVAL TRUE)
else()
set(REQUIRES_EVAL FALSE)
endif()
else()
message(FATAL_ERROR "\n Unknown three-parts requirement test: \"${CAMITK_TESTS_REQUIREMENT_REQUIRES}\"\n Use one of VERSION_LESS, VERSION_EQUAL or VERSION_GREATER.\n Check call stack below to fix this error.")
endif()
else()
if(REQUIRES_STATEMENT_LENGTH EQUAL 2)
list(GET REQUIRES_STATEMENT 0 REQUIRES_STATEMENT_NOT)
list(GET REQUIRES_STATEMENT 1 REQUIRES_STATEMENT_TEST)
# REQUIRES_STATEMENT_NOT should be "NOT"
if(NOT REQUIRES_STATEMENT_NOT STREQUAL "NOT")
message(FATAL_ERROR "\n Unknown two-parts requirement test: \"${CAMITK_TESTS_REQUIREMENT_REQUIRES}\"\n Only NOT is supported.\n Check call stack below to fix this error.")
endif()
else()
list(GET REQUIRES_STATEMENT 0 REQUIRES_STATEMENT_TEST)
endif()
# possible statement are WIN32, WIN64, MSVC, APPLE or UNIX
if(${REQUIRES_STATEMENT_TEST} STREQUAL "WIN32")
if(WIN32)
set(REQUIRES_EVAL TRUE)
else()
set(REQUIRES_EVAL FALSE)
endif()
elseif(${REQUIRES_STATEMENT_TEST} STREQUAL "WIN64")
if(WIN64)
set(REQUIRES_EVAL TRUE)
else()
set(REQUIRES_EVAL FALSE)
endif()
elseif(${REQUIRES_STATEMENT_TEST} STREQUAL "MSVC")
if(MSVC)
set(REQUIRES_EVAL TRUE)
else()
set(REQUIRES_EVAL FALSE)
endif()
elseif(${REQUIRES_STATEMENT_TEST} STREQUAL "APPLE")
if(APPLE)
set(REQUIRES_EVAL TRUE)
else()
set(REQUIRES_EVAL FALSE)
endif()
elseif(${REQUIRES_STATEMENT_TEST} STREQUAL "UNIX")
if(UNIX)
set(REQUIRES_EVAL TRUE)
else()
set(REQUIRES_EVAL FALSE)
endif()
endif()
# negate if needed
if(REQUIRES_STATEMENT_NOT STREQUAL "NOT")
if(${REQUIRES_EVAL})
set(REQUIRES_EVAL FALSE)
else()
set(REQUIRES_EVAL TRUE)
endif()
endif()
endif()
if(NOT ${REQUIRES_EVAL})
foreach(TEST_NAME ${CAMITK_TESTS_REQUIREMENT_TESTS})
string(APPEND DISABLE_MESSAGE " Disabling test ${TEST_NAME}")
# CMake < 3.9 did not have the DISABLED test property. Use WILL_FAIL instead
if(${CMAKE_VERSION} VERSION_LESS "3.9")
string(APPEND DISABLE_MESSAGE " (using WILL_FAIL property)")
set_tests_properties(${TEST_NAME} PROPERTIES WILL_FAIL true)
else()
set_tests_properties(${TEST_NAME} PROPERTIES DISABLED true)
endif()
string(APPEND DISABLE_MESSAGE "\n")
endforeach()
string(APPEND DISABLE_MESSAGE " Reason: ${CAMITK_TESTS_REQUIREMENT_REASON}\n")
string(APPEND DISABLE_MESSAGE " Requirement statement unmet: ${CAMITK_TESTS_REQUIREMENT_REQUIRES}.\n")
message(AUTHOR_WARNING ${DISABLE_MESSAGE})
else()
string(REPLACE ";" " " CAMITK_TESTS_REQUIREMENT_TESTS_STRING "${CAMITK_TESTS_REQUIREMENT_TESTS}")
message(STATUS "Test requirement \"${CAMITK_TESTS_REQUIREMENT_REQUIRES}\": Passed\n Enabled tests: ${CAMITK_TESTS_REQUIREMENT_TESTS_STRING}")
endif()
endmacro()
......@@ -20,17 +20,7 @@ set(SHIBOKEN_CAMITK_SDK_PATH ${SHIBOKEN_CAMITK_SDK_PATH}:${CMAKE_CURRENT_SOURCE_
# --------------------------------
# --- Specific test management ---
# --------------------------------
if(NOT "${VTK_VERSION}" VERSION_EQUAL 6.3)
message(WARNING "Disabling test component-vtkmesh-level3-1 to component-vtkmesh-level3-16\n"
"Reason: VTK version is not equals than 6.3\n"
"VTK 6.2 has a bug when it saves vtk files: it does not save the proper VTK file format version\n"
"On Ubuntu 16.04 LTS, the default VTK version is 6.2 not 6.3.\n"
"Ubuntu 16.04 LTS is supported but these tests will fail if not disabled\n"
"VTK 7 has a different file format version, which is written in the header\n"
"On debian buster, the default VTK version is 7.1 not 6.3\n"
"Debian buster is supported but these tests will fail if not disabled\n")
set_tests_properties(component-vtkmesh-level3-1
camitk_tests_requirement(TESTS component-vtkmesh-level3-1
component-vtkmesh-level3-2
component-vtkmesh-level3-3
component-vtkmesh-level3-4
......@@ -46,5 +36,10 @@ if(NOT "${VTK_VERSION}" VERSION_EQUAL 6.3)
component-vtkmesh-level3-14
component-vtkmesh-level3-15
component-vtkmesh-level3-16
PROPERTIES DISABLED true)
endif()
REQUIRES "${VTK_VERSION} VERSION_EQUAL 6.3"
REASON "VTK version is not equals than 6.3
The default test files are written using the currently supported version of VTK (VTK 6.3).
This test will therefore fail when comparing the input to the output if another version of VTK is used.
E.g., Ubuntu 16.04 LTS comes with VTK 6.2 and Debian buster comes with VTK 7.1
Although everything should work well on both OS, this test will unconditionnaly fail."
)
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