diff options
Diffstat (limited to 'config/cmake/grepTest.cmake')
-rw-r--r-- | config/cmake/grepTest.cmake | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/config/cmake/grepTest.cmake b/config/cmake/grepTest.cmake index c4a6eb7..9dcedb5 100644 --- a/config/cmake/grepTest.cmake +++ b/config/cmake/grepTest.cmake @@ -192,6 +192,22 @@ if (TEST_FILTER) endif () endif () +if (NOT DEFINED ENV{HDF5_NOCLEANUP}) + if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}") + file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT}) + endif () + + if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err") + file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT}.err) + endif () + + if (TEST_DELETE_LIST) + foreach (dfile in ${TEST_DELETE_LIST}) + file (REMOVE ${dfile}) + endforeach () + endif () +endif () + # everything went fine... message (STATUS "Passed: The output of ${TEST_PROGRAM} matched") |