summaryrefslogtreecommitdiffstats
path: root/HDF5Examples/config/cmake/runTest.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'HDF5Examples/config/cmake/runTest.cmake')
-rw-r--r--HDF5Examples/config/cmake/runTest.cmake19
1 files changed, 13 insertions, 6 deletions
diff --git a/HDF5Examples/config/cmake/runTest.cmake b/HDF5Examples/config/cmake/runTest.cmake
index d21765a..3507c34 100644
--- a/HDF5Examples/config/cmake/runTest.cmake
+++ b/HDF5Examples/config/cmake/runTest.cmake
@@ -133,11 +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})
+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
@@ -148,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