mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-19 16:50:46 +08:00
[svn-r23139] Only do line by line compare if compare files fail.
This commit is contained in:
parent
6e77ce012f
commit
b4f238fbd5
@ -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}")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user