diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2011-08-10 21:08:38 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2011-08-10 21:08:38 (GMT) |
commit | ada604b46f81b75881d762cab4da6d00326f6d06 (patch) | |
tree | 52fe7955333cd38b73cf4ee4c634d3a0b913f4a8 | |
parent | 129660f3767e0642c8997660188718ae428ad24d (diff) | |
download | hdf5-ada604b46f81b75881d762cab4da6d00326f6d06.zip hdf5-ada604b46f81b75881d762cab4da6d00326f6d06.tar.gz hdf5-ada604b46f81b75881d762cab4da6d00326f6d06.tar.bz2 |
[svn-r21216] Alter clear-objects tests to mate with test that generates object file.
Tested: local linux
-rw-r--r-- | tools/h5dump/CMakeLists.txt | 128 | ||||
-rw-r--r-- | tools/h5ls/CMakeLists.txt | 30 | ||||
-rw-r--r-- | tools/h5stat/CMakeLists.txt | 30 |
3 files changed, 128 insertions, 60 deletions
diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt index 900103a..aafd14d 100644 --- a/tools/h5dump/CMakeLists.txt +++ b/tools/h5dump/CMakeLists.txt @@ -480,9 +480,18 @@ IF (BUILD_TESTING) # If using memchecker add tests without using scripts IF (HDF5_ENABLE_USING_MEMCHECKER) ADD_TEST (NAME H5DUMP-${testname} COMMAND $<TARGET_FILE:h5dump> ${ARGN}) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5DUMP-${testname} PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + SET (last_test "H5DUMP-${testname}") ELSE (HDF5_ENABLE_USING_MEMCHECKER) ADD_TEST ( - NAME H5DUMP-${testname} + NAME H5DUMP-clear-h5dump-${testname}-objects + COMMAND ${CMAKE_COMMAND} + -E remove h5dump-${testname}.out h5dump-${testname}.out.err + ) + ADD_TEST ( + NAME H5DUMP-h5dump-${testname} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>" -D "TEST_ARGS:STRING=${ARGN}" @@ -492,11 +501,8 @@ IF (BUILD_TESTING) -D "TEST_REFERENCE=h5dump-${testname}.txt" -P "${HDF5_RESOURCES_DIR}/runTest.cmake" ) + SET_TESTS_PROPERTIES (H5DUMP-h5dump-${testname} PROPERTIES DEPENDS "H5DUMP-clear-h5dump-${testname}-objects") ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5DUMP-${testname} PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - SET (last_test "H5DUMP-${testname}") ENDMACRO (ADD_HELP_TEST) MACRO (ADD_SKIP_H5_TEST skipresultfile skipresultcode testtype) @@ -519,8 +525,17 @@ IF (BUILD_TESTING) IF (NOT ${resultcode} STREQUAL "0") SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true") ENDIF (NOT ${resultcode} STREQUAL "0") + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + SET (last_test "H5DUMP-${resultfile}") ELSE (HDF5_ENABLE_USING_MEMCHECKER) ADD_TEST ( + NAME H5DUMP-clear-${resultfile}-objects + COMMAND ${CMAKE_COMMAND} + -E remove ${resultfile}.out ${resultfile}.out.err + ) + ADD_TEST ( NAME H5DUMP-${resultfile} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>" @@ -531,11 +546,8 @@ IF (BUILD_TESTING) -D "TEST_REFERENCE=${resultfile}.ddl" -P "${HDF5_RESOURCES_DIR}/runTest.cmake" ) + SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-clear-${resultfile}-objects") ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - SET (last_test "H5DUMP-${resultfile}") ENDMACRO (ADD_H5_TEST file) MACRO (ADD_H5_EXPORT_TEST resultfile targetfile resultcode) @@ -563,6 +575,11 @@ IF (BUILD_TESTING) MACRO (ADD_H5_MASK_TEST resultfile resultcode) IF (NOT HDF5_ENABLE_USING_MEMCHECKER) ADD_TEST ( + NAME H5DUMP-clear-${resultfile}-objects + COMMAND ${CMAKE_COMMAND} + -E remove ${resultfile}.out ${resultfile}.out.err + ) + ADD_TEST ( NAME H5DUMP-${resultfile} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>" @@ -574,10 +591,7 @@ IF (BUILD_TESTING) -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}") + SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-clear-${resultfile}-objects") ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) ENDMACRO (ADD_H5_MASK_TEST file) @@ -600,8 +614,17 @@ IF (BUILD_TESTING) IF (NOT ${resultcode} STREQUAL "0") SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES WILL_FAIL "true") ENDIF (NOT ${resultcode} STREQUAL "0") + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + SET (last_test "H5DUMP-XML-${resultfile}") ELSE (HDF5_ENABLE_USING_MEMCHECKER) ADD_TEST ( + NAME H5DUMP-XML-clear-${resultfile}-objects + COMMAND ${CMAKE_COMMAND} + -E remove ${resultfile}.out ${resultfile}.out.err + ) + ADD_TEST ( NAME H5DUMP-XML-${resultfile} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>" @@ -612,11 +635,8 @@ IF (BUILD_TESTING) -D "TEST_REFERENCE=${resultfile}.xml" -P "${HDF5_RESOURCES_DIR}/runTest.cmake" ) + SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES DEPENDS "H5DUMP-XML-clear-${resultfile}-objects") 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 "") - SET (last_test "H5DUMP-XML-${resultfile}") ENDMACRO (ADD_XML_H5_TEST file) # -------------------------------------------------------------------- @@ -635,8 +655,9 @@ IF (BUILD_TESTING) ############################################################################## ############################################################################## - # 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 H5DUMP-clearall-objects COMMAND ${CMAKE_COMMAND} -E remove @@ -873,11 +894,12 @@ IF (BUILD_TESTING) tvlstr.out.err tvms.out tvms.out.err - ) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5DUMP-clearall-objects PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - SET (last_test "H5DUMP-clearall-objects") + ) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5DUMP-clearall-objects PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + SET (last_test "H5DUMP-clearall-objects") + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) ADD_HELP_TEST(help 0 -h) @@ -1128,6 +1150,13 @@ IF (BUILD_TESTING) # NATIVE default. the NATIVE test can be validated with h5import/h5diff ADD_H5_TEST (tbin1 0 -d integer -o out1.bin -b tbinary.h5) + IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5DUMP-tbin1 PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + SET (last_test "H5DUMP-tbin1") + ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST (NAME H5DUMP-clear-out1 COMMAND ${CMAKE_COMMAND} -E remove out1.h5) IF (NOT "${last_test}" STREQUAL "") SET_TESTS_PROPERTIES (H5DUMP-clear-out1 PROPERTIES DEPENDS ${last_test}) @@ -1139,9 +1168,22 @@ IF (BUILD_TESTING) SET (last_test "H5DUMP-h5diff-out1") ADD_H5_TEST (tbin2 0 -b BE -d float -o out2.bin tbinary.h5) + IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5DUMP-tbin2 PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + SET (last_test "H5DUMP-tbin2") + ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) # the NATIVE test can be validated with h5import/h5diff ADD_H5_TEST (tbin3 0 -d integer -o out3.bin -b NATIVE tbinary.h5) + IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5DUMP-tbin3 PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + SET (last_test "H5DUMP-tbin3") + ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST (NAME H5DUMP-clear-out3 COMMAND ${CMAKE_COMMAND} -E remove out3.h5) IF (NOT "${last_test}" STREQUAL "") SET_TESTS_PROPERTIES (H5DUMP-clear-out3 PROPERTIES DEPENDS ${last_test}) @@ -1153,6 +1195,12 @@ IF (BUILD_TESTING) SET (last_test "H5DUMP-h5diff-out3") ADD_H5_TEST (tbin4 0 -d double -b FILE -o out4.bin tbinary.h5) + IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5DUMP-tbin4 PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + SET (last_test "H5DUMP-tbin4") + ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) # Clean up binary output files IF (NOT HDF5_NOCLEANUP) @@ -1212,8 +1260,9 @@ IF (BUILD_TESTING) ADD_H5_TEST (tall-6 0 -y -o data -d /g1/g1.1/dset1.1.1 tall.h5) ####### test for dataset packed bits ###### - # 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 H5DUMP_PACKED_BITS-clearall-objects COMMAND ${CMAKE_COMMAND} -E remove @@ -1323,11 +1372,12 @@ IF (BUILD_TESTING) tpbitsSignedLongLong16.out.err tpbitsUnsignedLongLong16.out tpbitsUnsignedLongLong16.out.err - ) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5DUMP_PACKED_BITS-clearall-objects PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - SET (last_test "H5DUMP_PACKED_BITS-clearall-objects") + ) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5DUMP_PACKED_BITS-clearall-objects PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + SET (last_test "H5DUMP_PACKED_BITS-clearall-objects") + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) # test failure handling # Missing file name @@ -1408,8 +1458,9 @@ IF (BUILD_TESTING) # Incomplete pair of packed bits request. ADD_H5_TEST (tpbitsIncomplete 1 -d /DS08BITS -M 0,2,2,1,0,2,2, packedbits.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 H5DUMP-XML-clearall-objects COMMAND ${CMAKE_COMMAND} -E remove @@ -1541,11 +1592,12 @@ IF (BUILD_TESTING) tvldtypes5.h5.out.err tvlstr.h5.out tvlstr.h5.out.err - ) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5DUMP-XML-clearall-objects PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - SET (last_test "H5DUMP-XML-clearall-objects") + ) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5DUMP-XML-clearall-objects PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + SET (last_test "H5DUMP-XML-clearall-objects") + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) ########## test XML ADD_XML_H5_TEST (tall.h5 0 tall.h5) diff --git a/tools/h5ls/CMakeLists.txt b/tools/h5ls/CMakeLists.txt index 398d027..2cd11cd 100644 --- a/tools/h5ls/CMakeLists.txt +++ b/tools/h5ls/CMakeLists.txt @@ -144,8 +144,17 @@ IF (BUILD_TESTING) IF (${resultcode} STREQUAL "1") SET_TESTS_PROPERTIES (H5LS-${resultfile} PROPERTIES WILL_FAIL "true") ENDIF (${resultcode} STREQUAL "1") + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5LS-${resultfile} PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + SET (last_test "H5LS-${resultfile}") ELSE (HDF5_ENABLE_USING_MEMCHECKER) ADD_TEST ( + NAME H5LS-clear-${resultfile}-objects + COMMAND ${CMAKE_COMMAND} + -E remove ${resultfile}.out ${resultfile}.out.err + ) + ADD_TEST ( NAME H5LS-${resultfile} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$<TARGET_FILE:h5ls>" @@ -156,11 +165,8 @@ IF (BUILD_TESTING) -D "TEST_REFERENCE=${resultfile}.ls" -P "${HDF5_RESOURCES_DIR}/runTest.cmake" ) + SET_TESTS_PROPERTIES (H5LS-${resultfile} PROPERTIES DEPENDS "H5LS-clear-${resultfile}-objects") ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5LS-${resultfile} PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - SET (last_test "H5LS-${resultfile}") ENDMACRO (ADD_H5_TEST file) ############################################################################## @@ -169,8 +175,9 @@ IF (BUILD_TESTING) ############################################################################## ############################################################################## - # 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 H5LS-clearall-objects COMMAND ${CMAKE_COMMAND} -E remove @@ -280,11 +287,12 @@ IF (BUILD_TESTING) tvldtypes2le.out.err tvldtypes2be.out tvldtypes2be.out.err - ) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5LS-clearall-objects PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - SET (last_test "H5LS-clearall-objects") + ) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5LS-clearall-objects PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + SET (last_test "H5LS-clearall-objects") + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) # test the help syntax ADD_H5_TEST (help-1 0 -w80 -h) diff --git a/tools/h5stat/CMakeLists.txt b/tools/h5stat/CMakeLists.txt index 89f2ba0..a4b06a6 100644 --- a/tools/h5stat/CMakeLists.txt +++ b/tools/h5stat/CMakeLists.txt @@ -91,8 +91,17 @@ IF (BUILD_TESTING) # If using memchecker add tests without using scripts IF (HDF5_ENABLE_USING_MEMCHECKER) ADD_TEST (NAME H5STAT-${resultfile} COMMAND $<TARGET_FILE:h5stat> ${ARGN}) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5STAT-${resultfile} PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + SET (last_test "H5STAT-${resultfile}") ELSE (HDF5_ENABLE_USING_MEMCHECKER) ADD_TEST ( + NAME H5STAT-clear-${resultfile}-objects + COMMAND ${CMAKE_COMMAND} + -E remove ${resultfile}.out ${resultfile}.out.err + ) + ADD_TEST ( NAME H5STAT-${resultfile} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$<TARGET_FILE:h5stat>" @@ -103,11 +112,8 @@ IF (BUILD_TESTING) -D "TEST_REFERENCE=${resultfile}.ddl" -P "${HDF5_RESOURCES_DIR}/runTest.cmake" ) + SET_TESTS_PROPERTIES (H5STAT-${resultfile} PROPERTIES DEPENDS "H5STAT-clear-${resultfile}-objects") ENDIF (HDF5_ENABLE_USING_MEMCHECKER) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5STAT-${resultfile} PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - SET (last_test "H5STAT-${resultfile}") ENDMACRO (ADD_H5_TEST file) ############################################################################## @@ -116,8 +122,9 @@ IF (BUILD_TESTING) ############################################################################## ############################################################################## - # 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 H5STAT-clearall-objects COMMAND ${CMAKE_COMMAND} -E remove @@ -149,11 +156,12 @@ IF (BUILD_TESTING) h5stat_newgrat-UG.out.err h5stat_newgrat-UA.out h5stat_newgrat-UA.out.err - ) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5STAT-clearall-objects PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - SET (last_test "H5STAT-clearall-objects") + ) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5STAT-clearall-objects PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + SET (last_test "H5STAT-clearall-objects") + ENDIF (HDF5_ENABLE_USING_MEMCHECKER) # Test for help flag ADD_H5_TEST (h5stat_help1 0 -h) |