summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2013-01-07 20:41:41 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2013-01-07 20:41:41 (GMT)
commit38517de982be2c3abc2abc53e5096f5ef57c5ab5 (patch)
treeb8e258396adf4688858880a05877f31ead849c25 /config
parent520403e8e30dfa75927bdc583bafc00dc5c88322 (diff)
downloadhdf5-38517de982be2c3abc2abc53e5096f5ef57c5ab5.zip
hdf5-38517de982be2c3abc2abc53e5096f5ef57c5ab5.tar.gz
hdf5-38517de982be2c3abc2abc53e5096f5ef57c5ab5.tar.bz2
[svn-r23141] Only do line by line compare if compare files fail.
Diffstat (limited to 'config')
-rw-r--r--config/cmake/prunTest.cmake6
-rw-r--r--config/cmake/runTest.cmake12
2 files changed, 18 insertions, 0 deletions
diff --git a/config/cmake/prunTest.cmake b/config/cmake/prunTest.cmake
index 91a2403..b9ead6f 100644
--- a/config/cmake/prunTest.cmake
+++ b/config/cmake/prunTest.cmake
@@ -104,6 +104,11 @@ IF (NOT TEST_SKIP_COMPARE)
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}/P_${TEST_REFERENCE}
+ RESULT_VARIABLE TEST_RESULT
+ )
+ IF (NOT ${TEST_RESULT} STREQUAL 0)
SET (TEST_RESULT 0)
FILE (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act)
LIST (LENGTH test_act len_act)
@@ -125,6 +130,7 @@ IF (NOT TEST_SKIP_COMPARE)
IF (NOT ${len_act} STREQUAL ${len_ref})
SET (TEST_RESULT 1)
ENDIF (NOT ${len_act} STREQUAL ${len_ref})
+ ENDIF (NOT ${TEST_RESULT} STREQUAL 0)
MESSAGE (STATUS "COMPARE Result: ${TEST_RESULT}")
diff --git a/config/cmake/runTest.cmake b/config/cmake/runTest.cmake
index 7735e9b..0a80873 100644
--- a/config/cmake/runTest.cmake
+++ b/config/cmake/runTest.cmake
@@ -109,6 +109,11 @@ IF (NOT TEST_SKIP_COMPARE)
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_RESULT} STREQUAL 0)
SET (TEST_RESULT 0)
FILE (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act)
LIST (LENGTH test_act len_act)
@@ -130,6 +135,7 @@ IF (NOT TEST_SKIP_COMPARE)
IF (NOT ${len_act} STREQUAL ${len_ref})
SET (TEST_RESULT 1)
ENDIF (NOT ${len_act} STREQUAL ${len_ref})
+ ENDIF (NOT ${TEST_RESULT} STREQUAL 0)
MESSAGE (STATUS "COMPARE Result: ${TEST_RESULT}")
@@ -145,6 +151,11 @@ IF (NOT TEST_SKIP_COMPARE)
ENDIF (WIN32 AND NOT MINGW)
# now compare the error output with the error reference
+ EXECUTE_PROCESS (
+ COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT}.err ${TEST_FOLDER}/${TEST_ERRREF}
+ RESULT_VARIABLE TEST_RESULT
+ )
+ IF (NOT ${TEST_RESULT} STREQUAL 0)
SET (TEST_RESULT 0)
FILE (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT}.err test_act)
LIST (LENGTH test_act len_act)
@@ -167,6 +178,7 @@ IF (NOT TEST_SKIP_COMPARE)
IF (NOT ${len_act} STREQUAL ${len_ref})
SET (TEST_RESULT 1)
ENDIF (NOT ${len_act} STREQUAL ${len_ref})
+ ENDIF (NOT ${TEST_RESULT} STREQUAL 0)
MESSAGE (STATUS "COMPARE Result: ${TEST_RESULT}")