diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2022-08-07 04:59:31 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-07 04:59:31 (GMT) |
commit | 956282fa6f5f5b7df92be6f14c12681f7ecabbc9 (patch) | |
tree | 262418febb0a037f752e577ab632accd358edd93 /tools | |
parent | 7127d8912c8fa601d59b4e8ce522eaf149c02344 (diff) | |
download | hdf5-956282fa6f5f5b7df92be6f14c12681f7ecabbc9.zip hdf5-956282fa6f5f5b7df92be6f14c12681f7ecabbc9.tar.gz hdf5-956282fa6f5f5b7df92be6f14c12681f7ecabbc9.tar.bz2 |
Develop cmake clean (#1971)
Diffstat (limited to 'tools')
42 files changed, 1058 insertions, 1080 deletions
diff --git a/tools/libtest/CMakeTests.cmake b/tools/libtest/CMakeTests.cmake index 2d8e877..6863822 100644 --- a/tools/libtest/CMakeTests.cmake +++ b/tools/libtest/CMakeTests.cmake @@ -28,17 +28,22 @@ NAME H5LIBTEST-${resultfile}-clear-objects COMMAND ${CMAKE_COMMAND} -E remove - ${resultfile}.out - ${resultfile}.out.err + ${resultfile}.out + ${resultfile}.out.err ) - if (NOT "${last_test}" STREQUAL "") - set_tests_properties (H5LIBTEST-${resultfile}-clear-objects PROPERTIES DEPENDS ${last_test}) - endif () add_test (NAME H5LIBTEST-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5tools_test_utils> ${ARGN}) if (NOT "${resultcode}" STREQUAL "0") set_tests_properties (H5LIBTEST-${resultfile} PROPERTIES WILL_FAIL "true") endif () set_tests_properties (H5LIBTEST-${resultfile} PROPERTIES DEPENDS H5LIBTEST-${resultfile}-clear-objects) + add_test ( + NAME H5LIBTEST-${resultfile}-clean-objects + COMMAND ${CMAKE_COMMAND} + -E remove + ${resultfile}.out + ${resultfile}.out.err + ) + set_tests_properties (H5LIBTEST-${resultfile}-clean-objects PROPERTIES DEPENDS H5LIBTEST-${resultfile}) endmacro () ############################################################################## diff --git a/tools/test/h5copy/CMakeTests.cmake b/tools/test/h5copy/CMakeTests.cmake index 154ca15..33af1cd 100644 --- a/tools/test/h5copy/CMakeTests.cmake +++ b/tools/test/h5copy/CMakeTests.cmake @@ -55,25 +55,17 @@ # Perform h5copy according to passing parameters # macro (ADD_H5_F_TEST testname resultcode infile fparam vparam sparam srcname dparam dstname) - if (NOT HDF5_ENABLE_USING_MEMCHECKER) - # Remove any output file left over from previous test run - add_test ( - NAME H5COPY_F-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}.out.h5 - ) - endif () + # Remove any output file left over from previous test run + add_test ( + NAME H5COPY_F-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}.out.h5 + ) add_test ( NAME H5COPY_F-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy${tgt_file_ext}> -f ${fparam} -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN} ) - if (HDF5_ENABLE_USING_MEMCHECKER) - if (last_test) - set_tests_properties (H5COPY_F-${testname} PROPERTIES DEPENDS ${last_test}) - endif () - else () - set_tests_properties (H5COPY_F-${testname} PROPERTIES DEPENDS H5COPY_F-${testname}-clear-objects) - endif () + set_tests_properties (H5COPY_F-${testname} PROPERTIES DEPENDS H5COPY_F-${testname}-clear-objects) # resultcode=2 will cause the test to skip the diff test if (NOT "${resultcode}" STREQUAL "2") @@ -86,28 +78,29 @@ set_tests_properties (H5COPY_F-${testname}-DIFF PROPERTIES WILL_FAIL "true") endif () endif () + add_test ( + NAME H5COPY_F-${testname}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}.out.h5 + ) + if (NOT "${resultcode}" STREQUAL "2") + set_tests_properties (H5COPY_F-${testname}-clean-objects PROPERTIES DEPENDS H5COPY_F-${testname}-DIFF) + else () + set_tests_properties (H5COPY_F-${testname}-clean-objects PROPERTIES DEPENDS H5COPY_F-${testname}) + endif () endmacro () macro (ADD_H5_TEST testname resultcode infile vparam sparam srcname dparam dstname) - if (NOT HDF5_ENABLE_USING_MEMCHECKER) - # Remove any output file left over from previous test run - add_test ( - NAME H5COPY-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}.out.h5 - ) - endif () + # Remove any output file left over from previous test run + add_test ( + NAME H5COPY-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}.out.h5 + ) add_test ( NAME H5COPY-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy${tgt_file_ext}> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN} ) - if (HDF5_ENABLE_USING_MEMCHECKER) - if (last_test) - set_tests_properties (H5COPY-${testname} PROPERTIES DEPENDS ${last_test}) - endif () - else () - set_tests_properties (H5COPY-${testname} PROPERTIES DEPENDS H5COPY-${testname}-clear-objects) - endif () + set_tests_properties (H5COPY-${testname} PROPERTIES DEPENDS H5COPY-${testname}-clear-objects) # resultcode=2 will cause the test to skip the diff test if (NOT "${resultcode}" STREQUAL "2") @@ -120,6 +113,15 @@ set_tests_properties (H5COPY-${testname}-DIFF PROPERTIES WILL_FAIL "true") endif () endif () + add_test ( + NAME H5COPY-${testname}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}.out.h5 + ) + if (NOT "${resultcode}" STREQUAL "2") + set_tests_properties (H5COPY-${testname}-clean-objects PROPERTIES DEPENDS H5COPY-${testname}-DIFF) + else () + set_tests_properties (H5COPY-${testname}-clean-objects PROPERTIES DEPENDS H5COPY-${testname}) + endif () endmacro () macro (ADD_SKIP_H5_TEST testname skipresultfile) @@ -133,25 +135,17 @@ endmacro () macro (ADD_H5_TEST2 testname resultcode infile psparam pdparam vparam sparam srcname dparam dstname) - if (NOT HDF5_ENABLE_USING_MEMCHECKER) - # Remove any output file left over from previous test run - add_test ( - NAME H5COPY-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}.out.h5 - ) - endif () + # Remove any output file left over from previous test run + add_test ( + NAME H5COPY-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}.out.h5 + ) add_test ( NAME H5COPY-${testname}-prefill COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy${tgt_file_ext}> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 -v -s ${psparam} -d ${pdparam} ) - if (HDF5_ENABLE_USING_MEMCHECKER) - if (last_test) - set_tests_properties (H5COPY-${testname}-prefill PROPERTIES DEPENDS ${last_test}) - endif () - else () - set_tests_properties (H5COPY-${testname}-prefill PROPERTIES DEPENDS H5COPY-${testname}-clear-objects) - endif () + set_tests_properties (H5COPY-${testname}-prefill PROPERTIES DEPENDS H5COPY-${testname}-clear-objects) add_test ( NAME H5COPY-${testname} @@ -169,28 +163,29 @@ set_tests_properties (H5COPY-${testname}-DIFF PROPERTIES WILL_FAIL "true") endif () endif () + add_test ( + NAME H5COPY-${testname}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}.out.h5 + ) + if (NOT "${resultcode}" STREQUAL "2") + set_tests_properties (H5COPY-${testname}-clean-objects PROPERTIES DEPENDS H5COPY-${testname}-DIFF) + else () + set_tests_properties (H5COPY-${testname}-clean-objects PROPERTIES DEPENDS H5COPY-${testname}) + endif () endmacro () macro (ADD_H5_TEST_SAME testname resultcode pfile psparam pdparam vparam sparam srcname dparam dstname) - if (NOT HDF5_ENABLE_USING_MEMCHECKER) - # Remove any output file left over from previous test run - add_test ( - NAME H5COPY_SAME-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}.out.h5 - ) - endif () + # Remove any output file left over from previous test run + add_test ( + NAME H5COPY_SAME-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}.out.h5 + ) add_test ( NAME H5COPY_SAME-${testname}-prefill COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy${tgt_file_ext}> -i ./testfiles/${pfile} -o ./testfiles/${testname}.out.h5 -v -s ${psparam} -d ${pdparam} ) - if (HDF5_ENABLE_USING_MEMCHECKER) - if (last_test) - set_tests_properties (H5COPY_SAME-${testname}-prefill PROPERTIES DEPENDS ${last_test}) - endif () - else (HDF5_ENABLE_USING_MEMCHECKER) - set_tests_properties (H5COPY_SAME-${testname}-prefill PROPERTIES DEPENDS H5COPY_SAME-${testname}-clear-objects) - endif () + set_tests_properties (H5COPY_SAME-${testname}-prefill PROPERTIES DEPENDS H5COPY_SAME-${testname}-clear-objects) add_test ( NAME H5COPY_SAME-${testname} @@ -208,6 +203,15 @@ set_tests_properties (H5COPY_SAME-${testname}-DIFF PROPERTIES WILL_FAIL "true") endif () endif () + add_test ( + NAME H5COPY_SAME-${testname}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}.out.h5 + ) + if (NOT "${resultcode}" STREQUAL "2") + set_tests_properties (H5COPY_SAME-${testname}-clean-objects PROPERTIES DEPENDS H5COPY_SAME-${testname}-DIFF) + else () + set_tests_properties (H5COPY_SAME-${testname}-clean-objects PROPERTIES DEPENDS H5COPY_SAME-${testname}) + endif () endmacro () # @@ -215,21 +219,19 @@ # files instead of checking with h5ls. # macro (ADD_H5_CMP_TEST testname resultcode infile vparam sparam srcname dparam dstname) + # Remove any output file left over from previous test run + add_test ( + NAME H5COPY-CMP-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}.out.h5 + ) # If using memchecker add tests without using scripts if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5COPY-CMP-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5copy${tgt_file_ext}> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}) if ("${resultcode}" STREQUAL "1") set_tests_properties (H5COPY-CMP-${testname} PROPERTIES WILL_FAIL "true") endif () - if (last_test) - set_tests_properties (H5COPY-CMP-${testname} PROPERTIES DEPENDS ${last_test}) - endif () + set_tests_properties (H5COPY-CMP-${testname} PROPERTIES DEPENDS H5COPY-CMP-${testname}-clear-objects) else () - # Remove any output file left over from previous test run - add_test ( - NAME H5COPY-CMP-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}.out.h5 - ) add_test ( NAME H5COPY-CMP-${testname} COMMAND "${CMAKE_COMMAND}" @@ -246,6 +248,11 @@ ) set_tests_properties (H5COPY-CMP-${testname} PROPERTIES DEPENDS H5COPY-CMP-${testname}-clear-objects) endif () + add_test ( + NAME H5COPY-CMP-${testname}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}.out.h5 + ) + set_tests_properties (H5COPY-CMP-${testname}-clean-objects PROPERTIES DEPENDS H5COPY-CMP-${testname}) endmacro () macro (ADD_H5_UD_TEST testname resultcode infile sparam srcname dparam dstname cmpfile) @@ -308,6 +315,11 @@ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) set_tests_properties (H5COPY_UD-${testname}-DIFF PROPERTIES DEPENDS H5COPY_UD-${testname}) + add_test ( + NAME H5COPY_UD-${testname}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove testfiles/${testname}.out.h5 + ) + set_tests_properties (H5COPY_UD-${testname}-clean-objects PROPERTIES DEPENDS H5COPY_UD-${testname}-DIFF) endif () endmacro () @@ -315,7 +327,7 @@ if (NOT HDF5_ENABLE_USING_MEMCHECKER) # Remove any output file left over from previous test run add_test ( - NAME H5COPY_UD_ERR-${testname}-clearall-objects + NAME H5COPY_UD_ERR-${testname}-clear-objects COMMAND ${CMAKE_COMMAND} -E remove testfiles/${testname}_ERR.out.h5 ) if ("${resultcode}" STREQUAL "2") @@ -355,7 +367,7 @@ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) endif () - set_tests_properties (H5COPY_UD_ERR-${testname} PROPERTIES DEPENDS H5COPY_UD_ERR-${testname}-clearall-objects) + set_tests_properties (H5COPY_UD_ERR-${testname} PROPERTIES DEPENDS H5COPY_UD_ERR-${testname}-clear-objects) add_test ( NAME H5COPY_UD_ERR-${testname}-DIFF COMMAND "${CMAKE_COMMAND}" @@ -373,6 +385,11 @@ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) set_tests_properties (H5COPY_UD_ERR-${testname}-DIFF PROPERTIES DEPENDS H5COPY_UD_ERR-${testname}) + add_test ( + NAME H5COPY_UD_ERR-${testname}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove testfiles/${testname}_ERR.out.h5 + ) + set_tests_properties (H5COPY_UD_ERR-${testname}-clean-objects PROPERTIES DEPENDS H5COPY_UD_ERR-${testname}-DIFF) endif () endmacro () @@ -390,51 +407,6 @@ set (HDF_EXT_SRC_FILE h5copy_extlinks_src) set (HDF_EXT_TRG_FILE h5copy_extlinks_trg) - if (HDF5_ENABLE_USING_MEMCHECKER) - # Remove any output file left over from previous test run - add_test ( - NAME H5COPY-clearall-objects - COMMAND ${CMAKE_COMMAND} -E remove - simple.out.h5 - chunk.out.h5 - compact.out.h5 - compound.out.h5 - compressed.out.h5 - named_vl.out.h5 - nested_vl.out.h5 - simple_top.out.h5 - dsrename.out.h5 - grp_empty.out.h5 - grp_dsets.out.h5 - grp_nested.out.h5 - simple_group.out.h5 - grp_rename.out.h5 - grp_dsets_rename.out.h5 - A_B1_simple.out.h5 - A_B2_simple2.out.h5 - C_D_simple.out.h5 - E_F_grp_dsets.out.h5 - G_H_grp_nested.out.h5 - region_ref.out.h5 - ext_link.out.h5 - ext_link_f.out.h5 - ext_dangle_noobj.out.h5 - ext_dangle_noobj_f.out.h5 - ext_dangle_nofile.out.h5 - ext_dangle_nofile_f.out.h5 - ext_link_group.out.h5 - ext_link_group_f.out.h5 - samefile1.out.h5 - samefile2.out.h5 - h5copy_misc1.out.h5 - ) - set_tests_properties (H5COPY-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") - if (last_test) - set_tests_properties (H5COPY-clearall-objects PROPERTIES DEPENDS ${last_test}) - endif () - set (last_test "H5COPY-clearall-objects") - endif () - # See which filters are usable (and skip tests for filters we # don't have). Do this by searching H5pubconf.h to see which # filters are defined. diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake index 21761c6..8b53a39 100644 --- a/tools/test/h5diff/CMakeTests.cmake +++ b/tools/test/h5diff/CMakeTests.cmake @@ -397,13 +397,9 @@ # If using memchecker add tests without using scripts if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5DIFF-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_file_ext}> ${ARGN}) - set_tests_properties (H5DIFF-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") if (${resultcode}) set_tests_properties (H5DIFF-${resultfile} PROPERTIES WILL_FAIL "true") endif () - if (last_test) - set_tests_properties (H5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test}) - endif () else () add_test ( NAME H5DIFF-${resultfile} @@ -418,10 +414,10 @@ -D "TEST_APPEND=EXIT CODE:" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) - if (last_test) - set_tests_properties (H5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test}) - endif () endif () + set_tests_properties (H5DIFF-${resultfile} PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" + ) endmacro () macro (ADD_PH5_TEST resultfile resultcode) @@ -432,9 +428,6 @@ if (${resultcode}) set_tests_properties (MPI_TEST_H5DIFF-${resultfile} PROPERTIES WILL_FAIL "true") endif () - if (last_test) - set_tests_properties (MPI_TEST_H5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test}) - endif () else () add_test ( NAME MPI_TEST_H5DIFF-${resultfile} @@ -451,11 +444,10 @@ -D "TEST_SORT_COMPARE=TRUE" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) - if (last_test) - set_tests_properties (MPI_TEST_H5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test}) - endif () - set (last_test "MPI_TEST_H5DIFF-${resultfile}") endif () + set_tests_properties (MPI_TEST_H5DIFF-${resultfile} PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/PAR/testfiles" + ) endmacro () macro (ADD_H5_UD_TEST testname resultcode resultfile) @@ -495,9 +487,6 @@ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) endif () - if (last_test) - set_tests_properties (H5DIFF_UD-${testname} PROPERTIES DEPENDS ${last_test}) - endif () endif () endmacro () @@ -572,400 +561,6 @@ set (FILEV4 4_vds.h5) set (FILEV5 5_vds.h5) - 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 - h5diff_10.out - h5diff_10.out.err - h5diff_100.out - h5diff_100.out.err - h5diff_101.out - h5diff_101.out.err - h5diff_102.out - h5diff_102.out.err - h5diff_103.out - h5diff_103.out.err - h5diff_104.out - h5diff_104.out.err - h5diff_11.out - h5diff_11.out.err - h5diff_12.out - h5diff_12.out.err - h5diff_13.out - h5diff_13.out.err - h5diff_14.out - h5diff_14.out.err - h5diff_15.out - h5diff_15.out.err - h5diff_16_1.out - h5diff_16_1.out.err - h5diff_16_2.out - h5diff_16_2.out.err - h5diff_16_3.out - h5diff_16_3.out.err - h5diff_17.out - h5diff_17.out.err - h5diff_171.out - h5diff_171.out.err - h5diff_172.out - h5diff_172.out.err - h5diff_18_1.out - h5diff_18_1.out.err - h5diff_18.out - h5diff_18.out.err - h5diff_20.out - h5diff_20.out.err - h5diff_200.out - h5diff_200.out.err - h5diff_201.out - h5diff_201.out.err - h5diff_202.out - h5diff_202.out.err - h5diff_203.out - h5diff_203.out.err - h5diff_204.out - h5diff_204.out.err - h5diff_205.out - h5diff_205.out.err - h5diff_206.out - h5diff_206.out.err - h5diff_207.out - h5diff_207.out.err - h5diff_208.out - h5diff_208.out.err - h5diff_220.out - h5diff_220.out.err - h5diff_221.out - h5diff_221.out.err - h5diff_222.out - h5diff_222.out.err - h5diff_223.out - h5diff_223.out.err - h5diff_224.out - h5diff_224.out.err - h5diff_21.out - h5diff_21.out.err - h5diff_22.out - h5diff_22.out.err - h5diff_23.out - h5diff_23.out.err - h5diff_24.out - h5diff_24.out.err - h5diff_25.out - h5diff_25.out.err - h5diff_26.out - h5diff_26.out.err - h5diff_27.out - h5diff_27.out.err - h5diff_28.out - h5diff_28.out.err - h5diff_300.out - h5diff_300.out.err - h5diff_400.out - h5diff_400.out.err - h5diff_401.out - h5diff_401.out.err - h5diff_402.out - h5diff_402.out.err - h5diff_403.out - h5diff_403.out.err - h5diff_404.out - h5diff_404.out.err - h5diff_405.out - h5diff_405.out.err - h5diff_406.out - h5diff_406.out.err - h5diff_407.out - h5diff_407.out.err - h5diff_408.out - h5diff_408.out.err - h5diff_409.out - h5diff_409.out.err - h5diff_410.out - h5diff_410.out.err - h5diff_411.out - h5diff_411.out.err - h5diff_412.out - h5diff_412.out.err - h5diff_413.out - h5diff_413.out.err - h5diff_414.out - h5diff_414.out.err - h5diff_415.out - h5diff_415.out.err - h5diff_416.out - h5diff_416.out.err - h5diff_417.out - h5diff_417.out.err - h5diff_418.out - h5diff_418.out.err - h5diff_419.out - h5diff_419.out.err - h5diff_420.out - h5diff_420.out.err - h5diff_421.out - h5diff_421.out.err - h5diff_422.out - h5diff_422.out.err - h5diff_423.out - h5diff_423.out.err - h5diff_424.out - h5diff_424.out.err - h5diff_425.out - h5diff_425.out.err - h5diff_450.out - h5diff_450.out.err - h5diff_451.out - h5diff_451.out.err - h5diff_452.out - h5diff_452.out.err - h5diff_453.out - h5diff_453.out.err - h5diff_454.out - h5diff_454.out.err - h5diff_455.out - h5diff_455.out.err - h5diff_456.out - h5diff_456.out.err - h5diff_457.out - h5diff_457.out.err - h5diff_458.out - h5diff_458.out.err - h5diff_459.out - h5diff_459.out.err - h5diff_465.out - h5diff_465.out.err - h5diff_466.out - h5diff_466.out.err - h5diff_467.out - h5diff_467.out.err - h5diff_468.out - h5diff_468.out.err - h5diff_469.out - h5diff_469.out.err - h5diff_471.out - h5diff_471.out.err - h5diff_472.out - h5diff_472.out.err - h5diff_473.out - h5diff_473.out.err - h5diff_474.out - h5diff_474.out.err - h5diff_475.out - h5diff_475.out.err - h5diff_480.out - h5diff_480.out.err - h5diff_481.out - h5diff_481.out.err - h5diff_482.out - h5diff_482.out.err - h5diff_483.out - h5diff_483.out.err - h5diff_484.out - h5diff_484.out.err - h5diff_50.out - h5diff_50.out.err - h5diff_51.out - h5diff_51.out.err - h5diff_52.out - h5diff_52.out.err - h5diff_53.out - h5diff_53.out.err - h5diff_54.out - h5diff_54.out.err - h5diff_55.out - h5diff_55.out.err - h5diff_56.out - h5diff_56.out.err - h5diff_57.out - h5diff_57.out.err - h5diff_58.out - h5diff_58.out.err - h5diff_59.out - h5diff_59.out.err - h5diff_500.out - h5diff_500.out.err - h5diff_501.out - h5diff_501.out.err - h5diff_502.out - h5diff_502.out.err - h5diff_503.out - h5diff_503.out.err - h5diff_504.out - h5diff_504.out.err - h5diff_505.out - h5diff_505.out.err - h5diff_506.out - h5diff_506.out.err - h5diff_507.out - h5diff_507.out.err - h5diff_508.out - h5diff_508.out.err - h5diff_509.out - h5diff_509.out.err - h5diff_510.out - h5diff_510.out.err - h5diff_511.out - h5diff_511.out.err - h5diff_512.out - h5diff_512.out.err - h5diff_513.out - h5diff_513.out.err - h5diff_514.out - h5diff_514.out.err - h5diff_515.out - h5diff_515.out.err - h5diff_516.out - h5diff_516.out.err - h5diff_517.out - h5diff_517.out.err - h5diff_518.out - h5diff_518.out.err - h5diff_530.out - h5diff_530.out.err - h5diff_540.out - h5diff_540.out.err - h5diff_60.out - h5diff_60.out.err - h5diff_61.out - h5diff_61.out.err - h5diff_62.out - h5diff_62.out.err - h5diff_63.out - h5diff_63.out.err - h5diff_600.out - h5diff_600.out.err - h5diff_601.out - h5diff_601.out.err - h5diff_603.out - h5diff_603.out.err - h5diff_604.out - h5diff_604.out.err - h5diff_605.out - h5diff_605.out.err - h5diff_606.out - h5diff_606.out.err - h5diff_607.out - h5diff_607.out.err - h5diff_608.out - h5diff_608.out.err - h5diff_609.out - h5diff_609.out.err - h5diff_610.out - h5diff_610.out.err - h5diff_612.out - h5diff_612.out.err - h5diff_613.out - h5diff_613.out.err - h5diff_614.out - h5diff_614.out.err - h5diff_615.out - h5diff_615.out.err - h5diff_616.out - h5diff_616.out.err - h5diff_617.out - h5diff_617.out.err - h5diff_618.out - h5diff_618.out.err - h5diff_619.out - h5diff_619.out.err - h5diff_621.out - h5diff_621.out.err - h5diff_622.out - h5diff_622.out.err - h5diff_623.out - h5diff_623.out.err - h5diff_624.out - h5diff_624.out.err - h5diff_625.out - h5diff_625.out.err - h5diff_626.out - h5diff_626.out.err - h5diff_627.out - h5diff_627.out.err - h5diff_628.out - h5diff_628.out.err - h5diff_629.out - h5diff_629.out.err - h5diff_640.out - h5diff_640.out.err - h5diff_641.out - h5diff_641.out.err - h5diff_642.out - h5diff_642.out.err - h5diff_643.out - h5diff_643.out.err - h5diff_644.out - h5diff_644.out.err - h5diff_645.out - h5diff_645.out.err - h5diff_646.out - h5diff_646.out.err - h5diff_70.out - h5diff_70.out.err - h5diff_700.out - h5diff_700.out.err - h5diff_701.out - h5diff_701.out.err - h5diff_702.out - h5diff_702.out.err - h5diff_703.out - h5diff_703.out.err - h5diff_704.out - h5diff_704.out.err - h5diff_705.out - h5diff_705.out.err - h5diff_706.out - h5diff_706.out.err - h5diff_707.out - h5diff_707.out.err - h5diff_708.out - h5diff_708.out.err - h5diff_709.out - h5diff_709.out.err - h5diff_710.out - h5diff_710.out.err - h5diff_80.out - h5diff_80.out.err - h5diff_800.out - h5diff_800.out.err - h5diff_801.out - h5diff_801.out.err - h5diff_830.out - h5diff_830.out.err - h5diff_8625.out - h5diff_8625.out.err - h5diff_8639.out - h5diff_8639.out.err - h5diff_90.out - h5diff_90.out.err - h5diff_900.out - h5diff_900.out.err - h5diff_901.out - h5diff_901.out.err - h5diff_902.out - h5diff_902.out.err - h5diff_v1.out - h5diff_v1.out.err - h5diff_v2.out - h5diff_v2.out.err - h5diff_v3.out - h5diff_v3.out.err - h5diff_vlstr.out - h5diff_vlstr.out.err - h5diff_eps.out - h5diff_eps.out.err - ) - set_tests_properties (H5DIFF-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") - if (last_test) - set_tests_properties (H5DIFF-clearall-objects PROPERTIES DEPENDS ${last_test}) - endif () - set (last_test "H5DIFF-clearall-objects") - endif () - # ############################################################################ # # Common usage # ############################################################################ diff --git a/tools/test/h5dump/CMakeTests.cmake b/tools/test/h5dump/CMakeTests.cmake index 4fa9a8f..118fac4 100644 --- a/tools/test/h5dump/CMakeTests.cmake +++ b/tools/test/h5dump/CMakeTests.cmake @@ -444,11 +444,6 @@ # If using memchecker add tests without using scripts if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5DUMP-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> ${ARGN}) - set_tests_properties (H5DUMP-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - if (last_test) - set_tests_properties (H5DUMP-${testname} PROPERTIES DEPENDS ${last_test}) - endif () - set (last_test "H5DUMP-${testname}") else () add_test ( NAME H5DUMP-${testname} @@ -462,10 +457,10 @@ -D "TEST_REFERENCE=h5dump-${testname}.txt" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) - if (last_test) - set_tests_properties (H5DUMP-${testname} PROPERTIES DEPENDS ${last_test}) - endif () endif () + set_tests_properties (H5DUMP-${testname} PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std" + ) endmacro () macro (ADD_SKIP_H5_TEST skipresultfile skipresultcode testtype) @@ -486,19 +481,13 @@ # If using memchecker add tests without using scripts if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> ${ARGN}) - set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") if (${resultcode}) set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true") endif () - if (last_test) - set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test}) - endif () - else () - add_test ( - NAME H5DUMP-${resultfile}-clear-objects - COMMAND ${CMAKE_COMMAND} -E remove ${resultfile}.bin + set_tests_properties (H5DUMP-${resultfile} PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std" ) - set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + else () add_test ( NAME H5DUMP-${resultfile} COMMAND "${CMAKE_COMMAND}" @@ -511,27 +500,32 @@ -D "TEST_REFERENCE=${resultfile}.ddl" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) - set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects") endif () + set_tests_properties (H5DUMP-${resultfile} PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std" + ) endmacro () macro (ADD_H5_TEST_N resultfile resultcode) + add_test ( + NAME H5DUMP-N-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} -E remove + ${resultfile}-N.bin + ) + set_tests_properties (H5DUMP-N-${resultfile}-clear-objects PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std" + ) # If using memchecker add tests without using scripts if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5DUMP-N-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> ${ARGN}) - set_tests_properties (H5DUMP-N-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") if (${resultcode}) set_tests_properties (H5DUMP-N-${resultfile} PROPERTIES WILL_FAIL "true") endif () - if (last_test) - set_tests_properties (H5DUMP-N-${resultfile} PROPERTIES DEPENDS ${last_test}) - endif () - else () - add_test ( - NAME H5DUMP-N-${resultfile}-clear-objects - COMMAND ${CMAKE_COMMAND} -E remove ${resultfile}-N.bin + set_tests_properties (H5DUMP-N-${resultfile} PROPERTIES + DEPENDS H5DUMP-N-${resultfile}-clear-objects + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std" ) - set_tests_properties (H5DUMP-N-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + else () add_test ( NAME H5DUMP-N-${resultfile} COMMAND "${CMAKE_COMMAND}" @@ -544,27 +538,41 @@ -D "TEST_REFERENCE=${resultfile}-N.ddl" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) - set_tests_properties (H5DUMP-N-${resultfile} PROPERTIES DEPENDS "H5DUMP-N-${resultfile}-clear-objects") endif () + set_tests_properties (H5DUMP-N-${resultfile} PROPERTIES + DEPENDS H5DUMP-N-${resultfile}-clear-objects + ) + add_test ( + NAME H5DUMP-N-${resultfile}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove + ${resultfile}-N.bin + ) + set_tests_properties (H5DUMP-N-${resultfile}-clean-objects PROPERTIES + DEPENDS H5DUMP-N-${resultfile} + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std" + ) endmacro () macro (ADD_H5_TEST_EXPORT resultfile targetfile resultcode) + add_test ( + NAME H5DUMP-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} -E remove + ${resultfile}.txt + ) + set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std" + ) # If using memchecker add tests without using scripts if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> ${ARGN} ${resultfile}.txt ${targetfile}) - set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") if (${resultcode}) set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true") endif () - if (last_test) - set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test}) - endif () - else () - add_test ( - NAME H5DUMP-${resultfile}-clear-objects - COMMAND ${CMAKE_COMMAND} -E remove ${resultfile}.txt + set_tests_properties (H5DUMP-${resultfile} PROPERTIES + DEPENDS H5DUMP-${resultfile}-clear-objects + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std" ) - set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + else () add_test ( NAME H5DUMP-${resultfile} COMMAND "${CMAKE_COMMAND}" @@ -577,35 +585,58 @@ -D "TEST_REFERENCE=${resultfile}.ddl" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) - set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects") + set_tests_properties (H5DUMP-${resultfile} PROPERTIES + DEPENDS H5DUMP-${resultfile}-clear-objects + ) add_test ( NAME H5DUMP-${resultfile}-output-cmp COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${resultfile}.txt ${resultfile}.exp ) - set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES + DEPENDS H5DUMP-${resultfile} + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std" + ) set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES DEPENDS H5DUMP-${resultfile}) endif () + add_test ( + NAME H5DUMP-${resultfile}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove + ${resultfile}.txt + ) + if (HDF5_ENABLE_USING_MEMCHECKER) + set_tests_properties (H5DUMP-${resultfile}-clean-objects PROPERTIES + DEPENDS H5DUMP-${resultfile} + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std" + ) + else () + set_tests_properties (H5DUMP-${resultfile}-clean-objects PROPERTIES + DEPENDS H5DUMP-${resultfile}-output-cmp + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std" + ) + endif () endmacro () macro (ADD_H5_TEST_EXPORT_DDL resultfile targetfile resultcode ddlfile) + add_test ( + NAME H5DUMP-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} -E remove + ${ddlfile}.txt + ${resultfile}.txt + ) + set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std" + ) # If using memchecker add tests without using scripts if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> --ddl=${ddlfile}.txt ${ARGN} ${resultfile}.txt ${targetfile}) - set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") if (${resultcode}) set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true") endif () - if (last_test) - set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test}) - endif () - else () - add_test ( - NAME H5DUMP-${resultfile}-clear-objects - COMMAND ${CMAKE_COMMAND} -E remove - ${ddlfile}.txt - ${resultfile}.txt + set_tests_properties (H5DUMP-${resultfile} PROPERTIES + DEPENDS H5DUMP-${resultfile}-clear-objects + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std" ) - set_tests_properties (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + else () add_test ( NAME H5DUMP-${resultfile} COMMAND "${CMAKE_COMMAND}" @@ -618,19 +649,43 @@ -D "TEST_REFERENCE=${resultfile}.ddl" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) - set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects") + set_tests_properties (H5DUMP-${resultfile} PROPERTIES + DEPENDS H5DUMP-${resultfile}-clear-objects + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std" + ) add_test ( NAME H5DUMP-${resultfile}-output-cmp COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${resultfile}.txt ${resultfile}.exp ) - set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES DEPENDS H5DUMP-${resultfile}) + set_tests_properties (H5DUMP-${resultfile}-output-cmp PROPERTIES + DEPENDS H5DUMP-${resultfile} + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std" + ) add_test ( NAME H5DUMP-${resultfile}-output-cmp-ddl COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${ddlfile}.txt ${ddlfile}.exp ) - set_tests_properties (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - set_tests_properties (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES DEPENDS H5DUMP-${resultfile}-output-cmp) + set_tests_properties (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES + DEPENDS H5DUMP-${resultfile}-output-cmp + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std" + ) + endif () + add_test ( + NAME H5DUMP-${resultfile}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove + ${ddlfile}.txt + ${resultfile}.txt + ) + if (HDF5_ENABLE_USING_MEMCHECKER) + set_tests_properties (H5DUMP-${resultfile}-clean-objects PROPERTIES + DEPENDS H5DUMP-${resultfile} + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std" + ) + else () + set_tests_properties (H5DUMP-${resultfile}-clean-objects PROPERTIES + DEPENDS H5DUMP-${resultfile}-output-cmp-ddl + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std" + ) endif () endmacro () @@ -638,21 +693,37 @@ if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5DUMP-output-${resultfile}-clear-objects - COMMAND ${CMAKE_COMMAND} -E remove ${resultfile}.txt + COMMAND ${CMAKE_COMMAND} -E remove + ${resultfile}.txt + ) + set_tests_properties (H5DUMP-output-${resultfile}-clear-objects PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std" ) - set_tests_properties (H5DUMP-output-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") add_test ( NAME H5DUMP-output-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> ${ARGN} ${resultfile}.txt ${targetfile} ) - set_tests_properties (H5DUMP-output-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - set_tests_properties (H5DUMP-output-${resultfile} PROPERTIES DEPENDS H5DUMP-output-${resultfile}-clear-objects) + set_tests_properties (H5DUMP-output-${resultfile} PROPERTIES + DEPENDS H5DUMP-output-${resultfile}-clear-objects + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std" + ) add_test ( NAME H5DUMP-output-cmp-${resultfile} COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${resultfile}.txt ${resultfile}.exp ) - set_tests_properties (H5DUMP-output-cmp-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - set_tests_properties (H5DUMP-output-cmp-${resultfile} PROPERTIES DEPENDS H5DUMP-output-${resultfile}) + set_tests_properties (H5DUMP-output-cmp-${resultfile} PROPERTIES + DEPENDS H5DUMP-output-${resultfile} + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std" + ) + add_test ( + NAME H5DUMP-output-${resultfile}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove + ${resultfile}.txt + ) + set_tests_properties (H5DUMP-output-${resultfile}-clean-objects PROPERTIES + DEPENDS H5DUMP-output-cmp-${resultfile} + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std" + ) endif () endmacro () @@ -671,6 +742,9 @@ -D "TEST_MASK_ERROR=true" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) + set_tests_properties (H5DUMP-${resultfile} PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std" + ) endif () endmacro () @@ -688,6 +762,9 @@ -D "TEST_REFERENCE=${result_check}" -P "${HDF_RESOURCES_EXT_DIR}/grepTest.cmake" ) + set_tests_properties (H5DUMP-${resultfile} PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std" + ) endif () endmacro () @@ -706,6 +783,9 @@ -D "TEST_ERRREF=${result_errcheck}" -P "${HDF_RESOURCES_EXT_DIR}/grepTest.cmake" ) + set_tests_properties (H5DUMP-${resultfile} PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std" + ) endif () endmacro () @@ -726,6 +806,46 @@ -D "TEST_ENV_VALUE:STRING=${envval}" -P "${HDF_RESOURCES_EXT_DIR}/grepTest.cmake" ) + set_tests_properties (H5DUMP-${resultfile} PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std" + ) + endif () + endmacro () + + macro (ADD_H5_BIN_EXPORT conffile resultcode testfile) + if (NOT HDF5_ENABLE_USING_MEMCHECKER) + add_test ( + NAME H5DUMP-BIN_EXPORT-${conffile}-clear-objects + COMMAND ${CMAKE_COMMAND} -E remove + ${conffile}.bin + ) + set_tests_properties (H5DUMP-BIN_EXPORT-${conffile}-clear-objects PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std" + ) + add_test ( + NAME H5DUMP-BIN_EXPORT-${conffile} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" + -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>" + -D "TEST_ARGS:STRING=${ARGN};-o;${conffile}.bin;${testfile}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std" + -D "TEST_OUTPUT=${conffile}.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_REFERENCE=${conffile}.ddl" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + set_tests_properties (H5DUMP-BIN_EXPORT-${conffile} PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std" + ) + add_test ( + NAME H5DUMP-BIN_EXPORT-${conffile}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove + ${conffile}.bin + ) + set_tests_properties (H5DUMP-BIN_EXPORT-${conffile}-clean-objects PROPERTIES + DEPENDS H5DUMP-BIN_EXPORT-${conffile} + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std" + ) endif () endmacro () @@ -738,7 +858,9 @@ ${resultfile}.bin ${resultfile}.h5 ) - set_tests_properties (H5DUMP-IMPORT-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") + set_tests_properties (H5DUMP-IMPORT-${resultfile}-clear-objects PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std" + ) add_test ( NAME H5DUMP-IMPORT-${resultfile} COMMAND "${CMAKE_COMMAND}" @@ -751,20 +873,37 @@ -D "TEST_REFERENCE=${conffile}.ddl" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) - set_tests_properties (H5DUMP-IMPORT-${resultfile} PROPERTIES DEPENDS "H5DUMP-IMPORT-${resultfile}-clear-objects") + set_tests_properties (H5DUMP-IMPORT-${resultfile} PROPERTIES + DEPENDS H5DUMP-IMPORT-${resultfile}-clear-objects + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std" + ) add_test (NAME H5DUMP-IMPORT-h5import-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5import${tgt_file_ext}> ${resultfile}.bin -c ${conffile}.out -o ${resultfile}.h5) - set_tests_properties (H5DUMP-IMPORT-h5import-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - set_tests_properties (H5DUMP-IMPORT-h5import-${resultfile} PROPERTIES DEPENDS H5DUMP-IMPORT-${resultfile}) + set_tests_properties (H5DUMP-IMPORT-h5import-${resultfile} PROPERTIES + DEPENDS H5DUMP-IMPORT-${resultfile} + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std" + ) add_test (NAME H5DUMP-IMPORT-h5diff-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_file_ext}> ${testfile} ${resultfile}.h5 /integer /integer) - set_tests_properties (H5DUMP-IMPORT-h5diff-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std") - set_tests_properties (H5DUMP-IMPORT-h5diff-${resultfile} PROPERTIES DEPENDS H5DUMP-IMPORT-h5import-${resultfile}) + set_tests_properties (H5DUMP-IMPORT-h5diff-${resultfile} PROPERTIES + DEPENDS H5DUMP-IMPORT-h5import-${resultfile} + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std" + ) + add_test ( + NAME H5DUMP-IMPORT-${resultfile}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove + ${resultfile}.bin + ${resultfile}.h5 + ) + set_tests_properties (H5DUMP-IMPORT-${resultfile}-clean-objects PROPERTIES + DEPENDS H5DUMP-IMPORT-h5diff-${resultfile} + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std" + ) endif () endmacro () macro (ADD_H5_UD_TEST testname resultcode resultfile) if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( - NAME H5DUMP_UD-${testname} + NAME H5DUMP_UD-${testname}-${resultfile} COMMAND "${CMAKE_COMMAND}" -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>" @@ -778,6 +917,9 @@ -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_OUTPUT_DIRECTORY}" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) + set_tests_properties (H5DUMP_UD-${testname}-${resultfile} PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std" + ) endif () endmacro () @@ -1113,7 +1255,7 @@ ADD_H5_TEST (tvms 0 --enable-error-stack tvms.h5) # test for binary output - ADD_H5_TEST (tbin1LE 0 --enable-error-stack -d integer -o tbin1LE.bin -b LE tbinary.h5) + ADD_H5_BIN_EXPORT (tbin1LE 0 tbinary.h5 --enable-error-stack -d integer -b LE) # test for string binary output ADD_H5_EXPORT_TEST (tstr2bin2 tstr2.h5 0 --enable-error-stack -d /g2/dset2 -b -o) @@ -1123,14 +1265,14 @@ # ADD_H5_TEST_IMPORT (tbin1 out1D tbinary.h5 0 --enable-error-stack -d integer -b) if (NOT HDF5_ENABLE_USING_MEMCHECKER) - ADD_H5_TEST (tbin2 0 --enable-error-stack -b BE -d float -o tbin2.bin tbinary.h5) + ADD_H5_BIN_EXPORT (tbin2 0 tbinary.h5 --enable-error-stack -b BE -d float) endif () # the NATIVE test can be validated with h5import/h5diff # ADD_H5_TEST_IMPORT (tbin3 out3D tbinary.h5 0 --enable-error-stack -d integer -b NATIVE) if (NOT HDF5_ENABLE_USING_MEMCHECKER) - ADD_H5_TEST (tbin4 0 --enable-error-stack -d double -b FILE -o tbin4.bin tbinary.h5) + ADD_H5_BIN_EXPORT (tbin4 0 tbinary.h5 --enable-error-stack -d double -b FILE) endif () # test for dataset region references diff --git a/tools/test/h5dump/CMakeTestsPBITS.cmake b/tools/test/h5dump/CMakeTestsPBITS.cmake index 0c3297f..8bf0940 100644 --- a/tools/test/h5dump/CMakeTestsPBITS.cmake +++ b/tools/test/h5dump/CMakeTestsPBITS.cmake @@ -120,16 +120,21 @@ ############################################################################## macro (ADD_H5_PBITS_TEST resultfile resultcode) + 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/pbits" + ) # If using memchecker add tests without using scripts if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> ${ARGN}) - set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits") if (${resultcode}) set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true") endif () - if (last_pbits_test) - set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_pbits_test}) - endif () else () add_test ( NAME H5DUMP-${resultfile} @@ -144,6 +149,20 @@ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) endif () + set_tests_properties (H5DUMP-${resultfile} PROPERTIES + DEPENDS H5DUMP-${resultfile}-clear-objects + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits" + ) + add_test ( + NAME H5DUMP-${resultfile}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove + ${resultfile}.out + ${resultfile}.out.err + ) + set_tests_properties (H5DUMP-${resultfile}-clean-objects PROPERTIES + DEPENDS H5DUMP-${resultfile} + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits" + ) endmacro () ############################################################################## diff --git a/tools/test/h5dump/CMakeTestsVDS.cmake b/tools/test/h5dump/CMakeTestsVDS.cmake index 88df9ad..017a9fe 100644 --- a/tools/test/h5dump/CMakeTestsVDS.cmake +++ b/tools/test/h5dump/CMakeTestsVDS.cmake @@ -117,15 +117,20 @@ macro (ADD_H5_VDS_TEST resultfile resultcode) # If using memchecker add tests without using scripts + 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/vds" + ) if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5DUMP-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> ${ARGN}) - set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds") if (${resultcode}) set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true") endif () - if (last_vds_test) - set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_VDS_test}) - endif () else () add_test ( NAME H5DUMP-${resultfile} @@ -140,6 +145,20 @@ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) endif () + set_tests_properties (H5DUMP-${resultfile} PROPERTIES + DEPENDS H5DUMP-${resultfile}-clear-objects + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds" + ) + add_test ( + NAME H5DUMP-${resultfile}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove + ${resultfile}.out + ${resultfile}.out.err + ) + set_tests_properties (H5DUMP-${resultfile}-clean-objects PROPERTIES + DEPENDS H5DUMP-${resultfile} + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds" + ) endmacro () macro (ADD_H5_VDS_PREFIX_TEST resultfile resultcode) diff --git a/tools/test/h5dump/CMakeTestsXML.cmake b/tools/test/h5dump/CMakeTestsXML.cmake index d735257..a09256d 100644 --- a/tools/test/h5dump/CMakeTestsXML.cmake +++ b/tools/test/h5dump/CMakeTestsXML.cmake @@ -175,15 +175,20 @@ endmacro () macro (ADD_XML_H5_TEST resultfile resultcode) + add_test ( + NAME H5DUMP_XML-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} -E remove + ${resultfile}.out + ${resultfile}.out.err + ) + set_tests_properties (H5DUMP_XML-${resultfile}-clear-objects PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml" + ) if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5DUMP_XML-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5dump${tgt_file_ext}> --xml ${ARGN}) - set_tests_properties (H5DUMP_XML-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml") if (${resultcode}) set_tests_properties (H5DUMP_XML-${resultfile} PROPERTIES WILL_FAIL "true") endif () - if (last_xml_test) - set_tests_properties (H5DUMP_XML-${resultfile} PROPERTIES DEPENDS ${last_xml_test}) - endif () else () add_test ( NAME H5DUMP_XML-${resultfile} @@ -198,6 +203,20 @@ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) endif () + set_tests_properties (H5DUMP_XML-${resultfile} PROPERTIES + DEPENDS H5DUMP_XML-${resultfile}-clear-objects + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml" + ) + add_test ( + NAME H5DUMP_XML-${resultfile}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove + ${resultfile}.out + ${resultfile}.out.err + ) + set_tests_properties (H5DUMP_XML-${resultfile}-clean-objects PROPERTIES + DEPENDS H5DUMP_XML-${resultfile} + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml" + ) endmacro () ############################################################################## diff --git a/tools/test/h5dump/CMakeVFDTests.cmake b/tools/test/h5dump/CMakeVFDTests.cmake index 7ab8c1f..bd189da 100644 --- a/tools/test/h5dump/CMakeVFDTests.cmake +++ b/tools/test/h5dump/CMakeVFDTests.cmake @@ -42,6 +42,15 @@ add_custom_target(HDF5_VFD_H5DUMP_files ALL COMMENT "Copying files needed by HDF macro (ADD_VFD_H5DUMP_TEST vfdname resultfile resultcode) if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( + NAME H5DUMP_VFD-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} -E remove + ${resultfile}.out + ${resultfile}.out.err + ) + set_tests_properties (H5DUMP_VFD-${resultfile}-clear-objects PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdname}" + ) + add_test ( NAME H5DUMP_VFD-${vfdname}-${resultfile}-h5dump COMMAND "${CMAKE_COMMAND}" -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" @@ -55,6 +64,21 @@ macro (ADD_VFD_H5DUMP_TEST vfdname resultfile resultcode) -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" ) set_tests_properties (H5DUMP_VFD-${vfdname}-${resultfile}-h5dump PROPERTIES TIMEOUT ${CTEST_SHORT_TIMEOUT}) + set_tests_properties (H5DUMP_VFD-${resultfile} PROPERTIES + DEPENDS H5DUMP_VFD-${resultfile}-clear-objects + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdname}" + ) + add_test ( + NAME H5DUMP_VFD-${resultfile}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove + ${resultfile}.out + ${resultfile}.out.err + ) + set_tests_properties (H5DUMP_VFD-${resultfile}-clean-objects PROPERTIES + DEPENDS H5DUMP_VFD-${resultfile} + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdname}" + ) + endmacro () endif () endmacro () diff --git a/tools/test/h5format_convert/CMakeTests.cmake b/tools/test/h5format_convert/CMakeTests.cmake index 00a28bb..0f68a79 100644 --- a/tools/test/h5format_convert/CMakeTests.cmake +++ b/tools/test/h5format_convert/CMakeTests.cmake @@ -101,49 +101,58 @@ # If using memchecker add tests without using scripts if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( - NAME H5FC-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/outtmp.h5 + NAME H5FC-${testname}-${testfile}-clear-objects + COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}-tmp.h5 ) - if (last_test) - set_tests_properties (H5FC-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) - endif () if (${testfile}) add_test ( NAME H5FC-${testname}-${testfile}-tmpfile - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/testfiles/${testfile} ./testfiles/outtmp.h5 + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/testfiles/${testfile} ./testfiles/${testname}-tmp.h5 + ) + set_tests_properties (H5FC-${testname}-${testfile}-tmpfile PROPERTIES + DEPENDS H5FC-${testname}-${testfile}-clear-objects ) - set_tests_properties (H5FC-${testname}-${testfile}-tmpfile PROPERTIES DEPENDS "H5FC-${testname}-clear-objects") add_test ( NAME H5FC-${testname}-${testfile} COMMAND "${CMAKE_COMMAND}" -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_file_ext}>" - -D "TEST_ARGS=${ARGN};outtmp.h5" + -D "TEST_ARGS=${ARGN};${testname}-tmp.h5" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" - -D "TEST_OUTPUT=${testname}.out" + -D "TEST_OUTPUT=${testname}-${testfile}.out" -D "TEST_EXPECT=${resultcode}" -D "TEST_REFERENCE=${resultfile}" -D "TEST_ERRREF=${resultfile}.err" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) - set_tests_properties (H5FC-${testname}-${testfile} PROPERTIES DEPENDS "H5FC-${testname}-${testfile}-tmpfile") + set_tests_properties (H5FC-${testname}-${testfile} PROPERTIES + DEPENDS H5FC-${testname}-${testfile}-tmpfile + ) set (last_test "H5FC-${testname}-${testfile}") else () add_test ( - NAME H5FC-${testname}-NA + NAME H5FC-${testname}-${testfile}-NA COMMAND "${CMAKE_COMMAND}" -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_file_ext}>" -D "TEST_ARGS=${ARGN}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" - -D "TEST_OUTPUT=${testname}.out" + -D "TEST_OUTPUT=${testname}-${testfile}.out" -D "TEST_EXPECT=${resultcode}" -D "TEST_REFERENCE=${resultfile}" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) - set_tests_properties (H5FC-${testname}-NA PROPERTIES DEPENDS "H5FC-${testname}-clear-objects") - set (last_test "H5FC-${testname}-NA") + set_tests_properties (H5FC-${testname}-${testfile}-NA PROPERTIES + DEPENDS H5FC-${testname}-${testfile}-tmpfile + ) endif () + add_test ( + NAME H5FC-${testname}-${testfile}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}-tmp.h5 + ) + set_tests_properties (H5FC-${testname}-${testfile}-clean-objects PROPERTIES + DEPENDS H5FC-${testname}-${testfile}-NA + ) endif () endmacro () @@ -151,31 +160,38 @@ # If using memchecker add tests without using scripts if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( - NAME H5FC-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/outtmp.h5 + NAME H5FC-${testname}-${testfile}-clear-objects + COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}-tmp.h5 ) - if (last_test) - set_tests_properties (H5FC-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) - endif () add_test ( NAME H5FC-${testname}-${testfile}-tmpfile - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/testfiles/${testfile} ./testfiles/outtmp.h5 + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/testfiles/${testfile} ./testfiles/${testname}-tmp.h5 + ) + set_tests_properties (H5FC-${testname}-${testfile}-tmpfile PROPERTIES + DEPENDS H5FC-${testname}-${testfile}-clear-object ) - set_tests_properties (H5FC-${testname}-${testfile}-tmpfile PROPERTIES DEPENDS "H5FC-${testname}-clear-objects") add_test ( NAME H5FC-${testname}-${testfile} COMMAND "${CMAKE_COMMAND}" -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_file_ext}>" - -D "TEST_ARGS=${ARGN};outtmp.h5" + -D "TEST_ARGS=${ARGN};${testname}-tmp.h5" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" - -D "TEST_OUTPUT=${testname}.out" + -D "TEST_OUTPUT=${testname}-${testfile}.out" -D "TEST_EXPECT=${resultcode}" -D "TEST_REFERENCE=${resultfile}" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) - set_tests_properties (H5FC-${testname}-${testfile} PROPERTIES DEPENDS "H5FC-${testname}-${testfile}-tmpfile") - set (last_test "H5FC-${testname}-${testfile}") + set_tests_properties (H5FC-${testname}-${testfile} PROPERTIES + DEPENDS H5FC-${testname}-${testfile}-tmpfile + ) + add_test ( + NAME H5FC-${testname}-${testfile}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}-tmp.h5 + ) + set_tests_properties (H5FC-${testname}-${testfile}-clean-objects PROPERTIES + DEPENDS H5FC-${testname}-${testfile} + ) endif () endmacro () @@ -183,32 +199,39 @@ # If using memchecker add tests without using scripts if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( - NAME H5FC-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/outtmp.h5 + NAME H5FC-${testname}-${testfile}-clear-objects + COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}-tmp.h5 ) - if (last_test) - set_tests_properties (H5FC-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) - endif () add_test ( NAME H5FC-${testname}-${testfile}-tmpfile - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/testfiles/${testfile} ./testfiles/outtmp.h5 + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/testfiles/${testfile} ./testfiles/${testname}-tmp.h5 + ) + set_tests_properties (H5FC-${testname}-${testfile}-tmpfile PROPERTIES + DEPENDS H5FC-${testname}-${testfile}-clear-objects ) - set_tests_properties (H5FC-${testname}-${testfile}-tmpfile PROPERTIES DEPENDS "H5FC-${testname}-clear-objects") add_test ( NAME H5FC-${testname}-${testfile} COMMAND "${CMAKE_COMMAND}" -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_file_ext}>" - -D "TEST_ARGS=${ARGN};outtmp.h5" + -D "TEST_ARGS=${ARGN};${testname}-tmp.h5" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" - -D "TEST_OUTPUT=${testname}.out" + -D "TEST_OUTPUT=${testname}-${testfile}.out" -D "TEST_EXPECT=${resultcode}" -D "TEST_REFERENCE=${resultfile}" -D "TEST_ERRREF=${result_errcheck}" -P "${HDF_RESOURCES_EXT_DIR}/grepTest.cmake" ) - set_tests_properties (H5FC-${testname}-${testfile} PROPERTIES DEPENDS "H5FC-${testname}-${testfile}-tmpfile") - set (last_test "H5FC-${testname}-${testfile}") + set_tests_properties (H5FC-${testname}-${testfile} PROPERTIES + DEPENDS H5FC-${testname}-${testfile}-tmpfile + ) + add_test ( + NAME H5FC-${testname}-${testfile}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/${testname}-tmp.h5 + ) + set_tests_properties (H5FC-${testname}-${testfile}-clean-objects PROPERTIES + DEPENDS H5FC-${testname}-${testfile} + ) endif () endmacro () @@ -217,30 +240,44 @@ if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5FC-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/tmp.h5 + COMMAND ${CMAKE_COMMAND} -E remove + ./testfiles/${testname}-tmp.h5 ) - if (last_test) - set_tests_properties (H5FC-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) - endif () + set_tests_properties (H5FC-${testname}-clear-objects PROPERTIES + FIXTURES_SETUP clear_H5FC-${testname} + ) + add_test ( + NAME H5FC_CHECK_IDX-${testname}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove + ./testfiles/${testname}-tmp.h5 + ) + set_tests_properties (H5FC_CHECK_IDX-${testname}-clean-objects PROPERTIES + FIXTURES_CLEANUP clear_H5FC-${testname} + ) + add_test ( NAME H5FC-${testname}-tmpfile - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/testfiles/${testfile} testfiles/tmp.h5 + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/testfiles/${testfile} ./testfiles/${testname}-tmp.h5 + ) + set_tests_properties (H5FC-${testname}-tmpfile PROPERTIES + FIXTURES_REQUIRED clear_H5FC-${testname} ) - set_tests_properties (H5FC-${testname}-tmpfile PROPERTIES DEPENDS "H5FC-${testname}-clear-objects") add_test ( NAME H5FC-${testname} COMMAND "${CMAKE_COMMAND}" -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_file_ext}>" - -D "TEST_ARGS=${ARGN};./testfiles/tmp.h5" + -D "TEST_ARGS=${ARGN};./testfiles/${testname}-tmp.h5" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" -D "TEST_OUTPUT=testfiles/${testname}.out" -D "TEST_SKIP_COMPARE=TRUE" -D "TEST_EXPECT=${resultcode}" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) - set_tests_properties (H5FC-${testname} PROPERTIES DEPENDS "H5FC-${testname}-tmpfile") - set (last_test "H5FC-${testname}") + set_tests_properties (H5FC-${testname} PROPERTIES + DEPENDS "H5FC-${testname}-tmpfile" + FIXTURES_REQUIRED clear_H5FC-${testname} + ) endif () endmacro () @@ -248,47 +285,61 @@ # If using memchecker add tests without using scripts if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( - NAME H5FC_CHECK_IDX-${testname} - COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5fc_chk_idx> ./testfiles/tmp.h5 ${ARGN} + NAME H5FC_CHECK_IDX-${dependtest}-${testname} + COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5fc_chk_idx> ./testfiles/${dependtest}-tmp.h5 ${ARGN} ) - set_tests_properties (H5FC_CHECK_IDX-${testname} PROPERTIES DEPENDS "H5FC-${dependtest}") - endif () + set_tests_properties (H5FC_CHECK_IDX-${dependtest}-${testname} PROPERTIES + DEPENDS "H5FC-${dependtest}" + FIXTURES_REQUIRED clear_H5FC-${dependtest} + ) + endif () endmacro () macro (ADD_H5_TEST_CHECK_IDX testname resultcode testfile) # If using memchecker add tests without using scripts if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( - NAME H5FC-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/chktmp.h5 + NAME H5FC_TEST_CHECK_IDX-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} -E remove + ./testfiles/${testname}-tmp.h5 ) - if (last_test) - set_tests_properties (H5FC-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) - endif () add_test ( - NAME H5FC-${testname}-tmpfile - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/testfiles/${testfile} testfiles/chktmp.h5 + NAME H5FC_TEST_CHECK_IDX-${testname}-tmpfile + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/testfiles/${testfile} ./testfiles/${testname}-tmp.h5 + ) + set_tests_properties (H5FC_TEST_CHECK_IDX-${testname}-tmpfile PROPERTIES + DEPENDS "H5FC_TEST_CHECK_IDX-${testname}-clear-objects" ) - set_tests_properties (H5FC-${testname}-tmpfile PROPERTIES DEPENDS "H5FC-${testname}-clear-objects") add_test ( - NAME H5FC-${testname} + NAME H5FC_TEST_CHECK_IDX-${testname} COMMAND "${CMAKE_COMMAND}" -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_file_ext}>" - -D "TEST_ARGS=-d;${ARGN};./testfiles/chktmp.h5" + -D "TEST_ARGS=-d;${ARGN};./testfiles/${testname}-tmp.h5" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" -D "TEST_OUTPUT=testfiles/${testname}.out" -D "TEST_SKIP_COMPARE=TRUE" -D "TEST_EXPECT=${resultcode}" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) - set_tests_properties (H5FC-${testname} PROPERTIES DEPENDS "H5FC-${testname}-tmpfile") + set_tests_properties (H5FC_TEST_CHECK_IDX-${testname} PROPERTIES + DEPENDS "H5FC_TEST_CHECK_IDX-${testname}-tmpfile" + ) + add_test ( + NAME H5FC_TEST_CHECK_IDX-${testname}-check + COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5fc_chk_idx> ./testfiles/${testname}-tmp.h5 ${ARGN} + ) + set_tests_properties (H5FC_TEST_CHECK_IDX-${testname}-check PROPERTIES + DEPENDS "H5FC_TEST_CHECK_IDX-${testname}" + ) add_test ( - NAME H5FC_CHECK_IDX-${testname} - COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5fc_chk_idx> ./testfiles/chktmp.h5 ${ARGN} + NAME H5FC_TEST_CHECK_IDX-${testname}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove + ./testfiles/${testname}-tmp.h5 + ) + set_tests_properties (H5FC_TEST_CHECK_IDX-${testname}-clean-objects PROPERTIES + DEPENDS H5FC_TEST_CHECK_IDX-${testname}-check ) - set_tests_properties (H5FC_CHECK_IDX-${testname} PROPERTIES DEPENDS "H5FC-${testname}") - set (last_test "H5FC_CHECK_IDX-${testname}") endif () endmacro () @@ -296,44 +347,55 @@ # If using memchecker skip tests if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( - NAME H5FC-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} -E remove ./testfiles/dmptmp.h5 + NAME H5FC_H5DUMP_CHECK-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} -E remove + ./testfiles/${testname}-tmp.h5 ) - if (last_test) - set_tests_properties (H5FC-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) - endif () add_test ( - NAME H5FC-${testname}-tmpfile - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/testfiles/${testname}.h5 testfiles/dmptmp.h5 + NAME H5FC_H5DUMP_CHECK-${testname}-tmpfile + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/testfiles/${testname}.h5 ./testfiles/${testname}-tmp.h5 + ) + set_tests_properties (H5FC_H5DUMP_CHECK-${testname}-tmpfile PROPERTIES + DEPENDS "H5FC_H5DUMP_CHECK-${testname}-clear-objects" ) - set_tests_properties (H5FC-${testname}-tmpfile PROPERTIES DEPENDS "H5FC-${testname}-clear-objects") add_test ( - NAME H5FC-${testname} + NAME H5FC_H5DUMP_CHECK-${testname} COMMAND "${CMAKE_COMMAND}" -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert${tgt_file_ext}>" - -D "TEST_ARGS=${ARGN};./testfiles/dmptmp.h5" + -D "TEST_ARGS=${ARGN};./testfiles/${testname}-tmp.h5" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" -D "TEST_OUTPUT=testfiles/${testname}.out" -D "TEST_SKIP_COMPARE=TRUE" -D "TEST_EXPECT=0" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) - set_tests_properties (H5FC-${testname} PROPERTIES DEPENDS "H5FC-${testname}-tmpfile") + set_tests_properties (H5FC_H5DUMP_CHECK-${testname} PROPERTIES + DEPENDS "H5FC_H5DUMP_CHECK-${testname}-tmpfile" + ) add_test ( - NAME H5FC_CHECK_DUMP-${testname} + NAME H5FC_H5DUMP_CHECK-${testname}-dump COMMAND "${CMAKE_COMMAND}" -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>" - -D "TEST_ARGS:STRING=-BH;./testfiles/dmptmp.h5" + -D "TEST_ARGS:STRING=-BH;./testfiles/${testname}-tmp.h5" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" -D "TEST_OUTPUT=testfiles/${testname}_chk.out" -D "TEST_EXPECT=0" -D "TEST_REFERENCE=testfiles/${testname}.ddl" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) - set_tests_properties (H5FC_CHECK_DUMP-${testname} PROPERTIES DEPENDS "H5FC-${testname}") - set (last_test "H5FC_CHECK_DUMP-${testname}") + set_tests_properties (H5FC_H5DUMP_CHECK-${testname}-dump PROPERTIES + DEPENDS "H5FC_H5DUMP_CHECK-${testname}" + ) + add_test ( + NAME H5FC_H5DUMP_CHECK-${testname}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove + ./testfiles/${testname}-tmp.h5 + ) + set_tests_properties (H5FC_H5DUMP_CHECK-${testname}-clean-objects PROPERTIES + DEPENDS H5FC_H5DUMP_CHECK-${testname}-dump + ) endif () endmacro () @@ -343,22 +405,6 @@ ############################################################################## ############################################################################## - if (HDF5_ENABLE_USING_MEMCHECKER) - # Remove any output file left over from previous test run - add_test ( - NAME H5FC-clearall-objects - COMMAND ${CMAKE_COMMAND} -E remove - outtmp.h5 - tmp.h5 - chktmp.h5 - dmptmp.h5 - ) - if (last_test) - set_tests_properties (H5FC-clearall-objects PROPERTIES DEPENDS ${last_test}) - endif () - set (last_test "H5FC-clearall-objects") - endif () - # h5format_convert --help # h5format_convert (no options) # h5format_convert nonexist.h5 (no options, file does not exist) diff --git a/tools/test/h5format_convert/testfiles/h5fc_ext1_f.ddl b/tools/test/h5format_convert/testfiles/h5fc_ext1_f.ddl index db00a99..f788913 100644 --- a/tools/test/h5format_convert/testfiles/h5fc_ext1_f.ddl +++ b/tools/test/h5format_convert/testfiles/h5fc_ext1_f.ddl @@ -1,4 +1,4 @@ -HDF5 "./testfiles/dmptmp.h5" { +HDF5 "./testfiles/h5fc_ext1_f-tmp.h5" { SUPER_BLOCK { SUPERBLOCK_VERSION 2 FREELIST_VERSION 0 diff --git a/tools/test/h5format_convert/testfiles/h5fc_ext1_i.ddl b/tools/test/h5format_convert/testfiles/h5fc_ext1_i.ddl index 4be6d90..6564031 100644 --- a/tools/test/h5format_convert/testfiles/h5fc_ext1_i.ddl +++ b/tools/test/h5format_convert/testfiles/h5fc_ext1_i.ddl @@ -1,4 +1,4 @@ -HDF5 "./testfiles/dmptmp.h5" { +HDF5 "./testfiles/h5fc_ext1_i-tmp.h5" { SUPER_BLOCK { SUPERBLOCK_VERSION 2 FREELIST_VERSION 0 diff --git a/tools/test/h5format_convert/testfiles/h5fc_ext1_s.ddl b/tools/test/h5format_convert/testfiles/h5fc_ext1_s.ddl index db00a99..746de2b 100644 --- a/tools/test/h5format_convert/testfiles/h5fc_ext1_s.ddl +++ b/tools/test/h5format_convert/testfiles/h5fc_ext1_s.ddl @@ -1,4 +1,4 @@ -HDF5 "./testfiles/dmptmp.h5" { +HDF5 "./testfiles/h5fc_ext1_s-tmp.h5" { SUPER_BLOCK { SUPERBLOCK_VERSION 2 FREELIST_VERSION 0 diff --git a/tools/test/h5format_convert/testfiles/h5fc_ext2_if.ddl b/tools/test/h5format_convert/testfiles/h5fc_ext2_if.ddl index 4be6d90..57781ec 100644 --- a/tools/test/h5format_convert/testfiles/h5fc_ext2_if.ddl +++ b/tools/test/h5format_convert/testfiles/h5fc_ext2_if.ddl @@ -1,4 +1,4 @@ -HDF5 "./testfiles/dmptmp.h5" { +HDF5 "./testfiles/h5fc_ext2_if-tmp.h5" { SUPER_BLOCK { SUPERBLOCK_VERSION 2 FREELIST_VERSION 0 diff --git a/tools/test/h5format_convert/testfiles/h5fc_ext2_is.ddl b/tools/test/h5format_convert/testfiles/h5fc_ext2_is.ddl index 4be6d90..8fd061d 100644 --- a/tools/test/h5format_convert/testfiles/h5fc_ext2_is.ddl +++ b/tools/test/h5format_convert/testfiles/h5fc_ext2_is.ddl @@ -1,4 +1,4 @@ -HDF5 "./testfiles/dmptmp.h5" { +HDF5 "./testfiles/h5fc_ext2_is-tmp.h5" { SUPER_BLOCK { SUPERBLOCK_VERSION 2 FREELIST_VERSION 0 diff --git a/tools/test/h5format_convert/testfiles/h5fc_ext2_sf.ddl b/tools/test/h5format_convert/testfiles/h5fc_ext2_sf.ddl index db00a99..435ed46 100644 --- a/tools/test/h5format_convert/testfiles/h5fc_ext2_sf.ddl +++ b/tools/test/h5format_convert/testfiles/h5fc_ext2_sf.ddl @@ -1,4 +1,4 @@ -HDF5 "./testfiles/dmptmp.h5" { +HDF5 "./testfiles/h5fc_ext2_sf-tmp.h5" { SUPER_BLOCK { SUPERBLOCK_VERSION 2 FREELIST_VERSION 0 diff --git a/tools/test/h5format_convert/testfiles/h5fc_ext3_isf.ddl b/tools/test/h5format_convert/testfiles/h5fc_ext3_isf.ddl index 4be6d90..57a78d3 100644 --- a/tools/test/h5format_convert/testfiles/h5fc_ext3_isf.ddl +++ b/tools/test/h5format_convert/testfiles/h5fc_ext3_isf.ddl @@ -1,4 +1,4 @@ -HDF5 "./testfiles/dmptmp.h5" { +HDF5 "./testfiles/h5fc_ext3_isf-tmp.h5" { SUPER_BLOCK { SUPERBLOCK_VERSION 2 FREELIST_VERSION 0 diff --git a/tools/test/h5format_convert/testfiles/h5fc_v_all.ddl b/tools/test/h5format_convert/testfiles/h5fc_v_all.ddl index a1af831..c5e55c7 100644 --- a/tools/test/h5format_convert/testfiles/h5fc_v_all.ddl +++ b/tools/test/h5format_convert/testfiles/h5fc_v_all.ddl @@ -1,5 +1,5 @@ Process command line options -Open the file outtmp.h5 +Open the file h5fc_v_all-tmp.h5 Processing all datasets in the file... Going to process dataset:/DSET_CONTIGUOUS... Open the dataset diff --git a/tools/test/h5format_convert/testfiles/h5fc_v_bt1.ddl b/tools/test/h5format_convert/testfiles/h5fc_v_bt1.ddl index 31de12a..23f775d 100644 --- a/tools/test/h5format_convert/testfiles/h5fc_v_bt1.ddl +++ b/tools/test/h5format_convert/testfiles/h5fc_v_bt1.ddl @@ -1,5 +1,5 @@ Process command line options -Open the file outtmp.h5 +Open the file h5fc_v_bt1-tmp.h5 Going to process dataset: /GROUP/DSET_BT2... Open the dataset Retrieve the dataset's layout diff --git a/tools/test/h5format_convert/testfiles/h5fc_v_err.ddl b/tools/test/h5format_convert/testfiles/h5fc_v_err.ddl index 0b7d0ac..066f2d5 100644 --- a/tools/test/h5format_convert/testfiles/h5fc_v_err.ddl +++ b/tools/test/h5format_convert/testfiles/h5fc_v_err.ddl @@ -1,5 +1,5 @@ Process command line options -Open the file outtmp.h5 +Open the file h5fc_v_err-tmp.h5 Processing all datasets in the file... Going to process dataset:/DSET_ERR... Open the dataset diff --git a/tools/test/h5format_convert/testfiles/h5fc_v_n_1d.ddl b/tools/test/h5format_convert/testfiles/h5fc_v_n_1d.ddl index fcdadd8..1c6d7fb 100644 --- a/tools/test/h5format_convert/testfiles/h5fc_v_n_1d.ddl +++ b/tools/test/h5format_convert/testfiles/h5fc_v_n_1d.ddl @@ -1,6 +1,6 @@ Process command line options It is noop... -Open the file outtmp.h5 +Open the file h5fc_v_n_1d-tmp.h5 Going to process dataset: /DSET_EA... Open the dataset Retrieve the dataset's layout diff --git a/tools/test/h5format_convert/testfiles/h5fc_v_n_all.ddl b/tools/test/h5format_convert/testfiles/h5fc_v_n_all.ddl index 074ce6f..ad00d92 100644 --- a/tools/test/h5format_convert/testfiles/h5fc_v_n_all.ddl +++ b/tools/test/h5format_convert/testfiles/h5fc_v_n_all.ddl @@ -1,6 +1,6 @@ Process command line options It is noop... -Open the file outtmp.h5 +Open the file h5fc_v_n_all-tmp.h5 Processing all datasets in the file... Going to process dataset:/DSET_CONTIGUOUS... Open the dataset diff --git a/tools/test/h5format_convert/testfiles/h5fc_v_ndata_bt1.ddl b/tools/test/h5format_convert/testfiles/h5fc_v_ndata_bt1.ddl index c75699a..e79b11a 100644 --- a/tools/test/h5format_convert/testfiles/h5fc_v_ndata_bt1.ddl +++ b/tools/test/h5format_convert/testfiles/h5fc_v_ndata_bt1.ddl @@ -1,6 +1,6 @@ Process command line options It is noop... -Open the file outtmp.h5 +Open the file h5fc_v_ndata_bt1-tmp.h5 Going to process dataset: /DSET_NDATA_BT2... Open the dataset Retrieve the dataset's layout diff --git a/tools/test/h5format_convert/testfiles/h5fc_v_non_chunked.ddl b/tools/test/h5format_convert/testfiles/h5fc_v_non_chunked.ddl index 5945389..50575c0 100644 --- a/tools/test/h5format_convert/testfiles/h5fc_v_non_chunked.ddl +++ b/tools/test/h5format_convert/testfiles/h5fc_v_non_chunked.ddl @@ -1,5 +1,5 @@ Process command line options -Open the file outtmp.h5 +Open the file h5fc_v_non_chunked-tmp.h5 Going to process dataset: /DSET_CONTIGUOUS... Open the dataset Retrieve the dataset's layout diff --git a/tools/test/h5format_convert/testfiles/old_h5fc_ext1_f.ddl b/tools/test/h5format_convert/testfiles/old_h5fc_ext1_f.ddl index db00a99..45fa3fb 100644 --- a/tools/test/h5format_convert/testfiles/old_h5fc_ext1_f.ddl +++ b/tools/test/h5format_convert/testfiles/old_h5fc_ext1_f.ddl @@ -1,4 +1,4 @@ -HDF5 "./testfiles/dmptmp.h5" { +HDF5 "./testfiles/old_h5fc_ext1_f-tmp.h5" { SUPER_BLOCK { SUPERBLOCK_VERSION 2 FREELIST_VERSION 0 diff --git a/tools/test/h5format_convert/testfiles/old_h5fc_ext1_i.ddl b/tools/test/h5format_convert/testfiles/old_h5fc_ext1_i.ddl index d9cc0b7..67a7116 100644 --- a/tools/test/h5format_convert/testfiles/old_h5fc_ext1_i.ddl +++ b/tools/test/h5format_convert/testfiles/old_h5fc_ext1_i.ddl @@ -1,4 +1,4 @@ -HDF5 "./testfiles/dmptmp.h5" { +HDF5 "./testfiles/old_h5fc_ext1_i-tmp.h5" { SUPER_BLOCK { SUPERBLOCK_VERSION 1 FREELIST_VERSION 0 diff --git a/tools/test/h5format_convert/testfiles/old_h5fc_ext1_s.ddl b/tools/test/h5format_convert/testfiles/old_h5fc_ext1_s.ddl index db00a99..7f67d9f 100644 --- a/tools/test/h5format_convert/testfiles/old_h5fc_ext1_s.ddl +++ b/tools/test/h5format_convert/testfiles/old_h5fc_ext1_s.ddl @@ -1,4 +1,4 @@ -HDF5 "./testfiles/dmptmp.h5" { +HDF5 "./testfiles/old_h5fc_ext1_s-tmp.h5" { SUPER_BLOCK { SUPERBLOCK_VERSION 2 FREELIST_VERSION 0 diff --git a/tools/test/h5format_convert/testfiles/old_h5fc_ext2_if.ddl b/tools/test/h5format_convert/testfiles/old_h5fc_ext2_if.ddl index 4be6d90..350d3ba 100644 --- a/tools/test/h5format_convert/testfiles/old_h5fc_ext2_if.ddl +++ b/tools/test/h5format_convert/testfiles/old_h5fc_ext2_if.ddl @@ -1,4 +1,4 @@ -HDF5 "./testfiles/dmptmp.h5" { +HDF5 "./testfiles/old_h5fc_ext2_if-tmp.h5" { SUPER_BLOCK { SUPERBLOCK_VERSION 2 FREELIST_VERSION 0 diff --git a/tools/test/h5format_convert/testfiles/old_h5fc_ext2_is.ddl b/tools/test/h5format_convert/testfiles/old_h5fc_ext2_is.ddl index 4be6d90..6b2b2c3 100644 --- a/tools/test/h5format_convert/testfiles/old_h5fc_ext2_is.ddl +++ b/tools/test/h5format_convert/testfiles/old_h5fc_ext2_is.ddl @@ -1,4 +1,4 @@ -HDF5 "./testfiles/dmptmp.h5" { +HDF5 "./testfiles/old_h5fc_ext2_is-tmp.h5" { SUPER_BLOCK { SUPERBLOCK_VERSION 2 FREELIST_VERSION 0 diff --git a/tools/test/h5format_convert/testfiles/old_h5fc_ext2_sf.ddl b/tools/test/h5format_convert/testfiles/old_h5fc_ext2_sf.ddl index db00a99..4a038e3 100644 --- a/tools/test/h5format_convert/testfiles/old_h5fc_ext2_sf.ddl +++ b/tools/test/h5format_convert/testfiles/old_h5fc_ext2_sf.ddl @@ -1,4 +1,4 @@ -HDF5 "./testfiles/dmptmp.h5" { +HDF5 "./testfiles/old_h5fc_ext2_sf-tmp.h5" { SUPER_BLOCK { SUPERBLOCK_VERSION 2 FREELIST_VERSION 0 diff --git a/tools/test/h5format_convert/testfiles/old_h5fc_ext3_isf.ddl b/tools/test/h5format_convert/testfiles/old_h5fc_ext3_isf.ddl index 4be6d90..602627f 100644 --- a/tools/test/h5format_convert/testfiles/old_h5fc_ext3_isf.ddl +++ b/tools/test/h5format_convert/testfiles/old_h5fc_ext3_isf.ddl @@ -1,4 +1,4 @@ -HDF5 "./testfiles/dmptmp.h5" { +HDF5 "./testfiles/old_h5fc_ext3_isf-tmp.h5" { SUPER_BLOCK { SUPERBLOCK_VERSION 2 FREELIST_VERSION 0 diff --git a/tools/test/h5format_convert/testh5fc.sh.in b/tools/test/h5format_convert/testh5fc.sh.in index df083d1..87ceb9f 100644 --- a/tools/test/h5format_convert/testh5fc.sh.in +++ b/tools/test/h5format_convert/testh5fc.sh.in @@ -67,10 +67,10 @@ TESTDIR=./testfiles test -d $TESTDIR || mkdir $TESTDIR # Copy the testfile to a temporary file for testing as h5format_convert is changing the file in place -TMPOUTFILE=outtmp.h5 +TMPOUTFILE=tmp.h5 TMPFILE=tmp.h5 -TMPCHKFILE=chktmp.h5 -TMPDMPFILE=dmptmp.h5 +TMPCHKFILE=tmp.h5 +TMPDMPFILE=tmp.h5 ###################################################################### # test files @@ -183,10 +183,10 @@ CLEAN_TESTFILES_AND_TESTDIR() if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then $RM $TESTDIR else - $RM $TESTDIR/$TMPFILE + $RM $TESTDIR/$TMPFILE $RM $TESTDIR/$TMPOUTFILE $RM $TESTDIR/$TMPCHKFILE - $RM $TESTDIR/$TMPDMPFILE + $RM $TESTDIR/*-$TMPDMPFILE fi } @@ -225,13 +225,14 @@ TOOLTEST_OUT() { actual_err="$TESTDIR/`basename $1 .ddl`.out.err" actual_sav=${actual}-sav actual_err_sav=${actual_err}-sav + testfile="`basename $1 .ddl`-tmp.h5" # Prepare the test file - $RM $TESTDIR/$TMPOUTFILE + $RM $TESTDIR/$testfile TFILE=$2 if [ ! -z "$2" ] && [ -e $TESTDIR/$2 ] ; then - $CP $TESTDIR/$2 $TESTDIR/$TMPOUTFILE - TFILE=$TMPOUTFILE + $CP $TESTDIR/$2 $TESTDIR/$testfile + TFILE=$testfile fi # Run test. @@ -262,13 +263,14 @@ TOOLTEST_MASK_OUT() { actual_err="$TESTDIR/`basename $1 .ddl`.out.err" actual_sav=${actual}-sav actual_err_sav=${actual_err}-sav + testfile="`basename $1 .ddl`-tmp.h5" # Prepare the test file - $RM $TESTDIR/$TMPOUTFILE + $RM $TESTDIR/$testfile TFILE=$2 if [ ! -z "$2" ] && [ -e $TESTDIR/$2 ] ; then - $CP $TESTDIR/$2 $TESTDIR/$TMPOUTFILE - TFILE=$TMPOUTFILE + $CP $TESTDIR/$2 $TESTDIR/$testfile + TFILE=$testfile fi # Run test. @@ -322,13 +324,14 @@ TOOLTEST_ERR() { actual_err="$TESTDIR/`basename $1 .ddl`.out.err" actual_sav=${actual}-sav actual_err_sav=${actual_err}-sav + testfile="`basename $1 .ddl`-tmp.h5" # Prepare the test file - $RM $TESTDIR/$TMPOUTFILE + $RM $TESTDIR/$testfile TFILE=$2 if [ ! -z "$2" ] && [ -e $TESTDIR/$2 ] ; then - $CP $TESTDIR/$2 $TESTDIR/$TMPOUTFILE - TFILE=$TMPOUTFILE + $CP $TESTDIR/$2 $TESTDIR/$testfile + TFILE=$testfile fi # Run test. @@ -361,9 +364,10 @@ TOOLTEST_ERR() { # -n TOOLTEST() { TESTING $FORMCONV $3 $4 $5 $1 - $RM $TESTDIR/$2 - $CP $TESTDIR/$1 $TESTDIR/$2 - $RUNSERIAL $FORMCONV_BIN $3 $4 $5 $TESTDIR/$2 + testfile="`basename $1 .h5`-tmp.h5" + $RM $TESTDIR/$testfile + $CP $TESTDIR/$1 $TESTDIR/$testfile + $RUNSERIAL $FORMCONV_BIN $3 $4 $5 $TESTDIR/$testfile exitcode=$? if [ $exitcode -ne 0 ]; then echo "*FAILED*" @@ -383,7 +387,7 @@ CHECKING() { # $1 dataset name IDX_CHECK() { CHECKING $1 - $RUNSERIAL $CHK_IDX_BIN $TESTDIR/$TMPCHKFILE $1 + $RUNSERIAL $CHK_IDX_BIN $TESTDIR/$2 $1 ret=$? if [ $ret -eq 0 ]; then echo " PASSED" @@ -415,7 +419,8 @@ H5DUMP_CHECK() { expect="$TESTDIR/$2" actual="$TESTDIR/`basename $2 .ddl`.out" actual_err="$TESTDIR/`basename $2 .ddl`.err" - $RUNSERIAL $H5DUMP_BIN -BH $TESTDIR/$TMPDMPFILE > $actual 2>$actual_err + testfile="`basename $2 .ddl`-tmp.h5" + $RUNSERIAL $H5DUMP_BIN -BH $TESTDIR/$testfile > $actual 2>$actual_err cat $actual_err >> $actual # Compare output @@ -498,45 +503,45 @@ TOOLTEST_MASK_OUT h5fc_v_err.ddl h5fc_err_level.h5 -v # h5format_convert -d /GROUP/DSET_FA h5fc_ext_none.h5 # h5format_convert -d /DSET_NONE h5fc_ext_none.h5 # h5format_convert -d /GROUP/DSET_NDATA_NONE h5fc_ext_none.h5 -TOOLTEST h5fc_ext_none.h5 $TMPCHKFILE -d /DSET_EA -IDX_CHECK /DSET_EA +TOOLTEST h5fc_ext_none.h5 h5fc_ext_none-tmp.h5 -d /DSET_EA +IDX_CHECK /DSET_EA h5fc_ext_none-tmp.h5 # -TOOLTEST h5fc_ext_none.h5 $TMPCHKFILE -d /GROUP/DSET_NDATA_EA -IDX_CHECK /GROUP/DSET_NDATA_EA +TOOLTEST h5fc_ext_none.h5 h5fc_ext_none-tmp.h5 -d /GROUP/DSET_NDATA_EA +IDX_CHECK /GROUP/DSET_NDATA_EA h5fc_ext_none-tmp.h5 # -TOOLTEST h5fc_ext_none.h5 $TMPCHKFILE -d /GROUP/DSET_BT2 -IDX_CHECK /GROUP/DSET_BT2 +TOOLTEST h5fc_ext_none.h5 h5fc_ext_none-tmp.h5 -d /GROUP/DSET_BT2 +IDX_CHECK /GROUP/DSET_BT2 h5fc_ext_none-tmp.h5 # -TOOLTEST h5fc_ext_none.h5 $TMPCHKFILE -d /DSET_NDATA_BT2 -IDX_CHECK /DSET_NDATA_BT2 +TOOLTEST h5fc_ext_none.h5 h5fc_ext_none-tmp.h5 -d /DSET_NDATA_BT2 +IDX_CHECK /DSET_NDATA_BT2 h5fc_ext_none-tmp.h5 # -TOOLTEST h5fc_ext_none.h5 $TMPCHKFILE -d /DSET_FA -IDX_CHECK /DSET_FA +TOOLTEST h5fc_ext_none.h5 h5fc_ext_none-tmp.h5 -d /DSET_FA +IDX_CHECK /DSET_FA h5fc_ext_none-tmp.h5 # -TOOLTEST h5fc_ext_none.h5 $TMPCHKFILE -d /GROUP/DSET_NDATA_FA -IDX_CHECK /GROUP/DSET_NDATA_FA +TOOLTEST h5fc_ext_none.h5 h5fc_ext_none-tmp.h5 -d /GROUP/DSET_NDATA_FA +IDX_CHECK /GROUP/DSET_NDATA_FA h5fc_ext_none-tmp.h5 # -TOOLTEST h5fc_ext_none.h5 $TMPCHKFILE -d /DSET_NONE -IDX_CHECK /DSET_NONE +TOOLTEST h5fc_ext_none.h5 h5fc_ext_none-tmp.h5 -d /DSET_NONE +IDX_CHECK /DSET_NONE h5fc_ext_none-tmp.h5 # -TOOLTEST h5fc_ext_none.h5 $TMPCHKFILE -d /GROUP/DSET_NDATA_NONE -IDX_CHECK /GROUP/DSET_NDATA_NONE +TOOLTEST h5fc_ext_none.h5 h5fc_ext_none-tmp.h5 -d /GROUP/DSET_NDATA_NONE +IDX_CHECK /GROUP/DSET_NDATA_NONE h5fc_ext_none-tmp.h5 # # # # No output from tests: just check exit code # h5format_convert -d /DSET_NDATA_BT2 old_h5fc_ext_none.h5 (v1-btree dataset) # h5format_convert -d /DSET_CONTIGUOUS h5fc_non_v3.h5 (non-chunked dataset) -TOOLTEST old_h5fc_ext_none.h5 $TMPFILE -d /DSET_NDATA_BT2 -TOOLTEST h5fc_non_v3.h5 $TMPFILE -d /DSET_CONTIGUOUS +TOOLTEST old_h5fc_ext_none.h5 old_h5fc_ext_none-tmp.h5 -d /DSET_NDATA_BT2 +TOOLTEST h5fc_non_v3.h5 h5fc_non_v3-tmp.h5 -d /DSET_CONTIGUOUS # # # # No output from tests: just check exit code # h5format_convert -d /GROUP/DSET_BT2 -n h5fc_non_v3.h5 (noop, one dataset) # h5format_convert -n h5fc_non_v3.h5 (noop, all datasets) -TOOLTEST h5fc_non_v3.h5 $TMPFILE -d /GROUP/DSET_BT2 -n -TOOLTEST h5fc_non_v3.h5 $TMPFILE -n +TOOLTEST h5fc_non_v3.h5 h5fc_non_v3-tmp.h5 -d /GROUP/DSET_BT2 -n +TOOLTEST h5fc_non_v3.h5 h5fc_non_v3-tmp.h5 -n # # # @@ -544,11 +549,11 @@ TOOLTEST h5fc_non_v3.h5 $TMPFILE -n # h5format_convert h5fc_non_v3.h5 # 1) convert all datasets # 2) verify indexing types -TOOLTEST h5fc_non_v3.h5 $TMPCHKFILE -IDX_CHECK /DSET_NDATA_EA -IDX_CHECK /DSET_NDATA_BT2 -IDX_CHECK /GROUP/DSET_BT2 -IDX_CHECK /GROUP/DSET_EA +TOOLTEST h5fc_non_v3.h5 h5fc_non_v3-tmp.h5 +IDX_CHECK /DSET_NDATA_EA h5fc_non_v3-tmp.h5 +IDX_CHECK /DSET_NDATA_BT2 h5fc_non_v3-tmp.h5 +IDX_CHECK /GROUP/DSET_BT2 h5fc_non_v3-tmp.h5 +IDX_CHECK /GROUP/DSET_EA h5fc_non_v3-tmp.h5 # # # @@ -556,47 +561,47 @@ IDX_CHECK /GROUP/DSET_EA # h5format_convert h5fc_edge_v3.h5 # 1) convert the chunked dataset (filter, no-filter-edge-chunk) # 2) verify the indexing type -TOOLTEST h5fc_edge_v3.h5 $TMPCHKFILE -IDX_CHECK /DSET_EDGE +TOOLTEST h5fc_edge_v3.h5 h5fc_edge_v3-tmp.h5 +IDX_CHECK /DSET_EDGE h5fc_edge_v3-tmp.h5 # # # The following test files have messages in the superblock extension. # Verify h5dump output for correctness after conversion -TOOLTEST h5fc_ext1_i.h5 $TMPDMPFILE +TOOLTEST h5fc_ext1_i.h5 h5fc_ext1_i-tmp.h5 H5DUMP_CHECK h5fc_ext1_i.h5 h5fc_ext1_i.ddl -TOOLTEST h5fc_ext1_s.h5 $TMPDMPFILE +TOOLTEST h5fc_ext1_s.h5 h5fc_ext1_s-tmp.h5 H5DUMP_CHECK h5fc_ext1_s.h5 h5fc_ext1_s.ddl -TOOLTEST h5fc_ext1_f.h5 $TMPDMPFILE +TOOLTEST h5fc_ext1_f.h5 h5fc_ext1_f-tmp.h5 H5DUMP_CHECK h5fc_ext1_f.h5 h5fc_ext1_f.ddl # -TOOLTEST h5fc_ext2_if.h5 $TMPDMPFILE +TOOLTEST h5fc_ext2_if.h5 h5fc_ext2_if-tmp.h5 H5DUMP_CHECK h5fc_ext2_if.h5 h5fc_ext2_if.ddl -TOOLTEST h5fc_ext2_is.h5 $TMPDMPFILE +TOOLTEST h5fc_ext2_is.h5 h5fc_ext2_is-tmp.h5 H5DUMP_CHECK h5fc_ext2_is.h5 h5fc_ext2_is.ddl -TOOLTEST h5fc_ext2_sf.h5 $TMPDMPFILE +TOOLTEST h5fc_ext2_sf.h5 h5fc_ext2_sf-tmp.h5 H5DUMP_CHECK h5fc_ext2_sf.h5 h5fc_ext2_sf.ddl # -TOOLTEST h5fc_ext3_isf.h5 $TMPDMPFILE +TOOLTEST h5fc_ext3_isf.h5 h5fc_ext3_isf-tmp.h5 H5DUMP_CHECK h5fc_ext3_isf.h5 h5fc_ext3_isf.ddl # # # -TOOLTEST old_h5fc_ext1_i.h5 $TMPDMPFILE +TOOLTEST old_h5fc_ext1_i.h5 old_h5fc_ext1_i-tmp.h5 H5DUMP_CHECK old_h5fc_ext1_i.h5 old_h5fc_ext1_i.ddl -TOOLTEST old_h5fc_ext1_s.h5 $TMPDMPFILE +TOOLTEST old_h5fc_ext1_s.h5 old_h5fc_ext1_s-tmp.h5 H5DUMP_CHECK old_h5fc_ext1_s.h5 old_h5fc_ext1_s.ddl -TOOLTEST old_h5fc_ext1_f.h5 $TMPDMPFILE +TOOLTEST old_h5fc_ext1_f.h5 old_h5fc_ext1_f-tmp.h5 H5DUMP_CHECK old_h5fc_ext1_f.h5 old_h5fc_ext1_f.ddl # -TOOLTEST old_h5fc_ext2_if.h5 $TMPDMPFILE +TOOLTEST old_h5fc_ext2_if.h5 old_h5fc_ext2_if-tmp.h5 H5DUMP_CHECK old_h5fc_ext2_if.h5 old_h5fc_ext2_if.ddl -TOOLTEST old_h5fc_ext2_is.h5 $TMPDMPFILE +TOOLTEST old_h5fc_ext2_is.h5 old_h5fc_ext2_is-tmp.h5 H5DUMP_CHECK old_h5fc_ext2_is.h5 old_h5fc_ext2_is.ddl -TOOLTEST old_h5fc_ext2_sf.h5 $TMPDMPFILE +TOOLTEST old_h5fc_ext2_sf.h5 old_h5fc_ext2_sf-tmp.h5 H5DUMP_CHECK old_h5fc_ext2_sf.h5 old_h5fc_ext2_sf.ddl # -TOOLTEST old_h5fc_ext3_isf.h5 $TMPDMPFILE +TOOLTEST old_h5fc_ext3_isf.h5 old_h5fc_ext3_isf-tmp.h5 H5DUMP_CHECK old_h5fc_ext3_isf.h5 old_h5fc_ext3_isf.ddl # # Clean up temporary files/directories diff --git a/tools/test/h5import/CMakeTests.cmake b/tools/test/h5import/CMakeTests.cmake index ee1d401..2e6105a 100644 --- a/tools/test/h5import/CMakeTests.cmake +++ b/tools/test/h5import/CMakeTests.cmake @@ -97,26 +97,23 @@ ############################################################################## macro (ADD_H5_TEST testname importfile conffile testfile) - # If using memchecker skip macro based tests - if (HDF5_ENABLE_USING_MEMCHECKER) - add_test (NAME H5IMPORT-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5import${tgt_file_ext}> ${importfile} -c ${conffile} -o ${testfile}) - set_tests_properties (H5IMPORT-${testname} PROPERTIES - FIXTURES_REQUIRED set_h5importtest - ) - else () - add_test ( - NAME H5IMPORT-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} -E remove ${testfile} - ) - set_tests_properties (H5IMPORT-${testname}-clear-objects PROPERTIES - FIXTURES_REQUIRED set_h5importtest - ) - - add_test (NAME H5IMPORT-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5import${tgt_file_ext}> ${importfile} -c ${conffile} -o ${testfile}) - set_tests_properties (H5IMPORT-${testname} PROPERTIES - DEPENDS H5IMPORT-${testname}-clear-objects - ) + add_test ( + NAME H5IMPORT-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} -E remove + ${testfile} + ${testfile}.new + ) + set_tests_properties (H5IMPORT-${testname}-clear-objects PROPERTIES + FIXTURES_REQUIRED set_h5importtest + ) + add_test (NAME H5IMPORT-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5import${tgt_file_ext}> ${importfile} -c ${conffile} -o ${testfile}) + set_tests_properties (H5IMPORT-${testname} PROPERTIES + DEPENDS H5IMPORT-${testname}-clear-objects + FIXTURES_REQUIRED set_h5importtest + ) + # If using memchecker skip macro based tests + if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5IMPORT-${testname}-H5DMP COMMAND "${CMAKE_COMMAND}" @@ -125,6 +122,7 @@ -D "TEST_ARGS:STRING=${testfile}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" -D "TEST_OUTPUT=${testfile}.new" + -D "TEST_SAVE=1" -D "TEST_EXPECT=0" -D "TEST_FILTER=(^(HDF5)[^\n]*)" -D "TEST_SKIP_COMPARE=TRUE" @@ -132,6 +130,7 @@ ) set_tests_properties (H5IMPORT-${testname}-H5DMP PROPERTIES DEPENDS H5IMPORT-${testname} + FIXTURES_REQUIRED set_h5importtest ) add_test ( NAME H5IMPORT-${testname}-H5DMP_CMP @@ -148,8 +147,20 @@ ) set_tests_properties (H5IMPORT-${testname}-H5DMP_CMP PROPERTIES DEPENDS H5IMPORT-${testname}-H5DMP + FIXTURES_REQUIRED set_h5importtest ) endif () + + add_test ( + NAME H5IMPORT-${testname}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove + ${testfile} + ${testfile}.new + ) + set_tests_properties (H5IMPORT-${testname}-clean-objects PROPERTIES + DEPENDS H5IMPORT-${testname}-H5DMP_CMP + FIXTURES_REQUIRED set_h5importtest + ) endmacro () macro (ADD_H5_DUMPTEST testname datasetname testfile) @@ -160,9 +171,11 @@ COMMAND ${CMAKE_COMMAND} -E remove d${testfile} d${testfile}.bin + d${testfile}.dmp ) set_tests_properties (H5IMPORT-DUMP-${testname}-clear-objects PROPERTIES DEPENDS H5IMPORT-${testname}-H5DMP_CMP + FIXTURES_REQUIRED set_h5importtest ) if ("${ARGN}" STREQUAL "BINARY") @@ -174,6 +187,7 @@ -D "TEST_ARGS:STRING=-p;-d;${datasetname};-o;d${testfile}.bin;-b;NATIVE;testfiles/${testfile}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" -D "TEST_OUTPUT=d${testfile}.dmp" + -D "TEST_SAVE=1" -D "TEST_EXPECT=0" -D "TEST_SKIP_COMPARE=TRUE" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" @@ -187,6 +201,7 @@ -D "TEST_ARGS:STRING=-p;-d;${datasetname};-o;d${testfile}.bin;-y;--width=1;testfiles/${testfile}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" -D "TEST_OUTPUT=d${testfile}.dmp" + -D "TEST_SAVE=1" -D "TEST_EXPECT=0" -D "TEST_SKIP_COMPARE=TRUE" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" @@ -194,6 +209,7 @@ endif () set_tests_properties (H5IMPORT-DUMP-${testname}-H5DMP PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}-clear-objects" + FIXTURES_REQUIRED set_h5importtest ) add_test ( @@ -210,6 +226,7 @@ ) set_tests_properties (H5IMPORT-DUMP-${testname} PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}-H5DMP" + FIXTURES_REQUIRED set_h5importtest ) add_test ( @@ -222,13 +239,26 @@ -D "TEST_OUTPUT=d${testfile}.dff" -D "TEST_EXPECT=0" -D "TEST_FILTER=(^(Warning)[^\n]*)" - -D "TEST_REFERENCE=testfiles/d${testfile}.txt" + -D "TEST_REFERENCE=testfiles/${testfile}.txt" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) set_tests_properties (H5IMPORT-DUMP-${testname}-H5DFF PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}" + FIXTURES_REQUIRED set_h5importtest ) endif () + + add_test ( + NAME H5IMPORT-DUMP-${testname}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove + d${testfile} + d${testfile}.bin + d${testfile}.dmp + ) + set_tests_properties (H5IMPORT-DUMP-${testname}-clean-objects PROPERTIES + DEPENDS H5IMPORT-DUMP-${testname}-H5DFF + FIXTURES_REQUIRED set_h5importtest + ) endmacro () macro (ADD_H5_DUMPSUBTEST testname testfile datasetname) @@ -237,8 +267,9 @@ add_test ( NAME H5IMPORT_SUB-DUMP-${testname}-clear-objects COMMAND ${CMAKE_COMMAND} -E remove - d-${testname}.h5 - ${testname}.bin + ds${testname}.h5 + ds${testname}.bin + ds${testname}.dmp ) set_tests_properties (H5IMPORT_SUB-DUMP-${testname}-clear-objects PROPERTIES FIXTURES_REQUIRED set_h5importtest @@ -249,15 +280,17 @@ COMMAND "${CMAKE_COMMAND}" -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>" - -D "TEST_ARGS:STRING=-p;-d;${datasetname};${ARGN};-o;${testname}.bin;-b;NATIVE;testfiles/${testfile}" + -D "TEST_ARGS:STRING=-p;-d;${datasetname};${ARGN};-o;ds${testname}.bin;-b;NATIVE;testfiles/${testfile}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=${testname}.dmp" + -D "TEST_OUTPUT=ds${testname}.dmp" + -D "TEST_SAVE=1" -D "TEST_EXPECT=0" -D "TEST_SKIP_COMPARE=TRUE" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) set_tests_properties (H5IMPORT_SUB-DUMP-${testname}-H5DMP PROPERTIES DEPENDS "H5IMPORT_SUB-DUMP-${testname}-clear-objects" + FIXTURES_REQUIRED set_h5importtest ) add_test ( @@ -265,32 +298,46 @@ COMMAND "${CMAKE_COMMAND}" -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" -D "TEST_PROGRAM=$<TARGET_FILE:h5import${tgt_file_ext}>" - -D "TEST_ARGS:STRING=${testname}.bin;-c;${testname}.dmp;-o;d-${testname}.h5" + -D "TEST_ARGS:STRING=ds${testname}.bin;-c;ds${testname}.dmp;-o;ds${testname}.h5" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=${testname}.imp" + -D "TEST_OUTPUT=ds${testname}.imp" -D "TEST_EXPECT=0" -D "TEST_SKIP_COMPARE=TRUE" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) set_tests_properties (H5IMPORT_SUB-DUMP-${testname}-H5IMP PROPERTIES DEPENDS "H5IMPORT_SUB-DUMP-${testname}-H5DMP" + FIXTURES_REQUIRED set_h5importtest ) add_test ( NAME H5IMPORT_SUB-DUMP-${testname}-CMP COMMAND "${CMAKE_COMMAND}" -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_file_ext}>" - -D "TEST_ARGS:STRING=-p;d-${testname}.h5" + -D "TEST_ARGS:STRING=-p;ds${testname}.h5" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=d-${testname}.dmp" + -D "TEST_OUTPUT=ds${testname}.dmp" -D "TEST_EXPECT=0" -D "TEST_REFERENCE=testfiles/${testname}.ddl" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) set_tests_properties (H5IMPORT_SUB-DUMP-${testname}-CMP PROPERTIES - DEPENDS "H5IMPORT_SUB-DUMP-${testname}-H5IMP" + DEPENDS "H5IMPORT_SUB-DUMP-${testname}-H5IMP" + FIXTURES_REQUIRED set_h5importtest ) endif () + + add_test ( + NAME H5IMPORT_SUB-DUMP-${testname}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove + ds${testname}.h5 + ds${testname}.bin + ds${testname}.dmp + ) + set_tests_properties (H5IMPORT_SUB-DUMP-${testname}-clean-objects PROPERTIES + DEPENDS "H5IMPORT_SUB-DUMP-${testname}-CMP" + FIXTURES_REQUIRED set_h5importtest + ) endmacro () macro (ADD_H5_SKIP_DUMPTEST testname datasetname testfile) @@ -368,23 +415,55 @@ set (last_test "H5IMPORT-clear-objects") endif () - add_test ( - NAME H5IMPORT-h5importtest-clear-objects - COMMAND ${CMAKE_COMMAND} -E remove + set (H5IMPORTTEST_CLEANFILES binfp64.bin binfp64.conf + binfp64.h5 + binfp64.h5.new binin8.bin binin8.conf + binin8.h5 + binin8.h5.new binin8w.bin binin8w.conf + binin8w.h5 + binin8w.h5.new binin16.bin binin16.conf + binin16.h5 + binin16.h5.new binin32.bin binin32.conf + binin32.h5 + binin32.h5.new binuin16.bin binuin16.conf + binuin16.h5 + binuin16.h5.new binuin32.bin binuin32.conf + binuin32.h5 + binuin32.h5.new + txtfp32.h5 + txtfp32.h5.new + txtfp64.h5 + txtfp64.h5.new + txtin8.h5 + txtin8.h5.new + txtin8w.h5 + txtin8w.h5.new + txtin16.h5 + txtin16.h5.new + txtin32.h5 + txtin32.h5.new + txtuin16.h5 + txtuin16.h5.new + txtuin32.h5 + txtuin32.h5.new + ) + add_test ( + NAME H5IMPORT-h5importtest-clear-objects + COMMAND ${CMAKE_COMMAND} -E remove ${H5IMPORTTEST_CLEANFILES} ) add_test (NAME H5IMPORT-h5importtest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5importtest>) @@ -392,6 +471,13 @@ FIXTURES_SETUP set_h5importtest DEPENDS H5IMPORT-h5importtest-clear-objects ) + add_test ( + NAME H5IMPORT-h5importtest-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove ${H5IMPORTTEST_CLEANFILES} + ) + set_tests_properties (H5IMPORT-h5importtest-clean-objects PROPERTIES + FIXTURES_CLEANUP set_h5importtest + ) # ----- TESTING "ASCII I32 rank 3 - Output BE " ; ADD_H5_TEST (ASCII_I32 testfiles/txtin32.txt testfiles/txtin32.conf txtin32.h5) diff --git a/tools/test/h5import/h5importtestutil.sh.in b/tools/test/h5import/h5importtestutil.sh.in index 0cbc8f1..2be6d50 100644 --- a/tools/test/h5import/h5importtestutil.sh.in +++ b/tools/test/h5import/h5importtestutil.sh.in @@ -268,9 +268,9 @@ fi TOOLTEST5() { err=0 -$RUNSERIAL $DUMPER_BIN -p -d $3 $4 -o d-$1.bin -b NATIVE tmp_testfiles/$2 > d-$1.dmp -$RUNSERIAL $H5IMPORT_BIN d-$1.bin -c d-$1.dmp -o d-$1.h5 > d-$1.imp -$RUNSERIAL $DUMPER_BIN -p d-$1.h5 > log2 +$RUNSERIAL $DUMPER_BIN -p -d $3 $4 -o ds$1.bin -b NATIVE tmp_testfiles/$2 > ds$1.dmp +$RUNSERIAL $H5IMPORT_BIN ds$1.bin -c ds$1.dmp -o ds$1.h5 > ds$1.imp +$RUNSERIAL $DUMPER_BIN -p ds$1.h5 > log2 $CP -f $SRC_H5IMPORT_TESTFILES/$1.ddl log1 cmp -s log1 log2 || err=1 diff --git a/tools/test/h5import/testfiles/tall_fp32.ddl b/tools/test/h5import/testfiles/tall_fp32.ddl index 2a0dc1b..53f24bf 100644 --- a/tools/test/h5import/testfiles/tall_fp32.ddl +++ b/tools/test/h5import/testfiles/tall_fp32.ddl @@ -1,4 +1,4 @@ -HDF5 "d-tall_fp32.h5" { +HDF5 "dstall_fp32.h5" { GROUP "/" { GROUP "g2" { DATASET "dset2.2" { diff --git a/tools/test/h5import/testfiles/tall_i32.ddl b/tools/test/h5import/testfiles/tall_i32.ddl index d9280bc..b05dd53 100644 --- a/tools/test/h5import/testfiles/tall_i32.ddl +++ b/tools/test/h5import/testfiles/tall_i32.ddl @@ -1,4 +1,4 @@ -HDF5 "d-tall_i32.h5" { +HDF5 "dstall_i32.h5" { GROUP "/" { GROUP "g1" { GROUP "g1.1" { diff --git a/tools/test/h5import/testfiles/tintsattrs_u32.ddl b/tools/test/h5import/testfiles/tintsattrs_u32.ddl index cf8889c..a53217a 100644 --- a/tools/test/h5import/testfiles/tintsattrs_u32.ddl +++ b/tools/test/h5import/testfiles/tintsattrs_u32.ddl @@ -1,4 +1,4 @@ -HDF5 "d-tintsattrs_u32.h5" { +HDF5 "dstintsattrs_u32.h5" { GROUP "/" { DATASET "DU32BITS" { DATATYPE H5T_STD_U32LE diff --git a/tools/test/h5ls/CMakeTests.cmake b/tools/test/h5ls/CMakeTests.cmake index cd2f764..0c493dd 100644 --- a/tools/test/h5ls/CMakeTests.cmake +++ b/tools/test/h5ls/CMakeTests.cmake @@ -135,10 +135,21 @@ ############################################################################## macro (ADD_H5_TEST resultfile resultcode) + add_test ( + NAME H5LS-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} -E remove + ${resultfile}.out + ${resultfile}.out.err + ) + set_tests_properties (H5LS-${resultfile}-clear-objects PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" + ) # If using memchecker add tests without using scripts if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5LS-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5ls${tgt_file_ext}> ${ARGN}) - set_tests_properties (H5LS-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") + set_tests_properties (H5LS-${resultfile} PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" + ) if ("${resultcode}" STREQUAL "1") set_tests_properties (H5LS-${resultfile} PROPERTIES WILL_FAIL "true") endif () @@ -157,9 +168,32 @@ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) endif () + set_tests_properties (H5LS-${resultfile} PROPERTIES + DEPENDS "H5LS-${resultfile}-clear-objects" + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" + ) + add_test ( + NAME H5LS-${resultfile}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove + ${resultfile}.out + ${resultfile}.out.err + ) + set_tests_properties (H5LS-${resultfile}-clean-objects PROPERTIES + DEPENDS "H5LS-${resultfile}" + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" + ) endmacro () macro (ADD_H5_ERR_TEST resultfile resultcode) + add_test ( + NAME H5LS-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} -E remove + ${resultfile}.out + ${resultfile}.out.err + ) + set_tests_properties (H5LS-${resultfile}-clear-objects PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" + ) # If using memchecker add tests without using scripts if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5LS-${resultfile} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5ls${tgt_file_ext}> ${ARGN}) @@ -182,12 +216,35 @@ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) endif () + set_tests_properties (H5LS-${resultfile} PROPERTIES + DEPENDS "H5LS-${resultfile}-clear-objects" + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" + ) + add_test ( + NAME H5LS-${resultfile}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove + ${resultfile}.out + ${resultfile}.out.err + ) + set_tests_properties (H5LS-${resultfile}-clean-objects PROPERTIES + DEPENDS "H5LS-${resultfile}" + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" + ) endmacro () macro (ADD_H5_UD_TEST testname resultcode resultfile) if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( - NAME H5LS_UD-${testname} + NAME H5LS_UD-${testname}-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} -E remove + ${resultfile}.out + ${resultfile}.out.err + ) + set_tests_properties (H5LS_UD-${testname}-${resultfile}-clear-objects PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" + ) + add_test ( + NAME H5LS_UD-${testname}-${resultfile} COMMAND "${CMAKE_COMMAND}" -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" -D "TEST_PROGRAM=$<TARGET_FILE:h5ls${tgt_file_ext}>" @@ -201,6 +258,20 @@ -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_OUTPUT_DIRECTORY}" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) + set_tests_properties (H5LS_UD-${testname}-${resultfile} PROPERTIES + DEPENDS "H5LS_UD-${testname}-${resultfile}-clear-objects" + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" + ) + add_test ( + NAME H5LS_UD-${testname}-${resultfile}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove + ${resultfile}.out + ${resultfile}.out.err + ) + set_tests_properties (H5LS_UD-${testname}-${resultfile}-clean-objects PROPERTIES + DEPENDS "H5LS_UD-${testname}-${resultfile}" + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" + ) endif () endmacro () diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake index 163bd00..7638af7 100644 --- a/tools/test/h5repack/CMakeTests.cmake +++ b/tools/test/h5repack/CMakeTests.cmake @@ -229,9 +229,6 @@ # If using memchecker add tests without using scripts if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5REPACK-h5repack-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${ARGN}) - set_tests_properties (H5REPACK-h5repack-${testname} PROPERTIES - WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" - ) else () add_test ( NAME H5REPACK-h5repack-${testname} @@ -247,7 +244,7 @@ ) endif () set_tests_properties (H5REPACK-h5repack-${testname} PROPERTIES - FIXTURES_REQUIRED clear_h5repack + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" ) endmacro () @@ -264,9 +261,6 @@ NAME H5REPACK_OLD-${testname}-clear-objects COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${testfile} ) - set_tests_properties (H5REPACK_OLD-${testname}-clear-objects PROPERTIES - FIXTURES_REQUIRED clear_h5repack - ) add_test ( NAME H5REPACK_OLD-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${ARGN} -i ${PROJECT_BINARY_DIR}/testfiles/${testfile} -o ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} @@ -281,6 +275,13 @@ set_tests_properties (H5REPACK_OLD-${testname}_DFF PROPERTIES DEPENDS H5REPACK_OLD-${testname} ) + add_test ( + NAME H5REPACK_OLD-${testname}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${testfile} + ) + set_tests_properties (H5REPACK_OLD-${testname}-clean-objects PROPERTIES + DEPENDS H5REPACK_OLD-${testname}_DFF + ) endif () endif () endmacro () @@ -299,9 +300,6 @@ NAME H5REPACK-${testname}-clear-objects COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${testfile} ) - set_tests_properties (H5REPACK-${testname}-clear-objects PROPERTIES - FIXTURES_REQUIRED clear_h5repack - ) add_test ( NAME H5REPACK-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> --enable-error-stack ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} @@ -316,6 +314,13 @@ set_tests_properties (H5REPACK-${testname}_DFF PROPERTIES DEPENDS H5REPACK-${testname} ) + add_test ( + NAME H5REPACK-${testname}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${testfile} + ) + set_tests_properties (H5REPACK-${testname}-clean-objects PROPERTIES + DEPENDS H5REPACK-${testname}_DFF + ) endif () endmacro () @@ -329,20 +334,20 @@ set_property(TEST H5REPACK_CMP-${testname} PROPERTY DISABLED) endif () else () + add_test ( + NAME H5REPACK_CMP-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${resultfile} + ) # If using memchecker add tests without using scripts if (HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5REPACK_CMP-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile} ) - else () - add_test ( - NAME H5REPACK_CMP-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${resultfile} - ) - set_tests_properties (H5REPACK_CMP-${testname}-clear-objects PROPERTIES - FIXTURES_REQUIRED clear_h5repack + set_tests_properties (H5REPACK_CMP-${testname} PROPERTIES + DEPENDS H5REPACK_CMP-${testname}-clear-objects ) + else () add_test ( NAME H5REPACK_CMP-${testname} COMMAND "${CMAKE_COMMAND}" @@ -360,6 +365,13 @@ DEPENDS H5REPACK_CMP-${testname}-clear-objects ) endif () + add_test ( + NAME H5REPACK_CMP-${testname}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${resultfile} + ) + set_tests_properties (H5REPACK_CMP-${testname}-clean-objects PROPERTIES + DEPENDS H5REPACK_CMP-${testname} + ) endif () endmacro () @@ -373,24 +385,18 @@ set_property(TEST H5REPACK_MASK-${testname} PROPERTY DISABLED) endif () else () + add_test ( + NAME H5REPACK_MASK-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${resultfile} + ) # If using memchecker add tests without using scripts if (HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5REPACK_MASK-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile} ) - set_tests_properties (H5REPACK_MASK-${testname} PROPERTIES - FIXTURES_REQUIRED clear_h5repack - ) else (HDF5_ENABLE_USING_MEMCHECKER) add_test ( - NAME H5REPACK_MASK-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${resultfile} - ) - set_tests_properties (H5REPACK_MASK-${testname}-clear-objects PROPERTIES DEPENDS ${last_test} - FIXTURES_REQUIRED clear_h5repack - ) - add_test ( NAME H5REPACK_MASK-${testname} COMMAND "${CMAKE_COMMAND}" -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" @@ -404,8 +410,17 @@ -D "TEST_ERRREF=${result_errcheck}" -P "${HDF_RESOURCES_EXT_DIR}/grepTest.cmake" ) - set_tests_properties (H5REPACK_MASK-${testname} PROPERTIES DEPENDS H5REPACK_MASK-${testname}-clear-objects) endif () + set_tests_properties (H5REPACK_MASK-${testname} PROPERTIES + DEPENDS H5REPACK_MASK-${testname}-clear-objects + ) + add_test ( + NAME H5REPACK_MASK-${testname}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${resultfile} + ) + set_tests_properties (H5REPACK_MASK-${testname}-clean-objects PROPERTIES + DEPENDS H5REPACK_MASK-${testname} + ) endif () endmacro () @@ -423,9 +438,6 @@ NAME H5REPACK_DMP-${testname}-clear-objects COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${resultfile} ) - set_tests_properties (H5REPACK_DMP-${testname}-clear-objects PROPERTIES - FIXTURES_REQUIRED clear_h5repack - ) add_test ( NAME H5REPACK_DMP-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile} @@ -447,7 +459,22 @@ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) set_tests_properties (H5REPACK_DMP-h5dump-${testname} PROPERTIES - DEPENDS "H5REPACK_DMP-${testname}" + DEPENDS H5REPACK_DMP-${testname} + ) + add_test ( + NAME H5REPACK_DMP-${testname}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${resultfile} + ) + set_tests_properties (H5REPACK_DMP-${testname}-clean-objects PROPERTIES + DEPENDS H5REPACK_DMP-h5dump-${testname} + ) + else () + add_test ( + NAME H5REPACK_DMP-${testname}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${resultfile} + ) + set_tests_properties (H5REPACK_DMP-${testname}-clean-objects PROPERTIES + DEPENDS H5REPACK_DMP-${testname} ) endif () endif () @@ -511,9 +538,6 @@ NAME H5REPACK_DIFF-${testname}-clear-objects COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${testfile} ) - set_tests_properties (H5REPACK_DIFF-${testname}-clear-objects PROPERTIES - FIXTURES_REQUIRED clear_h5repack - ) add_test ( NAME H5REPACK_DIFF-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> --enable-error-stack ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} @@ -536,6 +560,13 @@ set_tests_properties (H5REPACK_DIFF-${testname}_DFF PROPERTIES DEPENDS H5REPACK_DIFF-${testname} ) + add_test ( + NAME H5REPACK_DIFF-${testname}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${testfile} + ) + set_tests_properties (H5REPACK_DIFF-${testname}-clean-objects PROPERTIES + DEPENDS H5REPACK_DIFF-${testname}_DFF + ) endif () endmacro () @@ -553,9 +584,6 @@ NAME H5REPACK_STAT-${testname}-clear-objects COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${statarg}.${resultfile} ) - set_tests_properties (H5REPACK_STAT-${testname}-clear-objects PROPERTIES - FIXTURES_REQUIRED clear_h5repack - ) add_test ( NAME H5REPACK_STAT-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${statarg}.${resultfile} @@ -577,7 +605,22 @@ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) set_tests_properties (H5REPACK_STAT-h5stat-${testname} PROPERTIES - DEPENDS "H5REPACK_STAT-${testname}" + DEPENDS H5REPACK_STAT-${testname} + ) + add_test ( + NAME H5REPACK_STAT-${testname}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${statarg}.${resultfile} + ) + set_tests_properties (H5REPACK_STAT-${testname}-clean-objects PROPERTIES + DEPENDS H5REPACK_STAT-h5stat-${testname} + ) + else () + add_test ( + NAME H5REPACK_STAT-${testname}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${statarg}.${resultfile} + ) + set_tests_properties (H5REPACK_STAT-${testname}-clean-objects PROPERTIES + DEPENDS H5REPACK_STAT-${testname} ) endif () endif () @@ -598,9 +641,6 @@ NAME H5REPACK_VERIFY_LAYOUT-${testname}-clear-objects COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${testfile} ) - set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname}-clear-objects PROPERTIES - FIXTURES_REQUIRED clear_h5repack - ) add_test ( NAME H5REPACK_VERIFY_LAYOUT-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} @@ -659,6 +699,13 @@ DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}_DFF ) endif () + add_test ( + NAME H5REPACK_VERIFY_LAYOUT-${testname}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${testfile} + ) + set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname}-clean-objects PROPERTIES + DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}_DMP + ) endif () endif () endmacro () @@ -679,9 +726,6 @@ NAME H5REPACK_VERIFY_LAYOUT_VDS-${testname}-clear-objects COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${testfile} ) - set_tests_properties (H5REPACK_VERIFY_LAYOUT_VDS-${testname}-clear-objects PROPERTIES - FIXTURES_REQUIRED clear_h5repack - ) add_test ( NAME H5REPACK_VERIFY_LAYOUT_VDS-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} @@ -706,6 +750,13 @@ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" DEPENDS H5REPACK_VERIFY_LAYOUT_VDS-${testname} ) + add_test ( + NAME H5REPACK_VERIFY_LAYOUT_VDS-${testname}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${testfile} + ) + set_tests_properties (H5REPACK_VERIFY_LAYOUT_VDS-${testname}-clean-objects PROPERTIES + DEPENDS H5REPACK_VERIFY_LAYOUT_VDS-${testname}_DMP + ) endif () endif () endmacro () @@ -717,9 +768,6 @@ NAME H5REPACK_VERIFY_SUPERBLOCK-${testname}-clear-objects COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${testfile} ) - set_tests_properties (H5REPACK_VERIFY_SUPERBLOCK-${testname}-clear-objects PROPERTIES - FIXTURES_REQUIRED clear_h5repack - ) add_test ( NAME H5REPACK_VERIFY_SUPERBLOCK-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> -j;${lowbound};-k;${highbound} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} @@ -743,6 +791,13 @@ set_tests_properties (H5REPACK_VERIFY_SUPERBLOCK-${testname}_DMP PROPERTIES DEPENDS H5REPACK_VERIFY_SUPERBLOCK-${testname} ) + add_test ( + NAME H5REPACK_VERIFY_SUPERBLOCK-${testname}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${testfile} + ) + set_tests_properties (H5REPACK_VERIFY_SUPERBLOCK-${testname}-clean-objects PROPERTIES + DEPENDS H5REPACK_VERIFY_SUPERBLOCK-${testname}_DMP + ) endif () endmacro () @@ -751,9 +806,6 @@ NAME ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname}-clear-objects COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${testfile} ) - set_tests_properties (ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname}-clear-objects PROPERTIES - FIXTURES_REQUIRED clear_h5repack - ) add_test ( NAME ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> -j;${lowbound};-k;${highbound} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} @@ -762,6 +814,13 @@ DEPENDS ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname}-clear-objects WILL_FAIL "true" ) + add_test ( + NAME ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${testfile} + ) + set_tests_properties (ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname}-clean-objects PROPERTIES + DEPENDS ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname} + ) endmacro () macro (ADD_H5_TEST_META testname testfile) @@ -770,14 +829,7 @@ NAME H5REPACK_META-${testname}-clear-objects COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}_N.${testname}.h5 - testfiles/out-${testname}_N.${testname}.out - testfiles/out-${testname}_N.${testname}.out.err testfiles/out-${testname}_M.${testname}.h5 - testfiles/out-${testname}_M.${testname}.out - testfiles/out-${testname}_M.${testname}.out.err - ) - set_tests_properties (H5REPACK_META-${testname}-clear-objects PROPERTIES - FIXTURES_REQUIRED clear_h5repack ) add_test ( NAME H5REPACK_META-${testname}_N @@ -826,7 +878,7 @@ add_test (NAME H5REPACK_META-${testname} COMMAND "${CMAKE_COMMAND}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" - -D "TEST_ONEFILE=out-${testname}_N.${testname}.out" + -D "TEST_ONEFILE=out-${testname}_N.${testname}.h5" -D "TEST_TWOFILE=out-${testname}_M.${testname}.h5" -D "TEST_FUNCTION=LTEQ" -P "${HDF_RESOURCES_DIR}/fileCompareTest.cmake" @@ -839,6 +891,15 @@ set_tests_properties (H5REPACK_META-${testname} PROPERTIES DEPENDS H5REPACK_META-${testname}_M_DFF ) + add_test ( + NAME H5REPACK_META-${testname}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove + testfiles/out-${testname}_N.${testname}.h5 + testfiles/out-${testname}_M.${testname}.h5 + ) + set_tests_properties (H5REPACK_META-${testname}-clean-objects PROPERTIES + DEPENDS H5REPACK_META-${testname} + ) endmacro () macro (ADD_H5_UD_TEST testname resultcode resultfile) @@ -848,9 +909,6 @@ NAME H5REPACK_UD-${testname}-clear-objects COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${resultfile} ) - set_tests_properties (H5REPACK_UD-${testname}-clear-objects PROPERTIES - FIXTURES_REQUIRED clear_h5repack - ) add_test ( NAME H5REPACK_UD-${testname} COMMAND "${CMAKE_COMMAND}" @@ -886,7 +944,14 @@ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) set_tests_properties (H5REPACK_UD-${testname}-h5dump PROPERTIES - DEPENDS "H5REPACK_UD-${testname}" + DEPENDS H5REPACK_UD-${testname} + ) + add_test ( + NAME H5REPACK_UD-${testname}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${resultfile} + ) + set_tests_properties (H5REPACK_UD-${testname}-clean-objects PROPERTIES + DEPENDS H5REPACK_UD-${testname}-h5dump ) endif () endmacro () @@ -910,7 +975,6 @@ ) set_tests_properties (H5REPACK_EXTERNAL-${testname}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" - FIXTURES_REQUIRED clear_h5repack ) # make sure external data file 0 is available add_test ( @@ -985,6 +1049,14 @@ DEPENDS H5REPACK_EXTERNAL-${testname}_DFF4 WILL_FAIL "true" ) + add_test ( + NAME H5REPACK_EXTERNAL-${testname}-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove h5repack_${testfile}_rp.h5 + ) + set_tests_properties (H5REPACK_EXTERNAL-${testname}-clean-objects PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" + DEPENDS H5REPACK_EXTERNAL-${testname}_DFF_FAIL + ) endif () endif () endmacro () @@ -1027,123 +1099,6 @@ set (FILEV4 4_vds.h5) set (FILEV5 5_vds.h5) - if (HDF5_ENABLE_USING_MEMCHECKER) - # Remove any output file left over from previous test run - set (LIST_TO_CLEAR - out-family.tfamily%05d.h5 - out-HDFFV-7840.h5diff_attr1.h5 - out-attr.h5repack_attr.h5 - out-native_attr.h5repack_attr.h5 - out-HDFFV-5932.h5repack_attr_refs.h5 - out-deflate_copy.h5repack_deflate.h5 - out-deflate_remove.h5repack_deflate.h5 - out-early.h5repack_early.h5 - out-fill.h5repack_fill.h5 - out-native_fill.h5repack_fill.h5 - out-gzip_verbose_filters.h5repack_filters.h5 - out-fletcher_copy.h5repack_fletcher.h5 - out-fletcher_remove.h5repack_fletcher.h5 - out-hlink.h5repack_hlink.h5 - out-chunk_18x13.h5repack_layout.h5 - out-chunk_20x10.h5repack_layout.h5 - out-chunk_compa.h5repack_layout.h5 - out-chunk_conti.h5repack_layout.h5 - out-compa.h5repack_layout.h5 - out-conti.h5repack_layout.h5 - out-deflate_file.h5repack_layout.h5 - out-deflate_limit.h5repack_layout.h5 - out-dset2_chunk_20x10.h5repack_layout.h5 - out-dset2_compa.h5repack_layout.h5 - out-dset2_conti.h5repack_layout.h5 - out-dset_compa_chunk.h5repack_layout.h5 - out-dset_compa_compa.h5repack_layout.h5 - out-dset_compa_conti.h5repack_layout.h5 - out-dset_conti_chunk.h5repack_layout.h5 - out-dset_conti_compa.h5repack_layout.h5 - out-dset_conti_conti.h5repack_layout.h5 - out-fletcher_all.h5repack_layout.h5 - out-fletcher_individual.h5repack_layout.h5 - out-global_filters.h5repack_layout.h5 - out-gzip_all.h5repack_layout.h5 - out-gzip_individual.h5repack_layout.h5 - out-layout.h5repack_layout.h5 - out-layout_long_switches.h5repack_layout.h5 - out-layout_short_switches.h5repack_layout.h5 - out-old_style_layout_short_switches.h5repack_layout.h5 - out-plugin_test.h5repack_layout.h5 - out-shuffle_all.h5repack_layout.h5 - out-shuffle_individual.h5repack_layout.h5 - out-upgrade_layout.h5repack_layouto.h5 - out-contig_small_compa.h5repack_layout2.h5 - out-contig_small_fixed_compa.h5repack_layout2.h5 - out-ckdim_biger.h5repack_layout3.h5 - out-ckdim_smaller.h5repack_layout3.h5 - out-chunk2chunk.h5repack_layout3.h5 - out-chunk2compa.h5repack_layout3.h5 - out-chunk2conti.h5repack_layout3.h5 - out-error1.h5repack_layout3.h5 - out-error2.h5repack_layout3.h5 - out-error3.h5repack_layout3.h5 - out-error4.h5repack_layout3.h5 - out-committed_dt.h5repack_named_dtypes.h5 - out-nbit_add.h5repack_nbit.h5 - out-nbit_copy.h5repack_nbit.h5 - out-nbit_remove.h5repack_nbit.h5 - out-add_alignment.h5repack_objs.h5 - out-add_userblock.h5repack_objs.h5 - out-objs.h5repack_objs.h5 - out-gt_mallocsize.h5repack_objs.h5 - out-bug1814.h5repack_refs.h5 - out-shuffle_copy.h5repack_shuffle.h5 - out-shuffle_remove.h5repack_shuffle.h5 - out-scale_add.h5repack_soffset.h5 - out-scale_copy.h5repack_soffset.h5 - out-scale_remove.h5repack_soffset.h5 - out-meta_short_M.meta_short.h5 - out-meta_short_N.meta_short.h5 - out-meta_long_M.meta_long.h5 - out-meta_long_N.meta_long.h5 - out-vds_compa.4_vds.h5 - out-vds_conti.4_vds.h5 - out-vds_chunk2x5x8.3_1_vds.h5 - out-vds_chunk3x6x9.2_vds.h5 - out-vds_dset_chunk20x10x5.1_vds.h5 - ) - - set (LIST_TO_CLEAR ${LIST_TO_CLEAR} ${LIST_OTHER_TEST_FILES}) - - foreach (h5_file ${LIST_HDF5_TEST_FILES}) - get_filename_component(fname "${h5_file}" NAME) - set (LIST_TO_CLEAR ${LIST_TO_CLEAR} - ${h5_file}.h5 - ) - endforeach () - - foreach (h5_file ${LIST_TST_TEST_FILES}) - get_filename_component(fname "${h5_file}" NAME) - set (LIST_TO_CLEAR ${LIST_TO_CLEAR} - ${h5_file}.tst.out - ${h5_file}.tst.out.err - ) - endforeach () - - foreach (h5_file ${LIST_DDL_TEST_FILES}) - get_filename_component(fname "${h5_file}" NAME) - set (LIST_TO_CLEAR ${LIST_TO_CLEAR} - ${h5_file}.ddl.out - ${h5_file}.ddl.out.err - ) - endforeach () - add_test ( - NAME H5REPACK-clearall-objects - COMMAND ${CMAKE_COMMAND} -E remove ${LIST_TO_CLEAR} - ) - set_tests_properties (H5REPACK-clearall-objects PROPERTIES - FIXTURES_SETUP clear_h5repack - WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" - ) - endif () - ADD_HELP_TEST(help 0 -h) add_test (NAME H5REPACK-testh5repack_detect_szip COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:testh5repack_detect_szip>) @@ -1159,7 +1114,7 @@ set (passRegex "no") set_tests_properties (H5REPACK-testh5repack_detect_szip PROPERTIES PASS_REGULAR_EXPRESSION "no") endif () - set_tests_properties (H5REPACK-testh5repack_detect_szip PROPERTIES DEPENDS H5REPACK-clearall-objects) + set_tests_properties (H5REPACK-testh5repack_detect_szip PROPERTIES DEPENDS H5REPACK-h5repack-${testname}) set (last_test "H5REPACK-testh5repack_detect_szip") # add_test (NAME H5REPACK-h5repacktest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repacktest>) diff --git a/tools/test/h5repack/CMakeVFDTests.cmake b/tools/test/h5repack/CMakeVFDTests.cmake index 0514bfb..b746d88 100644 --- a/tools/test/h5repack/CMakeVFDTests.cmake +++ b/tools/test/h5repack/CMakeVFDTests.cmake @@ -26,43 +26,44 @@ set (H5REPACK_VFD_subfiling_SKIP_TESTS ### T H E T E S T S M A C R O S ### ############################################################################## ############################################################################## - +set (H5REPACK_CLEANFILES + bounds_latest_latest.h5 + h5repack_attr.h5 + h5repack_attr_refs.h5 + h5repack_deflate.h5 + h5repack_early.h5 + h5repack_ext.h5 + h5repack_fill.h5 + h5repack_filters.h5 + h5repack_fletcher.h5 + h5repack_hlink.h5 + h5repack_layout.h5 + h5repack_layouto.h5 + h5repack_layout2.h5 + h5repack_layout3.h5 + h5repack_layout.UD.h5 + h5repack_named_dtypes.h5 + h5repack_nested_8bit_enum.h5 + h5repack_nested_8bit_enum_deflated.h5 + h5repack_nbit.h5 + h5repack_objs.h5 + h5repack_refs.h5 + h5repack_shuffle.h5 + h5repack_soffset.h5 + h5repack_szip.h5 + # fsm + h5repack_aggr.h5 + h5repack_fsm_aggr_nopersist.h5 + h5repack_fsm_aggr_persist.h5 + h5repack_none.h5 + h5repack_paged_nopersist.h5 + h5repack_paged_persist.h5 +) macro (ADD_VFD_TEST vfdname resultcode) if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5REPACK-${vfdname}-h5repacktest-clear-objects - COMMAND ${CMAKE_COMMAND} -E remove - bounds_latest_latest.h5 - h5repack_attr.h5 - h5repack_attr_refs.h5 - h5repack_deflate.h5 - h5repack_early.h5 - h5repack_ext.h5 - h5repack_fill.h5 - h5repack_filters.h5 - h5repack_fletcher.h5 - h5repack_hlink.h5 - h5repack_layout.h5 - h5repack_layouto.h5 - h5repack_layout2.h5 - h5repack_layout3.h5 - h5repack_layout.UD.h5 - h5repack_named_dtypes.h5 - h5repack_nested_8bit_enum.h5 - h5repack_nested_8bit_enum_deflated.h5 - h5repack_nbit.h5 - h5repack_objs.h5 - h5repack_refs.h5 - h5repack_shuffle.h5 - h5repack_soffset.h5 - h5repack_szip.h5 - # fsm - h5repack_aggr.h5 - h5repack_fsm_aggr_nopersist.h5 - h5repack_fsm_aggr_persist.h5 - h5repack_none.h5 - h5repack_paged_nopersist.h5 - h5repack_paged_persist.h5 + COMMAND ${CMAKE_COMMAND} -E remove ${H5REPACK_CLEANFILES} WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/${vfdname} ) if (NOT "h5repacktest" IN_LIST H5REPACK_VFD_${vfdname}_SKIP_TESTS) @@ -78,8 +79,19 @@ macro (ADD_VFD_TEST vfdname resultcode) -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" ) - set_tests_properties (H5REPACK_VFD-${vfdname}-h5repacktest PROPERTIES DEPENDS H5REPACK_VFD-${vfdname}-h5repacktest-clear-objects) - set_tests_properties (H5REPACK_VFD-${vfdname}-h5repacktest PROPERTIES TIMEOUT ${CTEST_SHORT_TIMEOUT}) + set_tests_properties (H5REPACK_VFD-${vfdname}-h5repacktest PROPERTIES + DEPENDS H5REPACK_VFD-${vfdname}-h5repacktest-clear-objects + TIMEOUT ${CTEST_SHORT_TIMEOUT} + ) + add_test ( + NAME H5REPACK_VFD-${vfdname}-h5repacktest-clean-objects + COMMAND ${CMAKE_COMMAND} -E remove + ${H5REPACK_CLEANFILES} + ) + set_tests_properties (H5REPACK_VFD-${vfdname}-h5repacktest-clean-objects PROPERTIES + DEPENDS H5REPACK_VFD-${vfdname}-h5repacktest + WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/${vfdname} + ) endif () endif () endmacro () diff --git a/tools/test/h5stat/CMakeTests.cmake b/tools/test/h5stat/CMakeTests.cmake index d4238b5..0ad7001 100644 --- a/tools/test/h5stat/CMakeTests.cmake +++ b/tools/test/h5stat/CMakeTests.cmake @@ -114,6 +114,9 @@ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) endif () + set_tests_properties (H5STAT-${resultfile} PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}" + ) endmacro () macro (ADD_H5_ERR_TEST resultfile resultcode) @@ -138,6 +141,9 @@ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) endif () + set_tests_properties (H5STAT-${resultfile} PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}" + ) endmacro () ############################################################################## @@ -146,17 +152,6 @@ ############################################################################## ############################################################################## - if (HDF5_ENABLE_USING_MEMCHECKER) - # Remove any output file left over from previous test run - foreach (ddl_file ${HDF5_REFERENCE_FILES}) - set (CLEAR_LIST ${CLEAR_LIST} ${ddl_file}.out ${ddl_file}.out.err) - endforeach () - add_test ( - NAME H5STAT-clearall-objects - COMMAND ${CMAKE_COMMAND} -E remove ${CLEAR_LIST} - ) - endif () - # Test for help flag ADD_H5_TEST (h5stat_help1 0 -h) ADD_H5_TEST (h5stat_help2 0 --help) diff --git a/tools/test/misc/CMakeTestsRepart.cmake b/tools/test/misc/CMakeTestsRepart.cmake index 20ae263..04c74ec 100644 --- a/tools/test/misc/CMakeTestsRepart.cmake +++ b/tools/test/misc/CMakeTestsRepart.cmake @@ -72,6 +72,19 @@ family_to_sec2.h5 ) set_tests_properties (H5REPART-clearall-objects PROPERTIES FIXTURES_SETUP clear_testrepart) + add_test ( + NAME H5REPART-clean-objects + COMMAND ${CMAKE_COMMAND} + -E remove + fst_family00000.h5 + scd_family00000.h5 + scd_family00001.h5 + scd_family00002.h5 + scd_family00003.h5 + family_to_single.h5 + family_to_sec2.h5 + ) + set_tests_properties (H5REPART-clean-objects PROPERTIES FIXTURES_CLEANUP clear_testrepart) # repartition family member size to 20,000 bytes. add_test ( @@ -116,6 +129,7 @@ ) set_tests_properties (H5REPART-h5repart_test PROPERTIES DEPENDS "H5REPART-h5repart_20K;H5REPART-h5repart_5K;H5REPART-h5repart_single;H5REPART-h5repart_sec2" + FIXTURES_REQUIRED clear_testrepart ) set (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES} diff --git a/tools/test/perform/CMakeTests.cmake b/tools/test/perform/CMakeTests.cmake index c91edca..0b32f9b 100644 --- a/tools/test/perform/CMakeTests.cmake +++ b/tools/test/perform/CMakeTests.cmake @@ -23,12 +23,10 @@ add_custom_target(zip_perf_files ALL COMMENT "Copying files needed by zip_perf t # Add Tests #----------------------------------------------------------------------------- if (HDF5_TEST_SERIAL) - # Remove any output file left over from previous test run - add_test ( - NAME PERFORM_h5perform-clearall-objects - COMMAND ${CMAKE_COMMAND} - -E remove + set (PERFORM_CLEANFILES chunk.h5 + direct_write.h5 + unix.raw iopipe.h5 iopipe.raw x-diag-rd.dat @@ -36,21 +34,21 @@ if (HDF5_TEST_SERIAL) x-rowmaj-rd.dat x-rowmaj-wr.dat x-gnuplot - h5perf_serial.txt - h5perf_serial.txt.err - chunk.txt - chunk.txt.err - iopipe.txt - iopipe.txt.err - overhead.txt - overhead.txt.err - perf_meta.txt - perf_meta.txt.err - zip_perf-h.txt - zip_perf-h.txt.err - zip_perf.txt - zip_perf.txt.err ) + # Remove any output file left over from previous test run + add_test ( + NAME PERFORM_h5perform-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove ${PERFORM_CLEANFILES} + ) + set_tests_properties (PERFORM_h5perform-clear-objects PROPERTIES FIXTURES_SETUP clear_perform) + + add_test ( + NAME PERFORM_h5perform-clean-objects + COMMAND ${CMAKE_COMMAND} + -E remove ${PERFORM_CLEANFILES} + ) + set_tests_properties (PERFORM_h5perform-clean-objects PROPERTIES FIXTURES_CLEANUP clear_perform) if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME PERFORM_h5perf_serial COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5perf_serial>) @@ -69,7 +67,7 @@ if (HDF5_TEST_SERIAL) endif () set_tests_properties (PERFORM_h5perf_serial PROPERTIES TIMEOUT ${CTEST_VERY_LONG_TIMEOUT} - DEPENDS "PERFORM_h5perform-clearall-objects" + FIXTURES_REQUIRED clear_perform ) if (HDF5_ENABLE_USING_MEMCHECKER) @@ -88,7 +86,7 @@ if (HDF5_TEST_SERIAL) ) endif () set_tests_properties (PERFORM_chunk PROPERTIES - DEPENDS "PERFORM_h5perform-clearall-objects" + FIXTURES_REQUIRED clear_perform ) if (HDF5_ENABLE_USING_MEMCHECKER) @@ -107,7 +105,7 @@ if (HDF5_TEST_SERIAL) ) endif () set_tests_properties (PERFORM_iopipe PROPERTIES - DEPENDS "PERFORM_h5perform-clearall-objects" + FIXTURES_REQUIRED clear_perform ) if (HDF5_ENABLE_USING_MEMCHECKER) @@ -126,7 +124,7 @@ if (HDF5_TEST_SERIAL) ) endif () set_tests_properties (PERFORM_overhead PROPERTIES - DEPENDS "PERFORM_h5perform-clearall-objects" + FIXTURES_REQUIRED clear_perform ) if (HDF5_ENABLE_USING_MEMCHECKER) @@ -145,7 +143,7 @@ if (HDF5_TEST_SERIAL) ) endif () set_tests_properties (PERFORM_perf_meta PROPERTIES - DEPENDS "PERFORM_h5perform-clearall-objects" + FIXTURES_REQUIRED clear_perform ) if (HDF5_ENABLE_USING_MEMCHECKER) @@ -164,7 +162,7 @@ if (HDF5_TEST_SERIAL) ) endif () set_tests_properties (PERFORM_zip_perf_help PROPERTIES - DEPENDS "PERFORM_h5perform-clearall-objects" + FIXTURES_REQUIRED clear_perform ) if (HDF5_ENABLE_USING_MEMCHECKER) @@ -183,7 +181,8 @@ if (HDF5_TEST_SERIAL) ) endif () set_tests_properties (PERFORM_zip_perf PROPERTIES - DEPENDS "PERFORM_zip_perf_help;PERFORM_h5perform-clearall-objects" + DEPENDS "PERFORM_zip_perf_help" + FIXTURES_REQUIRED clear_perform ) endif () |