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/test/h5repack | |
parent | 7127d8912c8fa601d59b4e8ce522eaf149c02344 (diff) | |
download | hdf5-956282fa6f5f5b7df92be6f14c12681f7ecabbc9.zip hdf5-956282fa6f5f5b7df92be6f14c12681f7ecabbc9.tar.gz hdf5-956282fa6f5f5b7df92be6f14c12681f7ecabbc9.tar.bz2 |
Develop cmake clean (#1971)
Diffstat (limited to 'tools/test/h5repack')
-rw-r--r-- | tools/test/h5repack/CMakeTests.cmake | 319 | ||||
-rw-r--r-- | tools/test/h5repack/CMakeVFDTests.cmake | 82 |
2 files changed, 184 insertions, 217 deletions
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 () |