diff options
author | don bright <hugh.m.bright@gmail.com> | 2011-12-07 04:20:17 (GMT) |
---|---|---|
committer | don bright <hugh.m.bright@gmail.com> | 2011-12-07 04:20:17 (GMT) |
commit | d26effccf4c9fabfe19355d6da4903291d8dd599 (patch) | |
tree | d6f2fc42feae2fa494546886d9fd4889651769e9 /tests/CMakeLists.txt | |
parent | 61bfb8f058e8935432fed6098a1d70dba194f6bf (diff) |
allow alternate image comparison using option to cmake
Diffstat (limited to 'tests/CMakeLists.txt')
-rw-r--r-- | tests/CMakeLists.txt | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 314b51f..04be773 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -422,6 +422,12 @@ function(get_test_fullname TESTCMD FILENAME FULLNAME) set(${FULLNAME} ${${FULLNAME}} PARENT_SCOPE) endfunction() +# comparison method to use +if (NOT $ENV{COMPARATOR} STREQUAL "") + set(COMPARATOR "$ENV{COMPARATOR}") +endif() +message(STATUS "COMPARATOR: " ${COMPARATOR}) + # # This functions adds cmd-line tests given files. # Files are sent as the parameters following TESTSUFFIX @@ -452,7 +458,7 @@ macro(add_cmdline_test TESTCMD TESTSUFFIX) set(CONFARG CONFIGURATIONS) set(CONFVAL ${FOUNDCONFIGS}) - add_test(NAME ${TEST_FULLNAME} ${CONFARG} ${CONFVAL} COMMAND ${PYTHON_EXECUTABLE} ${tests_SOURCE_DIR}/test_cmdline_tool.py -c ${ImageMagick_convert_EXECUTABLE} -s ${TESTSUFFIX} ${CMAKE_BINARY_DIR}/${TESTCMD} "${SCADFILE}") + add_test(NAME ${TEST_FULLNAME} ${CONFARG} ${CONFVAL} COMMAND ${PYTHON_EXECUTABLE} ${tests_SOURCE_DIR}/test_cmdline_tool.py --comparator=${COMPARATOR} -c ${ImageMagick_convert_EXECUTABLE} -s ${TESTSUFFIX} ${CMAKE_BINARY_DIR}/${TESTCMD} "${SCADFILE}") endif() endforeach() endmacro() |