summaryrefslogtreecommitdiffstats
path: root/tools/test/h5dump/CMakeTests.cmake
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-10-03 19:14:21 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-10-03 19:14:53 (GMT)
commit467f30c410e357ae7a437a0f75ca1f08780785f5 (patch)
treeeb0e5773d324f66a3bb5b1943025dae4d4e30670 /tools/test/h5dump/CMakeTests.cmake
parente6a2a9f43fe85ba2f3a6b03c4d16afd194c49da7 (diff)
downloadhdf5-467f30c410e357ae7a437a0f75ca1f08780785f5.zip
hdf5-467f30c410e357ae7a437a0f75ca1f08780785f5.tar.gz
hdf5-467f30c410e357ae7a437a0f75ca1f08780785f5.tar.bz2
Cleanup cmake clean macros
Diffstat (limited to 'tools/test/h5dump/CMakeTests.cmake')
-rw-r--r--tools/test/h5dump/CMakeTests.cmake79
1 files changed, 69 insertions, 10 deletions
diff --git a/tools/test/h5dump/CMakeTests.cmake b/tools/test/h5dump/CMakeTests.cmake
index 4bc33f8..cdd3e6d 100644
--- a/tools/test/h5dump/CMakeTests.cmake
+++ b/tools/test/h5dump/CMakeTests.cmake
@@ -407,8 +407,19 @@
endif ()
set (last_test "H5DUMP-${testname}")
else ()
+ # Remove any output file left over from previous test run
+ add_test (
+ NAME H5DUMP-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ testfiles/std/h5dump-${testname}.out
+ testfiles/std/h5dump-${testname}.out.err
+ )
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5DUMP-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
+ endif ()
add_test (
- NAME H5DUMP-h5dump-${testname}
+ NAME H5DUMP-${testname}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
-D "TEST_ARGS:STRING=${ARGN}"
@@ -418,6 +429,7 @@
-D "TEST_REFERENCE=h5dump-${testname}.txt"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
+ set_tests_properties (H5DUMP-${testname} PROPERTIES DEPENDS H5DUMP-${testname}-clear-objects)
endif ()
endmacro ()
@@ -449,7 +461,10 @@
add_test (
NAME H5DUMP-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove ${resultfile}.bin
+ -E remove
+ ${resultfile}.bin
+ ${resultfile}.out
+ ${resultfile}.out.err
)
set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
add_test (
@@ -482,7 +497,10 @@
add_test (
NAME H5DUMP-N-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove ${resultfile}-N.bin
+ -E remove
+ ${resultfile}-N.bin
+ ${resultfile}-N.out
+ ${resultfile}-N.out.err
)
set_tests_properties (H5DUMP-N-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
add_test (
@@ -515,7 +533,10 @@
add_test (
NAME H5DUMP-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove ${resultfile}.txt
+ -E remove
+ ${resultfile}.txt
+ ${resultfile}.out
+ ${resultfile}.out.err
)
set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
add_test (
@@ -555,7 +576,11 @@
add_test (
NAME H5DUMP-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove ${ddlfile}.txt ${resultfile}.txt
+ -E remove
+ ${ddlfile}.txt
+ ${resultfile}.txt
+ ${resultfile}.out
+ ${resultfile}.out.err
)
set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
add_test (
@@ -613,6 +638,15 @@
macro (ADD_H5_MASK_TEST resultfile resultcode)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ # Remove any output file left over from previous test run
+ add_test (
+ NAME H5DUMP-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${resultfile}.out
+ ${resultfile}.out.err
+ )
+ set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
add_test (
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
@@ -625,11 +659,21 @@
-D "TEST_MASK_ERROR=true"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
endif ()
endmacro ()
macro (ADD_H5ERR_MASK_TEST resultfile resultcode)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ # Remove any output file left over from previous test run
+ add_test (
+ NAME H5DUMP-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${resultfile}.out
+ ${resultfile}.out.err
+ )
+ set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
add_test (
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
@@ -643,11 +687,21 @@
-D "TEST_MASK_ERROR=true"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
endif ()
endmacro ()
macro (ADD_H5ERR_MASK_ENV_TEST resultfile resultcode envvar envval)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ # Remove any output file left over from previous test run
+ add_test (
+ NAME H5DUMP-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${resultfile}.out
+ ${resultfile}.out.err
+ )
+ set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
add_test (
NAME H5DUMP-${resultfile}
COMMAND "${CMAKE_COMMAND}"
@@ -663,6 +717,7 @@
-D "TEST_ENV_VALUE:STRING=${envval}"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
+ set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
endif ()
endmacro ()
@@ -672,7 +727,10 @@
add_test (
NAME H5DUMP-IMPORT-${resultfile}-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove ${resultfile}.bin ${resultfile}.h5
+ -E remove
+ ${resultfile}.bin
+ ${resultfile}.h5
+ ${conffile}.out
)
set_tests_properties (H5DUMP-IMPORT-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
add_test (
@@ -700,12 +758,13 @@
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
# Remove any output file left over from previous test run
add_test (
- NAME H5DUMP_UD-${testname}-clearall-objects
+ NAME H5DUMP_UD-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
- testfiles/std/${resultfile}.out
- testfiles/std/${resultfile}.out.err
+ ${resultfile}.out
+ ${resultfile}.out.err
)
+ set_tests_properties (H5DUMP_UD-${testname}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
add_test (
NAME H5DUMP_UD-${testname}
COMMAND "${CMAKE_COMMAND}"
@@ -719,7 +778,7 @@
-D "TEST_ENV_VALUE=${CMAKE_BINARY_DIR}/plugins"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
- set_tests_properties (H5DUMP_UD-${testname} PROPERTIES DEPENDS H5DUMP_UD-${testname}-clearall-objects)
+ set_tests_properties (H5DUMP_UD-${testname} PROPERTIES DEPENDS H5DUMP_UD-${testname}-clear-objects)
endif ()
endmacro ()