summaryrefslogtreecommitdiffstats
path: root/tools/h5dump
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2011-03-01 19:20:20 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2011-03-01 19:20:20 (GMT)
commit484b1f5cfab2837c8366fc1efd463c8982908e57 (patch)
treebc6add39ecb38249c184555226f1183d2f7ab993 /tools/h5dump
parentf306642f9a1bcd2a592b1eea6553d94d9d2f6555 (diff)
downloadhdf5-484b1f5cfab2837c8366fc1efd463c8982908e57.zip
hdf5-484b1f5cfab2837c8366fc1efd463c8982908e57.tar.gz
hdf5-484b1f5cfab2837c8366fc1efd463c8982908e57.tar.bz2
[svn-r20171] Add HDF5_USING_MEMCHECKER guards around script mode ADD_TEST. This will replace the list of ignore tests in CTestCustom.cmake file.
Tested: local linux
Diffstat (limited to 'tools/h5dump')
-rw-r--r--tools/h5dump/CMakeLists.txt96
1 files changed, 49 insertions, 47 deletions
diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt
index dc03f01..b1e09ca 100644
--- a/tools/h5dump/CMakeLists.txt
+++ b/tools/h5dump/CMakeLists.txt
@@ -408,17 +408,22 @@ IF (BUILD_TESTING)
ENDMACRO (ADD_SKIP_H5_TEST)
MACRO (ADD_H5_TEST resultfile resultcode)
- ADD_TEST (
- NAME H5DUMP-${resultfile}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
- -D "TEST_ARGS:STRING=${ARGN}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -D "TEST_OUTPUT=${resultfile}.out"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_REFERENCE=${resultfile}.ddl"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
- )
+ # If using memchecker add tests without using scripts
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN})
+ ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5DUMP-${resultfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
+ -D "TEST_ARGS:STRING=${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_OUTPUT=${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.ddl"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
@@ -443,22 +448,24 @@ IF (BUILD_TESTING)
ENDMACRO (ADD_H5_EXPORT_TEST file)
MACRO (ADD_H5_MASK_TEST resultfile resultcode)
- ADD_TEST (
- NAME H5DUMP-${resultfile}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
- -D "TEST_ARGS:STRING=${ARGN}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -D "TEST_OUTPUT=${resultfile}.out"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_REFERENCE=${resultfile}.ddl"
- -D "TEST_MASK_ERROR=true"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
- )
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5DUMP-${resultfile}")
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5DUMP-${resultfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
+ -D "TEST_ARGS:STRING=${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_OUTPUT=${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.ddl"
+ -D "TEST_MASK_ERROR=true"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ SET (last_test "H5DUMP-${resultfile}")
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_H5_MASK_TEST file)
MACRO (ADD_XML_SKIP_H5_TEST skipresultfile skipresultcode testtype)
@@ -473,17 +480,21 @@ IF (BUILD_TESTING)
ENDMACRO (ADD_XML_SKIP_H5_TEST)
MACRO (ADD_XML_H5_TEST resultfile resultcode)
- ADD_TEST (
- NAME H5DUMP-XML-${resultfile}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
- -D "TEST_ARGS:STRING=--xml;${ARGN}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -D "TEST_OUTPUT=${resultfile}.out"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_REFERENCE=${resultfile}.xml"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
- )
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (NAME H5DUMP-XML-${resultfile} COMMAND $<TARGET_FILE:h5dump> --xml ${ARGN})
+ ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5DUMP-XML-${resultfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
+ -D "TEST_ARGS:STRING=--xml;${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_OUTPUT=${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.xml"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
@@ -742,15 +753,6 @@ IF (BUILD_TESTING)
ENDIF (NOT "${last_test}" STREQUAL "")
SET (last_test "H5DUMP-clearall-objects")
- # If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5DUMP-tgroup COMMAND h5dump tgroup.h5)
- ADD_TEST (NAME H5DUMP-tdset COMMAND h5dump tdset.h5)
- ADD_TEST (NAME H5DUMP-tattr COMMAND h5dump tattr.h5)
- ADD_TEST (NAME H5DUMP-tslink COMMAND h5dump tslink.h5)
- ADD_TEST (NAME H5DUMP-thlink COMMAND h5dump thlink.h5)
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
-
# test for signed/unsigned datasets
ADD_H5_TEST (packedbits 0 packedbits.h5)
# test for displaying groups