summaryrefslogtreecommitdiffstats
path: root/config/cmake/runTest.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'config/cmake/runTest.cmake')
-rw-r--r--config/cmake/runTest.cmake26
1 files changed, 14 insertions, 12 deletions
diff --git a/config/cmake/runTest.cmake b/config/cmake/runTest.cmake
index 4bdc4fd..28f4114 100644
--- a/config/cmake/runTest.cmake
+++ b/config/cmake/runTest.cmake
@@ -20,9 +20,9 @@ ENDIF (NOT TEST_OUTPUT)
#IF (NOT TEST_FILTER)
# MESSAGE (STATUS "Require TEST_FILTER to be defined")
#ENDIF (NOT TEST_FILTER)
-IF (NOT TEST_REFERENCE)
+IF (NOT TEST_SKIP_COMPARE AND NOT TEST_REFERENCE)
MESSAGE (FATAL_ERROR "Require TEST_REFERENCE to be defined")
-ENDIF (NOT TEST_REFERENCE)
+ENDIF (NOT TEST_SKIP_COMPARE AND NOT TEST_REFERENCE)
SET (ERROR_APPEND 1)
@@ -96,18 +96,20 @@ IF (WIN32 AND NOT MINGW)
FILE (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}")
ENDIF (WIN32 AND NOT MINGW)
-# now compare the output with the reference
-EXECUTE_PROCESS (
- COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
- RESULT_VARIABLE TEST_RESULT
-)
+IF (NOT TEST_SKIP_COMPARE)
+ # now compare the output with the reference
+ EXECUTE_PROCESS (
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
+ RESULT_VARIABLE TEST_RESULT
+ )
-MESSAGE (STATUS "COMPARE Result: ${TEST_RESULT}")
+ MESSAGE (STATUS "COMPARE Result: ${TEST_RESULT}")
-# again, if return value is !=0 scream and shout
-IF (NOT ${TEST_RESULT} STREQUAL 0)
- MESSAGE (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did not match ${TEST_REFERENCE}")
-ENDIF (NOT ${TEST_RESULT} STREQUAL 0)
+ # again, if return value is !=0 scream and shout
+ IF (NOT ${TEST_RESULT} STREQUAL 0)
+ MESSAGE (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did not match ${TEST_REFERENCE}")
+ ENDIF (NOT ${TEST_RESULT} STREQUAL 0)
+ENDIF (NOT TEST_SKIP_COMPARE)
# everything went fine...
MESSAGE ("Passed: The output of ${TEST_PROGRAM} matches ${TEST_REFERENCE}")