diff --git a/scripts/cmake/test/AddTest.cmake b/scripts/cmake/test/AddTest.cmake index e84158d831589d4223c48500d86259be974a57a2..10b5bf12a89b33c75e97c11c3c2913f5045b9151 100644 --- a/scripts/cmake/test/AddTest.cmake +++ b/scripts/cmake/test/AddTest.cmake @@ -59,18 +59,18 @@ function (AddTest) # --- Implement wrappers --- - # check requirements + # check requirements, disable if not met if(AddTest_WRAPPER STREQUAL "time" AND NOT TIME_TOOL_PATH) - message(FATAL_ERROR "time-command is required for time wrapper but was not found!") + return() endif() if(AddTest_WRAPPER STREQUAL "memcheck" AND NOT VALGRIND_TOOL_PATH) - message(FATAL_ERROR "Valgrind is required for memcheck wrapper but was not found!") + return() endif() if(AddTest_WRAPPER STREQUAL "callgrind" AND NOT VALGRIND_TOOL_PATH) - message(FATAL_ERROR "Valgrind is required for callgrind wrapper but was not found!") + return() endif() if(AddTest_WRAPPER STREQUAL "mpirun" AND NOT MPIRUN_TOOL_PATH) - message(FATAL_ERROR "mpirun is required for mpirun wrapper but was not found!") + return() endif() if(AddTest_WRAPPER STREQUAL "time") @@ -86,19 +86,20 @@ function (AddTest) endif() # --- Implement testers --- - # check requirements + # check requirements, disable if not met if(AddTest_TESTER STREQUAL "diff" AND NOT DIFF_TOOL_PATH) - message(FATAL_ERROR "diff-command is required for diff tester but was not found!") + return() endif() if(AddTest_TESTER STREQUAL "numdiff" AND NOT NUMDIFF_TOOL_PATH) - message(FATAL_ERROR "numdiff-command is required for numdiff tester but was not found!") + return() endif() + if(AddTest_TESTER STREQUAL "memcheck" AND NOT GREP_TOOL_PATH) + return() + endif() + if((AddTest_TESTER STREQUAL "diff" OR AddTest_TESTER STREQUAL "numdiff") AND NOT AddTest_DIFF_DATA) message(FATAL_ERROR "AddTest(): ${AddTest_NAME} - no DIFF_DATA given!") endif() - if(AddTest_TESTER STREQUAL "memcheck" AND NOT GREP_TOOL_PATH) - message(FATAL_ERROR "grep-command is required for memcheck tester but was not found!") - endif() if(AddTest_TESTER STREQUAL "diff") set(SELECTED_DIFF_TOOL_PATH ${DIFF_TOOL_PATH}) diff --git a/scripts/cmake/test/Test.cmake b/scripts/cmake/test/Test.cmake index 35982ff7560c78d0b2f608bda32f86cc4a69e7b2..5c13b193e340e3f7e6691142f697ac5230612839 100644 --- a/scripts/cmake/test/Test.cmake +++ b/scripts/cmake/test/Test.cmake @@ -8,6 +8,28 @@ FIND_PROGRAM(BASH_TOOL_PATH bash) FIND_PROGRAM(VALGRIND_TOOL_PATH valgrind) FIND_PROGRAM(MPIRUN_TOOL_PATH mpirun) +if(NOT TIME_TOOL_PATH) + message(STATUS "time-command is required for time wrapper but was not found! All corresponding tests are disabled.") +endif() +if(NOT VALGRIND_TOOL_PATH) + message(STATUS "Valgrind is required for memcheck wrapper but was not found! All corresponding tests are disabled.") +endif() +if(NOT VALGRIND_TOOL_PATH) + message(STATUS "Valgrind is required for callgrind wrapper but was not found! All corresponding tests are disabled.") +endif() +if(NOT MPIRUN_TOOL_PATH) + message(STATUS "mpirun is required for mpirun wrapper but was not found! All corresponding tests are disabled.") +endif() +if(NOT DIFF_TOOL_PATH) + message(STATUS "diff-command is required for diff tester but was not found! All corresponding tests are disabled.") +endif() +if(NOT NUMDIFF_TOOL_PATH) + message(STATUS "numdiff-command is required for numdiff tester but was not found! All corresponding tests are disabled.") +endif() +if(NOT GREP_TOOL_PATH) + message(STATUS "grep-command is required for memcheck tester but was not found! All corresponding tests are disabled.") +endif() + ENABLE_TESTING() # Enable CTest # See http://www.vtk.org/Wiki/CMake/Testing_With_CTest for some customization options