diff options
Diffstat (limited to 'config/cmake_ext_mod/runTest.cmake')
-rw-r--r-- | config/cmake_ext_mod/runTest.cmake | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/config/cmake_ext_mod/runTest.cmake b/config/cmake_ext_mod/runTest.cmake index c2b7527..2dc8ac4 100644 --- a/config/cmake_ext_mod/runTest.cmake +++ b/config/cmake_ext_mod/runTest.cmake @@ -62,10 +62,10 @@ endif (NOT TEST_INPUT) message (STATUS "COMMAND Result: ${TEST_RESULT}") -if (ERROR_APPEND) +if (ERROR_APPEND AND EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err) file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM) file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") -endif (ERROR_APPEND) +endif (ERROR_APPEND AND EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err) if (TEST_APPEND) file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_APPEND} ${TEST_RESULT}\n") @@ -91,11 +91,11 @@ if (TEST_MASK_MOD) endif (TEST_MASK_MOD) if (TEST_MASK_ERROR) - if (NOT TEST_ERRREF) + if (NOT TEST_ERRREF AND NOT EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err) file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) - else (NOT TEST_ERRREF) + else () file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM) - endif (NOT TEST_ERRREF) + endif () string (REGEX REPLACE "thread [0-9]*:" "thread (IDs):" TEST_STREAM "${TEST_STREAM}") string (REGEX REPLACE ": ([^\n]*)[.]c " ": (file name) " TEST_STREAM "${TEST_STREAM}") string (REGEX REPLACE " line [0-9]*" " line (number)" TEST_STREAM "${TEST_STREAM}") @@ -103,11 +103,11 @@ if (TEST_MASK_ERROR) string (REGEX REPLACE "[1-9]*[.][0-9]*[.][0-9]*[^)]*" "version (number)" TEST_STREAM "${TEST_STREAM}") string (REGEX REPLACE "H5Eget_auto[1-2]*" "H5Eget_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}") string (REGEX REPLACE "H5Eset_auto[1-2]*" "H5Eset_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}") - if (NOT TEST_ERRREF) + if (NOT TEST_ERRREF AND NOT EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err) file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") - else (NOT TEST_ERRREF) + else () file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT}.err "${TEST_STREAM}") - endif (NOT TEST_ERRREF) + endif () endif (TEST_MASK_ERROR) if (TEST_FILTER) |