summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2024-03-10 23:43:37 (GMT)
committerGitHub <noreply@github.com>2024-03-10 23:43:37 (GMT)
commit50a65223220142cf0b06a7d25ca53dc56811be01 (patch)
tree52d42dec08d723ee8949e50b7501dd7fbc1d21d5 /config
parent9bc6c201666aa7fcd7937db7241d4074b67824c9 (diff)
downloadhdf5-50a65223220142cf0b06a7d25ca53dc56811be01.zip
hdf5-50a65223220142cf0b06a7d25ca53dc56811be01.tar.gz
hdf5-50a65223220142cf0b06a7d25ca53dc56811be01.tar.bz2
Change compression tests reference files to use masking for compression ratios (#4083)
Rework TEST_FILTER tests to handle slightly different compression ratios
Diffstat (limited to 'config')
-rw-r--r--config/cmake/runTest.cmake10
1 files changed, 9 insertions, 1 deletions
diff --git a/config/cmake/runTest.cmake b/config/cmake/runTest.cmake
index 4257c44..ff9732e 100644
--- a/config/cmake/runTest.cmake
+++ b/config/cmake/runTest.cmake
@@ -167,7 +167,7 @@ if (TEST_FIND_RESULT GREATER -1)
endif ()
# if the output file needs Storage text removed
-if (TEST_MASK)
+if (TEST_MASK_STORE)
file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
string (REGEX REPLACE "Storage:[^\n]+\n" "Storage: <details removed for portability>\n" TEST_STREAM "${TEST_STREAM}")
file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
@@ -205,8 +205,16 @@ if (TEST_MASK_ERROR)
endif ()
# remove text from the output file
+if (TEST_MASK)
+ file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
+ string (REGEX REPLACE "${TEST_MASK}" "" TEST_STREAM "${TEST_STREAM}")
+ file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
+endif ()
+
+# replace text from the output file
if (TEST_FILTER)
file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
+ message (STATUS "TEST_FILTER: ${TEST_FILTER} TEST_FILTER_REPLACE: ${TEST_FILTER_REPLACE}")
string (REGEX REPLACE "${TEST_FILTER}" "${TEST_FILTER_REPLACE}" TEST_STREAM "${TEST_STREAM}")
file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
endif ()