Skip to content

Commit

Permalink
sort out/ref files for line compare (#1337)
Browse files Browse the repository at this point in the history
  • Loading branch information
byrnHDF authored Jan 8, 2022
1 parent 03217ec commit f8f1fef
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions config/cmake_ext_mod/runTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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 ()

Expand Down

0 comments on commit f8f1fef

Please sign in to comment.