summaryrefslogtreecommitdiffstats
path: root/tools/h5diff
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2011-06-21 17:43:16 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2011-06-21 17:43:16 (GMT)
commit82a2e4ebca4dc595a7337703d6001f2adbe45e31 (patch)
treeb62a3092276f22f0be02e1d9828c43dd2842c7fb /tools/h5diff
parentd23c582bf6caa0eb41809511d20f482f7b7d0c31 (diff)
downloadhdf5-82a2e4ebca4dc595a7337703d6001f2adbe45e31.zip
hdf5-82a2e4ebca4dc595a7337703d6001f2adbe45e31.tar.gz
hdf5-82a2e4ebca4dc595a7337703d6001f2adbe45e31.tar.bz2
[svn-r21011] Change how test created files are cleared by clearing the files inside the test macro. Allows individual tests to be independently executed.
Tested: local linux
Diffstat (limited to 'tools/h5diff')
-rw-r--r--tools/h5diff/CMakeLists.txt31
1 files changed, 19 insertions, 12 deletions
diff --git a/tools/h5diff/CMakeLists.txt b/tools/h5diff/CMakeLists.txt
index bb267eb..c99f1a9 100644
--- a/tools/h5diff/CMakeLists.txt
+++ b/tools/h5diff/CMakeLists.txt
@@ -320,8 +320,17 @@ IF (BUILD_TESTING)
IF (NOT ${resultcode} STREQUAL "0")
SET_TESTS_PROPERTIES (H5DIFF-${resultfile} PROPERTIES WILL_FAIL "true")
ENDIF (NOT ${resultcode} STREQUAL "0")
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ SET (last_test "H5DIFF-${resultfile}")
ELSE (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
+ NAME H5DIFF-clear-${resultfile}-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${resultfile}.out ${resultfile}.out.err
+ )
+ ADD_TEST (
NAME H5DIFF-${resultfile}
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5diff>"
@@ -333,11 +342,8 @@ IF (BUILD_TESTING)
-D "TEST_APPEND=EXIT CODE:"
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
)
+ SET_TESTS_PROPERTIES (H5DIFF-${resultfile} PROPERTIES DEPENDS "H5DIFF-clear-${resultfile}-objects")
ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5DIFF-${resultfile}")
ENDMACRO (ADD_H5_TEST file)
##############################################################################
@@ -390,9 +396,9 @@ IF (BUILD_TESTING)
SET (ATTR_VERBOSE_LEVEL_FILE1 h5diff_attr_v_level1.h5)
SET (ATTR_VERBOSE_LEVEL_FILE2 h5diff_attr_v_level2.h5)
-
- # Remove any output file left over from previous test run
- ADD_TEST (
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ # Remove any output file left over from previous test run
+ ADD_TEST (
NAME H5DIFF-clearall-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -694,11 +700,12 @@ IF (BUILD_TESTING)
h5diff_80.out.err
h5diff_90.out
h5diff_90.out.err
- )
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DIFF-clearall-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5DIFF-clearall-objects")
+ )
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5DIFF-clearall-objects PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ SET (last_test "H5DIFF-clearall-objects")
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
# ############################################################################
# # Common usage