summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2022-01-08 17:10:59 (GMT)
committerGitHub <noreply@github.com>2022-01-08 17:10:59 (GMT)
commitf8f1fefe539e841fb103f00b0af76ffaa322f101 (patch)
tree3afb26d21bc9c1720867b4cad47f9b812c7c85c3 /config
parent03217eca811fde93dd3fbc2a941641cc9ccc1c1e (diff)
downloadhdf5-f8f1fefe539e841fb103f00b0af76ffaa322f101.zip
hdf5-f8f1fefe539e841fb103f00b0af76ffaa322f101.tar.gz
hdf5-f8f1fefe539e841fb103f00b0af76ffaa322f101.tar.bz2
sort out/ref files for line compare (#1337)
Diffstat (limited to 'config')
-rw-r--r--config/cmake_ext_mod/runTest.cmake10
1 files changed, 7 insertions, 3 deletions
diff --git a/config/cmake_ext_mod/runTest.cmake b/config/cmake_ext_mod/runTest.cmake
index f552dcd..05f4473 100644
--- a/config/cmake_ext_mod/runTest.cmake
+++ b/config/cmake_ext_mod/runTest.cmake
@@ -243,7 +243,14 @@ if (NOT TEST_SKIP_COMPARE)
list (LENGTH test_act len_act)
file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} test_ref)
list (LENGTH test_ref len_ref)
+ if (NOT len_act EQUAL len_ref)
+ set (TEST_COMPARE_RESULT 1)
+ endif ()
if (len_act GREATER 0 AND len_ref GREATER 0)
+ if (TEST_SORT_COMPARE)
+ list (SORT test_act)
+ list (SORT test_ref)
+ endif ()
math (EXPR _FP_LEN "${len_ref} - 1")
foreach (line RANGE 0 ${_FP_LEN})
list (GET test_act ${line} str_act)
@@ -263,9 +270,6 @@ if (NOT TEST_SKIP_COMPARE)
message (STATUS "COMPARE Failed: ${TEST_FOLDER}/${TEST_REFERENCE} is empty")
endif ()
endif ()
- if (NOT len_act EQUAL len_ref)
- set (TEST_COMPARE_RESULT 1)
- endif ()
endif ()
endif ()