diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2017-02-14 20:59:57 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2017-02-14 20:59:57 (GMT) |
commit | 08b5edca0b6df7c50696ecf777ae5f108b19a953 (patch) | |
tree | f6248977a6d865d17e76f10675acd452e0701ed9 /config | |
parent | 5e87ada674945de86e7fc7dab719181053ee0699 (diff) | |
download | hdf5-08b5edca0b6df7c50696ecf777ae5f108b19a953.zip hdf5-08b5edca0b6df7c50696ecf777ae5f108b19a953.tar.gz hdf5-08b5edca0b6df7c50696ecf777ae5f108b19a953.tar.bz2 |
Fix parallel h5diff test comapare
Diffstat (limited to 'config')
-rw-r--r-- | config/cmake_ext_mod/runTest.cmake | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/config/cmake_ext_mod/runTest.cmake b/config/cmake_ext_mod/runTest.cmake index 804c80f..0a77dae 100644 --- a/config/cmake_ext_mod/runTest.cmake +++ b/config/cmake_ext_mod/runTest.cmake @@ -144,6 +144,13 @@ if (TEST_FILTER) file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") endif () +if (TEST_REF_FILTER) + #message (STATUS "TEST_REF_FILTER: ${TEST_APPEND}${TEST_REF_FILTER}") + file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM) + STRING(REGEX REPLACE "${TEST_REF_APPEND}" "${TEST_REF_FILTER}" TEST_STREAM "${TEST_STREAM}") + file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}") +endif (TEST_REF_FILTER) + # compare output files to references unless this must be skipped if (NOT TEST_SKIP_COMPARE) if (WIN32 AND NOT MINGW) @@ -151,11 +158,22 @@ if (NOT TEST_SKIP_COMPARE) file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}") endif () - # 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_SORT_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 + ) + else () + file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} v1) + file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} v2) + list (SORT v1) + list (SORT v2) + if (NOT v1 STREQUAL v2) + set(TEST_RESULT 1) + endif () + endif () + if (NOT ${TEST_RESULT} STREQUAL 0) set (TEST_RESULT 0) file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act) |