summaryrefslogtreecommitdiffstats
path: root/config/cmake/runTest.cmake
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2024-02-16 20:12:10 (GMT)
committerGitHub <noreply@github.com>2024-02-16 20:12:10 (GMT)
commit034271b239c2f8434a3d9528da5587f4a9813a41 (patch)
tree93badd8efbd89b2202629b591f44e4caa4b8307b /config/cmake/runTest.cmake
parent413d10f6e3d4db5341413ba7cd4f819eb5156a51 (diff)
parent17a542fce3f43ddbcf2113e061772e9315875eb0 (diff)
downloadhdf5-034271b239c2f8434a3d9528da5587f4a9813a41.zip
hdf5-034271b239c2f8434a3d9528da5587f4a9813a41.tar.gz
hdf5-034271b239c2f8434a3d9528da5587f4a9813a41.tar.bz2
Merge pull request #4025 from lrknox/1_14_dev_sync3_lrk
Sync more develop changes to hdf5_1_14
Diffstat (limited to 'config/cmake/runTest.cmake')
-rw-r--r--config/cmake/runTest.cmake24
1 files changed, 13 insertions, 11 deletions
diff --git a/config/cmake/runTest.cmake b/config/cmake/runTest.cmake
index 0cfb9a3..4257c44 100644
--- a/config/cmake/runTest.cmake
+++ b/config/cmake/runTest.cmake
@@ -133,16 +133,18 @@ endif ()
message (STATUS "COMMAND Error: ${TEST_ERROR}")
# remove special output
-file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
-string (FIND TEST_STREAM "_pmi_alps" TEST_FIND_RESULT)
-if (TEST_FIND_RESULT GREATER -1)
- string (REGEX REPLACE "^.*_pmi_alps[^\n]+\n" "" TEST_STREAM "${TEST_STREAM}")
- file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_STREAM})
-endif ()
-string (FIND TEST_STREAM "ulimit -s" TEST_FIND_RESULT)
-if (TEST_FIND_RESULT GREATER -1)
- string (REGEX REPLACE "^.*ulimit -s.*\n" "" TEST_STREAM "${TEST_STREAM}")
- file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_STREAM})
+if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}")
+ file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
+ string (FIND "${TEST_STREAM}" "_pmi_alps" TEST_FIND_RESULT)
+ if (TEST_FIND_RESULT GREATER -1)
+ string (REGEX REPLACE "^.*_pmi_alps[^\n]+\n" "" TEST_STREAM "${TEST_STREAM}")
+ file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_STREAM})
+ endif ()
+ string (FIND "${TEST_STREAM}" "ulimit -s" TEST_FIND_RESULT)
+ if (TEST_FIND_RESULT GREATER -1)
+ string (REGEX REPLACE "^.*ulimit -s[^\n]+\n" "" TEST_STREAM "${TEST_STREAM}")
+ file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_STREAM})
+ endif ()
endif ()
# remove special error output
@@ -153,7 +155,7 @@ else ()
# the error stack remains in the .err file
file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM)
endif ()
-string (FIND TEST_STREAM "no version information available" TEST_FIND_RESULT)
+string (FIND "${TEST_STREAM}" "no version information available" TEST_FIND_RESULT)
if (TEST_FIND_RESULT GREATER -1)
string (REGEX REPLACE "^.*no version information available[^\n]+\n" "" TEST_STREAM "${TEST_STREAM}")
# write back the changes to the original files