diff options
Diffstat (limited to 'tools/h5repack')
-rw-r--r-- | tools/h5repack/CMakeLists.txt | 399 | ||||
-rw-r--r-- | tools/h5repack/Makefile.in | 2 | ||||
-rw-r--r-- | tools/h5repack/h5repack.sh.in | 357 |
3 files changed, 433 insertions, 325 deletions
diff --git a/tools/h5repack/CMakeLists.txt b/tools/h5repack/CMakeLists.txt index 7351fd5..156f6d8 100644 --- a/tools/h5repack/CMakeLists.txt +++ b/tools/h5repack/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.6) +cmake_minimum_required (VERSION 2.8.10) PROJECT (HDF5_TOOLS_H5REPACK) #----------------------------------------------------------------------------- @@ -150,24 +150,23 @@ IF (BUILD_TESTING) IF (${testtype} STREQUAL "SKIP") IF (NOT HDF5_ENABLE_USING_MEMCHECKER) ADD_TEST ( - NAME H5REPACK-${testname}-SKIPPED - COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} -i ${PROJECT_BINARY_DIR}/testfiles/${testfile} -o ${PROJECT_BINARY_DIR}/testfiles/out.${testfile}" + NAME H5REPACK_OLD-${testname}-SKIPPED + COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} -i ${PROJECT_BINARY_DIR}/testfiles/${testfile} -o ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}" ) ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) ELSE (${testtype} STREQUAL "SKIP") ADD_TEST ( - NAME H5REPACK-${testname} - COMMAND $<TARGET_FILE:h5repack> ${ARGN} -i ${PROJECT_BINARY_DIR}/testfiles/${testfile} -o ${PROJECT_BINARY_DIR}/testfiles/out.${testfile} + NAME H5REPACK_OLD-${testname} + COMMAND $<TARGET_FILE:h5repack> ${ARGN} -i ${PROJECT_BINARY_DIR}/testfiles/${testfile} -o ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} ) IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5REPACK-${testname} PROPERTIES DEPENDS ${last_test}) + SET_TESTS_PROPERTIES (H5REPACK_OLD-${testname} PROPERTIES DEPENDS ${last_test}) ENDIF (NOT "${last_test}" STREQUAL "") ADD_TEST ( - NAME H5REPACK-DIFF_${testname} - COMMAND $<TARGET_FILE:h5diff> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out.${testfile} + NAME H5REPACK_OLD-${testname}_DFF + COMMAND $<TARGET_FILE:h5diff> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} ) - SET_TESTS_PROPERTIES (H5REPACK-DIFF_${testname} PROPERTIES DEPENDS H5REPACK-${testname}) - SET (last_test "H5REPACK-DIFF_${testname}") + SET_TESTS_PROPERTIES (H5REPACK_OLD-${testname}_DFF PROPERTIES DEPENDS H5REPACK_OLD-${testname}) ENDIF (${testtype} STREQUAL "SKIP") ENDMACRO (ADD_H5_TEST_OLD) @@ -176,23 +175,22 @@ IF (BUILD_TESTING) IF (NOT HDF5_ENABLE_USING_MEMCHECKER) ADD_TEST ( NAME H5REPACK-${testname}-SKIPPED - COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out.${testfile}" + COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}" ) ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) ELSE (${testtype} STREQUAL "SKIP") ADD_TEST ( NAME H5REPACK-${testname} - COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out.${testfile} + COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} ) IF (NOT "${last_test}" STREQUAL "") SET_TESTS_PROPERTIES (H5REPACK-${testname} PROPERTIES DEPENDS ${last_test}) ENDIF (NOT "${last_test}" STREQUAL "") ADD_TEST ( - NAME H5REPACK-DIFF_${testname} - COMMAND $<TARGET_FILE:h5diff> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out.${testfile} + NAME H5REPACK-${testname}_DFF + COMMAND $<TARGET_FILE:h5diff> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} ) - SET_TESTS_PROPERTIES (H5REPACK-DIFF_${testname} PROPERTIES DEPENDS H5REPACK-${testname}) - SET (last_test "H5REPACK-DIFF_${testname}") + SET_TESTS_PROPERTIES (H5REPACK-${testname}_DFF PROPERTIES DEPENDS H5REPACK-${testname}) ENDIF (${testtype} STREQUAL "SKIP") ENDMACRO (ADD_H5_TEST) @@ -200,22 +198,22 @@ IF (BUILD_TESTING) IF (${testtype} STREQUAL "SKIP") IF (NOT HDF5_ENABLE_USING_MEMCHECKER) ADD_TEST ( - NAME H5REPACK-${testname}-SKIPPED - COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out.${resultfile}" + NAME H5REPACK_CMP-${testname}-SKIPPED + COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}" ) ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) ELSE (${testtype} STREQUAL "SKIP") # If using memchecker add tests without using scripts IF (HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST (NAME H5REPACK-${testname} COMMAND $<TARGET_FILE:h5repack> ${ARGN} testfiles/${resultfile} testfiles/out.${resultfile}) + ADD_TEST (NAME H5REPACK_CMP-${testname} COMMAND $<TARGET_FILE:h5repack> ${ARGN} testfiles/${resultfile} testfiles/out-${testname}.${resultfile}) ELSE (HDF5_ENABLE_USING_MEMCHECKER) ADD_TEST ( - NAME H5REPACK-${testname} + NAME H5REPACK_CMP-${testname} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$<TARGET_FILE:h5repack>" - -D "TEST_ARGS:STRING=${ARGN};testfiles/${resultfile};testfiles/out.${resultfile}" + -D "TEST_ARGS:STRING=${ARGN};testfiles/${resultfile};testfiles/out-${testname}.${resultfile}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=./testfiles/${resultfile}.out" + -D "TEST_OUTPUT=./testfiles/${resultfile}-${testname}.out" -D "TEST_EXPECT=${resultcode}" -D "TEST_FILTER:STRING=${testfilter}" -D "TEST_REFERENCE=testfiles/${resultfile}.ddl" @@ -223,9 +221,8 @@ IF (BUILD_TESTING) ) ENDIF (HDF5_ENABLE_USING_MEMCHECKER) IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5REPACK-${testname} PROPERTIES DEPENDS ${last_test}) + SET_TESTS_PROPERTIES (H5REPACK_CMP-${testname} PROPERTIES DEPENDS ${last_test}) ENDIF (NOT "${last_test}" STREQUAL "") - SET (last_test "H5REPACK-${testname}") ENDIF (${testtype} STREQUAL "SKIP") ENDMACRO (ADD_H5_CMP_TEST) @@ -234,28 +231,37 @@ IF (BUILD_TESTING) IF (NOT HDF5_ENABLE_USING_MEMCHECKER) ADD_TEST ( NAME H5REPACK_VERIFY_LAYOUT-${testname}-SKIPPED - COMMAND ${CMAKE_COMMAND} -E echo "SKIP -d ${testdset} -pH ${PROJECT_BINARY_DIR}/testfiles/out.${resultfile}" + COMMAND ${CMAKE_COMMAND} -E echo "SKIP -d ${testdset} -pH ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}" ) ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) ELSE (${testtype} STREQUAL "SKIP") IF (NOT HDF5_ENABLE_USING_MEMCHECKER) + ADD_TEST ( + NAME H5REPACK_VERIFY_LAYOUT-${testname} + COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} + ) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT-${testname} PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") + ADD_TEST ( + NAME H5REPACK_VERIFY_LAYOUT-${testname}_DFF + COMMAND $<TARGET_FILE:h5diff> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} + ) + SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT-${testname}_DFF PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}) IF (${resultcode} STREQUAL "0") ADD_TEST ( - NAME H5REPACK_VERIFY_LAYOUT-${testname} + NAME H5REPACK_VERIFY_LAYOUT-${testname}_DMP COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>" - -D "TEST_ARGS:STRING=-d;${testdset};-pH;testfiles/out.${testfile}" + -D "TEST_ARGS:STRING=-d;${testdset};-pH;testfiles/out-${testname}.${testfile}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=./testfiles/${testfile}-v.out" + -D "TEST_OUTPUT=./testfiles/${testfile}-${testname}-v.out" -D "TEST_EXPECT=${resultcode}" -D "TEST_FILTER:STRING=${testfilter}" -D "TEST_REFERENCE=${testfilter}" -P "${HDF5_RESOURCES_DIR}/grepTest.cmake" ) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT-${testname} PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - SET (last_test "H5REPACK_VERIFY_LAYOUT-${testname}") + SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT-${testname}_DMP PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}_DFF) ELSE (${resultcode} STREQUAL "0") IF (${testfilter} STREQUAL "CHUNKED") SET (nottestfilter "(CONTIGUOUS|COMPACT)") @@ -267,21 +273,18 @@ IF (BUILD_TESTING) SET (nottestfilter "(CONTIGUOUS|CHUNK)") ENDIF (${testfilter} STREQUAL "COMPACT") ADD_TEST ( - NAME H5REPACK_VERIFY_LAYOUT_ALL-${testname} + NAME H5REPACK_VERIFY_LAYOUT-${testname}_DMP COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>" - -D "TEST_ARGS:STRING=-pH;testfiles/out.${testfile}" + -D "TEST_ARGS:STRING=-pH;testfiles/out-${testname}.${testfile}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -D "TEST_OUTPUT=./testfiles/${testfile}-v.out" + -D "TEST_OUTPUT=./testfiles/${testfile}-${testname}-v.out" -D "TEST_EXPECT=${resultcode}" -D "TEST_FILTER:STRING=${nottestfilter}" -D "TEST_REFERENCE=${testfilter}" -P "${HDF5_RESOURCES_DIR}/grepTest.cmake" ) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT_ALL-${testname} PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - SET (last_test "H5REPACK_VERIFY_LAYOUT_ALL-${testname}") + SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT-${testname}_DMP PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}_DFF) ENDIF (${resultcode} STREQUAL "0") ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) ENDIF (${testtype} STREQUAL "SKIP") @@ -289,25 +292,21 @@ IF (BUILD_TESTING) MACRO (ADD_H5_TEST_META testname testfile) ADD_TEST ( - NAME H5REPACK-${testname}_N - COMMAND $<TARGET_FILE:h5repack> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out_N.${testname}.h5 + NAME H5REPACK_META-${testname}_N + COMMAND $<TARGET_FILE:h5repack> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_N.${testname}.h5 ) IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5REPACK-${testname}_N PROPERTIES DEPENDS ${last_test}) + SET_TESTS_PROPERTIES (H5REPACK_META-${testname}_N PROPERTIES DEPENDS ${last_test}) ENDIF (NOT "${last_test}" STREQUAL "") ADD_TEST ( - NAME H5REPACK-${testname}_M - COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out_M.${testname}.h5 + NAME H5REPACK_META-${testname}_M + COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_M.${testname}.h5 ) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5REPACK-${testname}_M PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - ADD_TEST (NAME H5REPACK-${testname} COMMAND ${CMAKE_COMMAND} -E compare_files ${PROJECT_BINARY_DIR}/testfiles/out_N.${testname}.h5 ${PROJECT_BINARY_DIR}/testfiles/out_M.${testname}.h5) - SET_TESTS_PROPERTIES (H5REPACK-${testname} PROPERTIES WILL_FAIL "true") - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5REPACK-${testname} PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - SET (last_test "H5REPACK-${testname}") + SET_TESTS_PROPERTIES (H5REPACK_META-${testname}_M PROPERTIES DEPENDS H5REPACK_META-${testname}_N) + + ADD_TEST (NAME H5REPACK_META-${testname} COMMAND ${CMAKE_COMMAND} -E compare_files ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_N.${testname}.h5 ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_M.${testname}.h5) + SET_TESTS_PROPERTIES (H5REPACK_META-${testname} PROPERTIES WILL_FAIL "true") + SET_TESTS_PROPERTIES (H5REPACK_META-${testname} PROPERTIES DEPENDS H5REPACK_META-${testname}_M) ENDMACRO (ADD_H5_TEST_META) ############################################################################## @@ -316,43 +315,158 @@ IF (BUILD_TESTING) ############################################################################## ############################################################################## + # -------------------------------------------------------------------- + # test file names + # -------------------------------------------------------------------- + SET (INFO_FILE testfiles/h5repack.info) + + SET (FILE0 h5repack_fill.h5) + SET (FILE1 h5repack_objs.h5) + SET (FILE2 h5repack_attr.h5) + SET (FILE3 h5repack_hlink.h5) + SET (FILE4 h5repack_layout.h5) + SET (FILE5 h5repack_early.h5) + SET (FILE7 h5repack_szip.h5) + SET (FILE8 h5repack_deflate.h5) + SET (FILE9 h5repack_shuffle.h5) + SET (FILE10 h5repack_fletcher.h5) + SET (FILE11 h5repack_filters.h5) + SET (FILE12 h5repack_nbit.h5) + SET (FILE13 h5repack_soffset.h5) + SET (FILE14 h5repack_layouto.h5 ) # A file with an older version of the layout message (copy of test/tlayouto.h5) + SET (FILE15 h5repack_named_dtypes.h5) + SET (FILE16 tfamily%05d.h5) # located in common testfiles folder + SET (FILE18 h5repack_layout2.h5) + SET (FILE_REF h5repack_refs.h5) + SET (FILE_ATTR_REF h5repack_attr_refs.h5) + # Remove any output file left over from previous test run ADD_TEST ( NAME H5REPACK-clearall-objects COMMAND ${CMAKE_COMMAND} -E remove - ./testfiles/h5repack_filters.h5.out - ./testfiles/h5repack_filters.h5.out.err - ./testfiles/h5repack_layout.h5-v.out - ./testfiles/h5repack_layout.h5-v.out.err - ./testfiles/h5repack_layout2.h5-v.out - ./testfiles/h5repack_layout2.h5-v.out.err - ./testfiles/h5repack_layout3.h5-v.out - ./testfiles/h5repack_layout3.h5-v.out.err - ./testfiles/out.tfamily%05d.h5 - ./testfiles/out.h5diff_attr1.h5 - ./testfiles/out.h5repack_attr.h5 - ./testfiles/out.h5repack_attr_refs.h5 - ./testfiles/out.h5repack_deflate.h5 - ./testfiles/out.h5repack_early.h5 - ./testfiles/out.h5repack_fill.h5 - ./testfiles/out.h5repack_filters.h5 - ./testfiles/out.h5repack_fletcher.h5 - ./testfiles/out.h5repack_hlink.h5 - ./testfiles/out.h5repack_layout.h5 - ./testfiles/out.h5repack_layouto.h5 - ./testfiles/out.h5repack_layout2.h5 - ./testfiles/out.h5repack_layout3.h5 - ./testfiles/out.h5repack_named_dtypes.h5 - ./testfiles/out.h5repack_nbit.h5 - ./testfiles/out.h5repack_objs.h5 - ./testfiles/out.h5repack_refs.h5 - ./testfiles/out.h5repack_shuffle.h5 - ./testfiles/out.h5repack_soffset.h5 - ./testfiles/out_M.meta_short.h5 - ./testfiles/out_N.meta_short.h5 - ./testfiles/out_M.meta_long.h5 - ./testfiles/out_N.meta_long.h5 + ./testfiles/h5repack_filters.h5-gzip_verbose_filters.out + ./testfiles/h5repack_filters.h5-gzip_verbose_filters.out.err + ./testfiles/h5repack_layout.h5-chunk_18x13-v.out + ./testfiles/h5repack_layout.h5-chunk_18x13-v.out.err + ./testfiles/h5repack_layout.h5-chunk_20x10-v.out + ./testfiles/h5repack_layout.h5-chunk_20x10-v.out.err + ./testfiles/h5repack_layout.h5-chunk_compa-v.out + ./testfiles/h5repack_layout.h5-chunk_compa-v.out.err + ./testfiles/h5repack_layout.h5-chunk_conti-v.out + ./testfiles/h5repack_layout.h5-chunk_conti-v.out.err + ./testfiles/h5repack_layout.h5-compa-v.out + ./testfiles/h5repack_layout.h5-compa-v.out.err + ./testfiles/h5repack_layout.h5-conti-v.out + ./testfiles/h5repack_layout.h5-conti-v.out.err + ./testfiles/h5repack_layout.h5-dset2_chunk_20x10-v.out + ./testfiles/h5repack_layout.h5-dset2_chunk_20x10-v.out.err + ./testfiles/h5repack_layout.h5-dset2_compa-v.out + ./testfiles/h5repack_layout.h5-dset2_compa-v.out.err + ./testfiles/h5repack_layout.h5-dset2_conti-v.out + ./testfiles/h5repack_layout.h5-dset2_conti-v.out.err + ./testfiles/h5repack_layout.h5-dset_compa_chunk-v.out + ./testfiles/h5repack_layout.h5-dset_compa_chunk-v.out.err + ./testfiles/h5repack_layout.h5-dset_compa_compa-v.out + ./testfiles/h5repack_layout.h5-dset_compa_compa-v.out.err + ./testfiles/h5repack_layout.h5-dset_compa_conti-v.out + ./testfiles/h5repack_layout.h5-dset_compa_conti-v.out.err + ./testfiles/h5repack_layout.h5-dset_conti_chunk-v.out + ./testfiles/h5repack_layout.h5-dset_conti_chunk-v.out.err + ./testfiles/h5repack_layout.h5-dset_conti_compa-v.out + ./testfiles/h5repack_layout.h5-dset_conti_compa-v.out.err + ./testfiles/h5repack_layout.h5-dset_conti_conti-v.out + ./testfiles/h5repack_layout.h5-dset_conti_conti-v.out.err + ./testfiles/h5repack_layout.h5-layout_long_switches-v.out + ./testfiles/h5repack_layout.h5-layout_long_switches-v.out.err + ./testfiles/h5repack_layout.h5-layout_short_switches-v.out + ./testfiles/h5repack_layout.h5-layout_short_switches-v.out.err + ./testfiles/h5repack_layout2.h5-contig_small_compa-v.out + ./testfiles/h5repack_layout2.h5-contig_small_compa-v.out.err + ./testfiles/h5repack_layout2.h5-contig_small_fixed_compa-v.out + ./testfiles/h5repack_layout2.h5-contig_small_fixed_compa-v.out.err + ./testfiles/h5repack_layout3.h5-chunk2chunk-v.out + ./testfiles/h5repack_layout3.h5-chunk2chunk-v.out.err + ./testfiles/h5repack_layout3.h5-chunk2compa-v.out + ./testfiles/h5repack_layout3.h5-chunk2compa-v.out.err + ./testfiles/h5repack_layout3.h5-chunk2conti-v.out + ./testfiles/h5repack_layout3.h5-chunk2conti-v.out.err + ./testfiles/h5repack_layout3.h5-error1-v.out + ./testfiles/h5repack_layout3.h5-error1-v.out.err + ./testfiles/h5repack_layout3.h5-error2-v.out + ./testfiles/h5repack_layout3.h5-error2-v.out.err + ./testfiles/h5repack_layout3.h5-error3-v.out + ./testfiles/h5repack_layout3.h5-error3-v.out.err + ./testfiles/out-family.tfamily%05d.h5 + ./testfiles/out-HDFFV-7840.h5diff_attr1.h5 + ./testfiles/out-attr.h5repack_attr.h5 + ./testfiles/out-native_attr.h5repack_attr.h5 + ./testfiles/out-HDFFV-5932.h5repack_attr_refs.h5 + ./testfiles/out-deflate_copy.h5repack_deflate.h5 + ./testfiles/out-deflate_remove.h5repack_deflate.h5 + ./testfiles/out-early.h5repack_early.h5 + ./testfiles/out-fill.h5repack_fill.h5 + ./testfiles/out-native_fill.h5repack_fill.h5 + ./testfiles/out-gzip_verbose_filters.h5repack_filters.h5 + ./testfiles/out-fletcher_copy.h5repack_fletcher.h5 + ./testfiles/out-fletcher_remove.h5repack_fletcher.h5 + ./testfiles/out-hlink.h5repack_hlink.h5 + ./testfiles/out-chunk_18x13.h5repack_layout.h5 + ./testfiles/out-chunk_20x10.h5repack_layout.h5 + ./testfiles/out-chunk_compa.h5repack_layout.h5 + ./testfiles/out-chunk_conti.h5repack_layout.h5 + ./testfiles/out-compa.h5repack_layout.h5 + ./testfiles/out-conti.h5repack_layout.h5 + ./testfiles/out-deflate_file.h5repack_layout.h5 + ./testfiles/out-deflate_limit.h5repack_layout.h5 + ./testfiles/out-dset2_chunk_20x10.h5repack_layout.h5 + ./testfiles/out-dset2_compa.h5repack_layout.h5 + ./testfiles/out-dset2_conti.h5repack_layout.h5 + ./testfiles/out-dset_compa_chunk.h5repack_layout.h5 + ./testfiles/out-dset_compa_compa.h5repack_layout.h5 + ./testfiles/out-dset_compa_conti.h5repack_layout.h5 + ./testfiles/out-dset_conti_chunk.h5repack_layout.h5 + ./testfiles/out-dset_conti_compa.h5repack_layout.h5 + ./testfiles/out-dset_conti_conti.h5repack_layout.h5 + ./testfiles/out-fletcher_all.h5repack_layout.h5 + ./testfiles/out-fletcher_individual.h5repack_layout.h5 + ./testfiles/out-global_filters.h5repack_layout.h5 + ./testfiles/out-gzip_all.h5repack_layout.h5 + ./testfiles/out-gzip_individual.h5repack_layout.h5 + ./testfiles/out-layout.h5repack_layout.h5 + ./testfiles/out-layout_long_switches.h5repack_layout.h5 + ./testfiles/out-layout_short_switches.h5repack_layout.h5 + ./testfiles/out-old_style_layout_short_switches.h5repack_layout.h5 + ./testfiles/out-shuffle_all.h5repack_layout.h5 + ./testfiles/out-shuffle_individual.h5repack_layout.h5 + ./testfiles/out-upgrade_layout.h5repack_layouto.h5 + ./testfiles/out-contig_small_compa.h5repack_layout2.h5 + ./testfiles/out-contig_small_fixed_compa.h5repack_layout2.h5 + ./testfiles/out-chunk2chunk.h5repack_layout3.h5 + ./testfiles/out-chunk2compa.h5repack_layout3.h5 + ./testfiles/out-chunk2conti.h5repack_layout3.h5 + ./testfiles/out-error1.h5repack_layout3.h5 + ./testfiles/out-error2.h5repack_layout3.h5 + ./testfiles/out-error3.h5repack_layout3.h5 + ./testfiles/out-error4.h5repack_layout3.h5 + ./testfiles/out-committed_dt.h5repack_named_dtypes.h5 + ./testfiles/out-nbit_add.h5repack_nbit.h5 + ./testfiles/out-nbit_copy.h5repack_nbit.h5 + ./testfiles/out-nbit_remove.h5repack_nbit.h5 + ./testfiles/out-add_alignment.h5repack_objs.h5 + ./testfiles/out-add_userblock.h5repack_objs.h5 + ./testfiles/out-objs.h5repack_objs.h5 + ./testfiles/out-gt_mallocsize.h5repack_objs.h5 + ./testfiles/out-bug1814.h5repack_refs.h5 + ./testfiles/out-shuffle_copy.h5repack_shuffle.h5 + ./testfiles/out-shuffle_remove.h5repack_shuffle.h5 + ./testfiles/out-scale_add.h5repack_soffset.h5 + ./testfiles/out-scale_copy.h5repack_soffset.h5 + ./testfiles/out-scale_remove.h5repack_soffset.h5 + ./testfiles/out-meta_short_M.meta_short.h5 + ./testfiles/out-meta_short_N.meta_short.h5 + ./testfiles/out-meta_long_M.meta_long.h5 + ./testfiles/out-meta_long_N.meta_long.h5 # from the h5repacktst h5repack_attr.h5 h5repack_attr_out.h5 @@ -398,32 +512,6 @@ IF (BUILD_TESTING) IF (NOT "${last_test}" STREQUAL "") SET_TESTS_PROPERTIES (H5REPACK-clearall-objects PROPERTIES DEPENDS ${last_test}) ENDIF (NOT "${last_test}" STREQUAL "") - SET (last_test "H5REPACK-clearall-objects") - - # -------------------------------------------------------------------- - # test file names - # -------------------------------------------------------------------- - SET (INFO_FILE testfiles/h5repack.info) - - SET (FILE0 h5repack_fill.h5) - SET (FILE1 h5repack_objs.h5) - SET (FILE2 h5repack_attr.h5) - SET (FILE3 h5repack_hlink.h5) - SET (FILE4 h5repack_layout.h5) - SET (FILE5 h5repack_early.h5) - SET (FILE7 h5repack_szip.h5) - SET (FILE8 h5repack_deflate.h5) - SET (FILE9 h5repack_shuffle.h5) - SET (FILE10 h5repack_fletcher.h5) - SET (FILE11 h5repack_filters.h5) - SET (FILE12 h5repack_nbit.h5) - SET (FILE13 h5repack_soffset.h5) - SET (FILE14 h5repack_layouto.h5 ) # A file with an older version of the layout message (copy of test/tlayouto.h5) - SET (FILE15 h5repack_named_dtypes.h5) - SET (FILE16 tfamily%05d.h5) # located in common testfiles folder - SET (FILE18 h5repack_layout2.h5) - SET (FILE_REF h5repack_refs.h5) - SET (FILE_ATTR_REF h5repack_attr_refs.h5) ADD_TEST (NAME H5REPACK-testh5repack_detect_szip COMMAND $<TARGET_FILE:testh5repack_detect_szip>) IF (HDF5_ENABLE_SZIP_SUPPORT) @@ -438,15 +526,10 @@ IF (BUILD_TESTING) SET (passRegex "no") SET_TESTS_PROPERTIES (H5REPACK-testh5repack_detect_szip PROPERTIES PASS_REGULAR_EXPRESSION "no") ENDIF (HDF5_ENABLE_SZIP_SUPPORT) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5REPACK-testh5repack_detect_szip PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") - SET (last_test "H5REPACK-testh5repack_detect_szip") + SET_TESTS_PROPERTIES (H5REPACK-testh5repack_detect_szip PROPERTIES DEPENDS H5REPACK-clearall-objects) ADD_TEST (NAME H5REPACK-h5repacktest COMMAND $<TARGET_FILE:h5repacktest>) - IF (NOT "${last_test}" STREQUAL "") - SET_TESTS_PROPERTIES (H5REPACK-h5repacktest PROPERTIES DEPENDS ${last_test}) - ENDIF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (H5REPACK-h5repacktest PROPERTIES DEPENDS H5REPACK-testh5repack_detect_szip) SET (last_test "H5REPACK-h5repacktest") # @@ -740,47 +823,29 @@ IF (BUILD_TESTING) ######################################################### # layout options (these files have no filters) ######################################################### - ADD_H5_TEST (dset2_chunk_20x10 "TEST" ${FILE4} --layout=dset2:CHUNK=20x10) - ADD_H5_VERIFY_TEST (dset2_chunk_20x10 "TEST" 0 ${FILE4} dset2 CHUNKED) - ADD_H5_TEST (chunk_20x10 "TEST" ${FILE4} -l CHUNK=20x10) - ADD_H5_VERIFY_TEST (chunk_20x10 "TEST" 1 ${FILE4} null CHUNKED) - ADD_H5_TEST (dset2_conti "TEST" ${FILE4} -l dset2:CONTI) - ADD_H5_VERIFY_TEST (dset2_conti "TEST" 0 ${FILE4} dset2 CONTIGUOUS) - ADD_H5_TEST (conti "TEST" ${FILE4} -l CONTI) - ADD_H5_VERIFY_TEST (conti "TEST" 1 ${FILE4} null CONTIGUOUS) - ADD_H5_TEST (dset2_compa "TEST" ${FILE4} -l dset2:COMPA) - ADD_H5_VERIFY_TEST (dset2_compa "TEST" 0 ${FILE4} dset2 COMPACT) - ADD_H5_TEST (compa "TEST" ${FILE4} -l COMPA) - ADD_H5_VERIFY_TEST (compa "TEST" 1 ${FILE4} null COMPACT) + ADD_H5_VERIFY_TEST (dset2_chunk_20x10 "TEST" 0 ${FILE4} dset2 CHUNKED --layout=dset2:CHUNK=20x10) + ADD_H5_VERIFY_TEST (chunk_20x10 "TEST" 1 ${FILE4} null CHUNKED -l CHUNK=20x10) + ADD_H5_VERIFY_TEST (dset2_conti "TEST" 0 ${FILE4} dset2 CONTIGUOUS -l dset2:CONTI) + ADD_H5_VERIFY_TEST (conti "TEST" 1 ${FILE4} null CONTIGUOUS -l CONTI) + ADD_H5_VERIFY_TEST (dset2_compa "TEST" 0 ${FILE4} dset2 COMPACT -l dset2:COMPA) + ADD_H5_VERIFY_TEST (compa "TEST" 1 ${FILE4} null COMPACT -l COMPA) ################################################################ # layout conversions (file has no filters) ############################################################### - ADD_H5_TEST (dset_compa_conti "TEST" ${FILE4} -l dset_compact:CONTI) - ADD_H5_VERIFY_TEST (dset_compa_conti "TEST" 0 ${FILE4} dset_compact CONTIGUOUS) - ADD_H5_TEST (dset_compa_chunk "TEST" ${FILE4} -l dset_compact:CHUNK=2x5) - ADD_H5_VERIFY_TEST (dset_compa_chunk "TEST" 0 ${FILE4} dset_compact CHUNKED) - ADD_H5_TEST (dset_compa_compa "TEST" ${FILE4} -l dset_compact:COMPA) - ADD_H5_VERIFY_TEST (dset_compa_compa "TEST" 0 ${FILE4} dset_compact COMPACT) - ADD_H5_TEST (dset_conti_compa "TEST" ${FILE4} -l dset_contiguous:COMPA) - ADD_H5_VERIFY_TEST (dset_conti_compa "TEST" 0 ${FILE4} dset_contiguous COMPACT) - ADD_H5_TEST (dset_conti_chunk "TEST" ${FILE4} -l dset_contiguous:CHUNK=3x6) - ADD_H5_VERIFY_TEST (dset_conti_chunk "TEST" 0 ${FILE4} dset_contiguous CHUNKED) - ADD_H5_TEST (dset_conti_conti "TEST" ${FILE4} -l dset_contiguous:CONTI) - ADD_H5_VERIFY_TEST (dset_conti_conti "TEST" 0 ${FILE4} dset_contiguous CONTIGUOUS) - ADD_H5_TEST (chunk_compa "TEST" ${FILE4} -l dset_chunk:COMPA) - ADD_H5_VERIFY_TEST (chunk_compa "TEST" 0 ${FILE4} dset_chunk COMPACT) - ADD_H5_TEST (chunk_conti "TEST" ${FILE4} -l dset_chunk:CONTI) - ADD_H5_VERIFY_TEST (chunk_conti "TEST" 0 ${FILE4} dset_chunk CONTIGUOUS) - ADD_H5_TEST (chunk_18x13 "TEST" ${FILE4} -l dset_chunk:CHUNK=18x13) - ADD_H5_VERIFY_TEST (chunk_18x13 "TEST" 0 ${FILE4} dset_chunk CHUNKED) + ADD_H5_VERIFY_TEST (dset_compa_conti "TEST" 0 ${FILE4} dset_compact CONTIGUOUS -l dset_compact:CONTI) + ADD_H5_VERIFY_TEST (dset_compa_chunk "TEST" 0 ${FILE4} dset_compact CHUNKED -l dset_compact:CHUNK=2x5) + ADD_H5_VERIFY_TEST (dset_compa_compa "TEST" 0 ${FILE4} dset_compact COMPACT -l dset_compact:COMPA) + ADD_H5_VERIFY_TEST (dset_conti_compa "TEST" 0 ${FILE4} dset_contiguous COMPACT -l dset_contiguous:COMPA) + ADD_H5_VERIFY_TEST (dset_conti_chunk "TEST" 0 ${FILE4} dset_contiguous CHUNKED -l dset_contiguous:CHUNK=3x6) + ADD_H5_VERIFY_TEST (dset_conti_conti "TEST" 0 ${FILE4} dset_contiguous CONTIGUOUS -l dset_contiguous:CONTI) + ADD_H5_VERIFY_TEST (chunk_compa "TEST" 0 ${FILE4} dset_chunk COMPACT -l dset_chunk:COMPA) + ADD_H5_VERIFY_TEST (chunk_conti "TEST" 0 ${FILE4} dset_chunk CONTIGUOUS -l dset_chunk:CONTI) + ADD_H5_VERIFY_TEST (chunk_18x13 "TEST" 0 ${FILE4} dset_chunk CHUNKED -l dset_chunk:CHUNK=18x13) # test convert small size dataset ( < 1k) to compact layout without -m - ADD_H5_TEST (contig_small_compa "TEST" ${FILE18} -l contig_small:COMPA) - ADD_H5_VERIFY_TEST (contig_small_compa "TEST" 0 ${FILE18} contig_small COMPACT) - - ADD_H5_TEST (contig_small_fixed_compa "TEST" ${FILE18} -l chunked_small_fixed:COMPA) - ADD_H5_VERIFY_TEST (contig_small_fixed_compa "TEST" 0 ${FILE18} chunked_small_fixed COMPACT) + ADD_H5_VERIFY_TEST (contig_small_compa "TEST" 0 ${FILE18} contig_small COMPACT -l contig_small:COMPA) + ADD_H5_VERIFY_TEST (contig_small_fixed_compa "TEST" 0 ${FILE18} chunked_small_fixed COMPACT -l chunked_small_fixed:COMPA) #--------------------------------------------------------------------------- # Test file contains chunked datasets (need multiple dsets) with @@ -788,17 +853,14 @@ IF (BUILD_TESTING) # Use first dset to test. #--------------------------------------------------------------------------- # chunk to chunk - specify chunk dim bigger than any current dim -ADD_H5_TEST (chunk2chunk "TEST" h5repack_layout3.h5 -l chunk_unlimit1:CHUNK=100x300) -ADD_H5_VERIFY_TEST (chunk2chunk "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CHUNK) +ADD_H5_VERIFY_TEST (chunk2chunk "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CHUNK -l chunk_unlimit1:CHUNK=100x300) # chunk to contiguous -ADD_H5_TEST (chunk2conti "TEST" h5repack_layout3.h5 -l chunk_unlimit1:CONTI) -ADD_H5_VERIFY_TEST (chunk2conti "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CONTI) +ADD_H5_VERIFY_TEST (chunk2conti "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CONTI -l chunk_unlimit1:CONTI) # chunk to compact - convert big dataset (should be > 64k) for this purpose, # should remain as original layout (chunk) -ADD_H5_TEST (chunk2compa "TEST" h5repack_layout3.h5 -l chunk_unlimit1:COMPA) -ADD_H5_VERIFY_TEST (chunk2compa "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CHUNK) +ADD_H5_VERIFY_TEST (chunk2compa "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CHUNK -l chunk_unlimit1:COMPA) #-------------------------------------------------------------------------- # Test -f for some specific cases. Chunked dataset with unlimited max dims. @@ -808,16 +870,13 @@ ADD_H5_VERIFY_TEST (chunk2compa "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CHUN # - should not change max dims from unlimit # chunk dim is bigger than dataset dim. ( dset size < 64k ) -ADD_H5_TEST (error1 "TEST" h5repack_layout3.h5 -f chunk_unlimit1:NONE) -ADD_H5_VERIFY_TEST (error1 "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 H5S_UNLIMITED) +ADD_H5_VERIFY_TEST (error1 "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 H5S_UNLIMITED -f chunk_unlimit1:NONE) # chunk dim is bigger than dataset dim. ( dset size > 64k ) -ADD_H5_TEST (error2 "TEST" h5repack_layout3.h5 -f chunk_unlimit2:NONE) -ADD_H5_VERIFY_TEST (error2 "TEST" 0 h5repack_layout3.h5 chunk_unlimit2 H5S_UNLIMITED) +ADD_H5_VERIFY_TEST (error2 "TEST" 0 h5repack_layout3.h5 chunk_unlimit2 H5S_UNLIMITED -f chunk_unlimit2:NONE) # chunk dims are smaller than dataset dims. ( dset size < 64k ) -ADD_H5_TEST (error3 "TEST" h5repack_layout3.h5 -f chunk_unlimit3:NONE) -ADD_H5_VERIFY_TEST (error3 "TEST" 0 h5repack_layout3.h5 chunk_unlimit3 H5S_UNLIMITED) +ADD_H5_VERIFY_TEST (error3 "TEST" 0 h5repack_layout3.h5 chunk_unlimit3 H5S_UNLIMITED -f chunk_unlimit3:NONE) # file input - should not fail ADD_H5_TEST (error4 "TEST" h5repack_layout3.h5 -f NONE) @@ -829,22 +888,20 @@ ADD_H5_TEST (error4 "TEST" h5repack_layout3.h5 -f NONE) ADD_H5_TEST (native_attr "TEST" ${FILE2} -n) # latest file format with long switches. use FILE4=h5repack_layout.h5 (no filters) - SET (arg ${FILE4} --layout CHUNK=20x10 --filter GZIP=1 --minimum=10 --native --latest --compact=8 --indexed=6 --ssize=8[:dtype]) + SET (arg --layout CHUNK=20x10 --filter GZIP=1 --minimum=10 --native --latest --compact=8 --indexed=6 --ssize=8[:dtype]) SET (TESTTYPE "TEST") IF (NOT USE_FILTER_DEFLATE) SET (TESTTYPE "SKIP") ENDIF (NOT USE_FILTER_DEFLATE) - ADD_H5_TEST (layout_long_switches ${TESTTYPE} ${arg}) - ADD_H5_VERIFY_TEST (layout_long_switches ${TESTTYPE} 1 ${FILE4} null CHUNKED) + ADD_H5_VERIFY_TEST (layout_long_switches ${TESTTYPE} 1 ${FILE4} null CHUNKED ${arg}) # latest file format with short switches. use FILE4=h5repack_layout.h5 (no filters) - SET (arg ${FILE4} -l CHUNK=20x10 -f GZIP=1 -m 10 -n -L -c 8 -d 6 -s 8[:dtype]) + SET (arg -l CHUNK=20x10 -f GZIP=1 -m 10 -n -L -c 8 -d 6 -s 8[:dtype]) SET (TESTTYPE "TEST") IF (NOT USE_FILTER_DEFLATE) SET (TESTTYPE "SKIP") ENDIF (NOT USE_FILTER_DEFLATE) - ADD_H5_TEST (layout_short_switches ${TESTTYPE} ${arg}) - ADD_H5_VERIFY_TEST (layout_short_switches ${TESTTYPE} 1 ${FILE4} null CHUNKED) + ADD_H5_VERIFY_TEST (layout_short_switches ${TESTTYPE} 1 ${FILE4} null CHUNKED ${arg}) # several global filters SET (arg ${FILE4} --filter GZIP=1 --filter SHUF) diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in index 389339f..fe3a11c 100644 --- a/tools/h5repack/Makefile.in +++ b/tools/h5repack/Makefile.in @@ -248,6 +248,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ @@ -299,7 +300,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ -PTHREAD = @PTHREAD@ RANLIB = @RANLIB@ ROOT = @ROOT@ RUNPARALLEL = @RUNPARALLEL@ diff --git a/tools/h5repack/h5repack.sh.in b/tools/h5repack/h5repack.sh.in index a732ffb..dc90426 100644 --- a/tools/h5repack/h5repack.sh.in +++ b/tools/h5repack/h5repack.sh.in @@ -189,7 +189,9 @@ SKIP() { DIFFTEST() { VERIFY h5diff output $@ - $RUNSERIAL $H5DIFF_BIN -q "$@" + ( + $RUNSERIAL $H5DIFF_BIN -q "$@" + ) RET=$? if [ $RET != 0 ] ; then echo "*FAILED*" @@ -208,44 +210,57 @@ DIFFTEST() TOOLTEST() { echo $@ - TOOLTEST_MAIN $@ - outfile=$TESTDIR/out.$1 - rm -f $outfile -} + infile=$TESTDIR/$2 + outfile=$TESTDIR/out-$1.$2 + shift + shift -# TOOLTEST main function, doesn't delete $output file -TOOLTEST_MAIN() -{ # Run test. TESTING $H5REPACK $@ - - infile=$TESTDIR/$1 - outfile=$TESTDIR/out.$1 - shift - $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile + ( + $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile + ) RET=$? if [ $RET != 0 ] ; then - echo "*FAILED*" - nerrors="`expr $nerrors + 1`" + echo "*FAILED*" + nerrors="`expr $nerrors + 1`" else - echo " PASSED" - DIFFTEST $infile $outfile + echo " PASSED" + DIFFTEST $infile $outfile fi + rm -f $outfile } #------------------------------------------ # Verifying layouts of a dataset VERIFY_LAYOUT_DSET() { - outfile=$TESTDIR/out.$1 - layoutfile=$TESTDIR/layout.$1 - dset=$2 - expectlayout=$3 + layoutfile=$TESTDIR/layout-$1.$2 + dset=$3 + expectlayout=$4 + infile=$TESTDIR/$2 + outfile=$TESTDIR/out-$1.$2 + shift + shift + shift + shift + + $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile + RET=$? + if [ $RET != 0 ] ; then + echo "*FAILED*" + nerrors="`expr $nerrors + 1`" + else + echo " PASSED" + DIFFTEST $infile $outfile + fi #--------------------------------- # check the layout from a dataset VERIFY "a dataset layout" - $RUNSERIAL $H5DUMP_BIN -d $dset -pH $outfile > $layoutfile + ( + $RUNSERIAL $H5DUMP_BIN -d $dset -pH $outfile > $layoutfile + ) $GREP $expectlayout $layoutfile > /dev/null if [ $? -eq 0 ]; then echo " PASSED" @@ -262,17 +277,35 @@ VERIFY_LAYOUT_DSET() # Verifying layouts from entire file VERIFY_LAYOUT_ALL() { - outfile=$TESTDIR/out.$1 - layoutfile=$TESTDIR/layout.$1 - expectlayout=$2 + outfile=$TESTDIR/out-$1.$2 + layoutfile=$TESTDIR/layout-$1.$2 + expectlayout=$3 + shift + shift + shift + + $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile + RET=$? + if [ $RET != 0 ] ; then + echo "*FAILED*" + nerrors="`expr $nerrors + 1`" + else + echo " PASSED" + DIFFTEST $infile $outfile + fi + #--------------------------------- # check the layout from a dataset # check if the other layouts still exsit VERIFY "layouts" + ( # if CONTIGUOUS if [ $expectlayout = "CONTIGUOUS" ]; then - $RUNSERIAL $H5DUMP_BIN -pH $outfile > $layoutfile + TESTING $H5DUMP_BIN -pH $outfile + ( + $RUNSERIAL $H5DUMP_BIN -pH $outfile > $layoutfile + ) $GREP "COMPACT" $layoutfile > /dev/null if [ $? -eq 0 ]; then echo " FAILED" @@ -287,7 +320,10 @@ VERIFY_LAYOUT_ALL() else # if COMPACT if [ $expectlayout = "COMPACT" ]; then - $RUNSERIAL $H5DUMP_BIN -pH $outfile > $layoutfile + TESTING $H5DUMP_BIN -pH $outfile + ( + $RUNSERIAL $H5DUMP_BIN -pH $outfile > $layoutfile + ) $GREP "CHUNKED" $layoutfile > /dev/null if [ $? -eq 0 ]; then echo " FAILED" @@ -302,7 +338,10 @@ VERIFY_LAYOUT_ALL() else # if CHUNKED if [ $expectlayout = "CHUNKED" ]; then - $RUNSERIAL $H5DUMP_BIN -pH $outfile > $layoutfile + TESTING $H5DUMP_BIN -pH $outfile + ( + $RUNSERIAL $H5DUMP_BIN -pH $outfile > $layoutfile + ) $GREP "CONTIGUOUS" $layoutfile > /dev/null if [ $? -eq 0 ]; then echo " FAILED" @@ -317,6 +356,7 @@ VERIFY_LAYOUT_ALL() fi fi fi + ) # clean up tmp files rm -f $outfile @@ -327,13 +367,16 @@ VERIFY_LAYOUT_ALL() # TOOLTEST0() { + infile=$TESTDIR/$2 + outfile=$TESTDIR/out-$1.$2 + shift + shift + # Run test. TESTING $H5REPACK $@ - - infile=$TESTDIR/$1 - outfile=$TESTDIR/out.$1 - shift - $RUNSERIAL $H5REPACK_BIN -i $infile -o $outfile "$@" + ( + $RUNSERIAL $H5REPACK_BIN -i $infile -o $outfile "$@" + ) RET=$? if [ $RET != 0 ] ; then echo "*FAILED*" @@ -351,13 +394,16 @@ TOOLTEST0() # TOOLTEST1() { + infile=$TESTDIR/$2 + outfile=$TESTDIR/out-$1.$2 + shift + shift + # Run test. TESTING $H5REPACK $@ - - infile=$TESTDIR/$1 - outfile=$TESTDIR/out.$1 - shift - $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile + ( + $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile + ) RET=$? if [ $RET != 0 ] ; then echo "*FAILED*" @@ -374,16 +420,20 @@ TOOLTEST1() # TOOLTESTV() { - # Run test. - TESTING $H5REPACK $@ - expect="$TESTDIR/$1.ddl" - actual="$TESTDIR/`basename $1 .ddl`.out" - actual_err="$TESTDIR/`basename $1 .ddl`.err" + expect="$TESTDIR/$2.ddl" + actual="$TESTDIR/`basename $2 .ddl`.out" + actual_err="$TESTDIR/`basename $2 .ddl`.err" - infile=$TESTDIR/$1 - outfile=$TESTDIR/out.$1 + infile=$TESTDIR/$2 + outfile=$TESTDIR/out-$1.$2 + shift shift - $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile >$actual 2>$actual_err + + # Run test. + TESTING $H5REPACK $@ + ( + $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile + ) >$actual 2>$actual_err RET=$? if [ $RET != 0 ] ; then echo "*FAILED*" @@ -427,17 +477,41 @@ TOOLTESTV() # Verify the output file of second run is larger than the one of 1st run. TOOLTEST_META() { - input_file=$1 - outfile="$TESTDIR/out.$1" + infile=$TESTDIR/$2 + outfile=$TESTDIR/out-$1.$2 + shift + shift - # Use TOOLTEST_MAIN to run because it does not remove the output file. - # 1st run, without metadata option - TOOLTEST_MAIN $1 + # Run test. + TESTING $H5REPACK $@ + ( + $RUNSERIAL $H5REPACK_BIN $infile $outfile + ) + RET=$? + if [ $RET != 0 ] ; then + echo "*FAILED*" + nerrors="`expr $nerrors + 1`" + else + echo " PASSED" + DIFFTEST $infile $outfile + fi # get the size of the first output file size1=`wc -c $outfile | cut -d' ' -f1` # 2nd run with metadata option - TOOLTEST_MAIN $* + # Run test. + TESTING $H5REPACK $@ + ( + $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile + ) + RET=$? + if [ $RET != 0 ] ; then + echo "*FAILED*" + nerrors="`expr $nerrors + 1`" + else + echo " PASSED" + DIFFTEST $infile $outfile + fi # get the size of the second output file size2=`wc -c $outfile | cut -d' ' -f1` @@ -492,12 +566,12 @@ fi COPY_TESTFILES_TO_TESTDIR # copy files (these files have no filters) -TOOLTEST h5repack_fill.h5 -TOOLTEST h5repack_objs.h5 -TOOLTEST h5repack_attr.h5 -TOOLTEST h5repack_hlink.h5 -TOOLTEST h5repack_layout.h5 -TOOLTEST h5repack_early.h5 +TOOLTEST fill h5repack_fill.h5 +TOOLTEST objs h5repack_objs.h5 +TOOLTEST attr h5repack_attr.h5 +TOOLTEST hlink h5repack_hlink.h5 +TOOLTEST layout h5repack_layout.h5 +TOOLTEST early h5repack_early.h5 # use h5repack_layout.h5 to write some filters (this file has no filters) @@ -507,7 +581,7 @@ arg="h5repack_layout.h5 -f dset1:GZIP=1 -l dset1:CHUNK=20x10" if test $USE_FILTER_DEFLATE != "yes" ; then SKIP $arg else - TOOLTEST $arg + TOOLTEST gzip_individual $arg fi # gzip for all @@ -515,7 +589,7 @@ arg="h5repack_layout.h5 -f GZIP=1" if test $USE_FILTER_DEFLATE != "yes" ; then SKIP $arg else - TOOLTEST $arg + TOOLTEST gzip_all $arg fi # szip with individual object @@ -523,7 +597,7 @@ arg="h5repack_layout.h5 -f dset2:SZIP=8,EC -l dset2:CHUNK=20x10" if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" ; then SKIP $arg else - TOOLTEST $arg + TOOLTEST szip_individual $arg fi # szip for all @@ -531,7 +605,7 @@ arg="h5repack_layout.h5 -f SZIP=8,NN" if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" ; then SKIP $arg else - TOOLTEST $arg + TOOLTEST szip_all $arg fi # shuffle with individual object @@ -539,7 +613,7 @@ arg="h5repack_layout.h5 -f dset2:SHUF -l dset2:CHUNK=20x10" if test $USE_FILTER_SHUFFLE != "yes" ; then SKIP $arg else - TOOLTEST $arg + TOOLTEST shuffle_individual $arg fi @@ -548,7 +622,7 @@ arg="h5repack_layout.h5 -f SHUF" if test $USE_FILTER_SHUFFLE != "yes" ; then SKIP $arg else - TOOLTEST $arg + TOOLTEST shuffle_all $arg fi # fletcher32 with individual object @@ -556,7 +630,7 @@ arg="h5repack_layout.h5 -f dset2:FLET -l dset2:CHUNK=20x10" if test $USE_FILTER_FLETCHER32 != "yes" ; then SKIP $arg else - TOOLTEST $arg + TOOLTEST fletcher_individual $arg fi # fletcher32 for all @@ -564,7 +638,7 @@ arg="h5repack_layout.h5 -f FLET" if test $USE_FILTER_FLETCHER32 != "yes" ; then SKIP $arg else - TOOLTEST $arg + TOOLTEST fletcher_all $arg fi # all filters @@ -572,7 +646,7 @@ arg="h5repack_layout.h5 -f dset2:SHUF -f dset2:FLET -f dset2:SZIP=8,NN -f dset2: if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" -o $USE_FILTER_SHUFFLE != "yes" -o $USE_FILTER_FLETCHER32 != "yes" -o $USE_FILTER_DEFLATE != "yes" ; then SKIP $arg else - TOOLTEST $arg + TOOLTEST all_filters $arg fi # verbose gzip with individual object @@ -581,7 +655,7 @@ if test $USE_FILTER_DEFLATE != "yes" ; then SKIP $arg else # compare output - TOOLTESTV $arg + TOOLTESTV gzip_verbose_filters $arg fi ########################################################### @@ -593,7 +667,7 @@ arg="h5repack_szip.h5" if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" ; then SKIP $arg else - TOOLTEST $arg + TOOLTEST szip_copy $arg fi # szip remove @@ -601,7 +675,7 @@ arg="h5repack_szip.h5 --filter=dset_szip:NONE" if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" ; then SKIP $arg else - TOOLTEST $arg + TOOLTEST szip_remove $arg fi # deflate copy @@ -609,7 +683,7 @@ arg="h5repack_deflate.h5" if test $USE_FILTER_DEFLATE != "yes" ; then SKIP $arg else - TOOLTEST $arg + TOOLTEST deflate_copy $arg fi # deflate remove @@ -617,7 +691,7 @@ arg="h5repack_deflate.h5 -f dset_deflate:NONE" if test $USE_FILTER_DEFLATE != "yes" ; then SKIP $arg else - TOOLTEST $arg + TOOLTEST deflate_remove $arg fi # shuffle copy @@ -625,7 +699,7 @@ arg="h5repack_shuffle.h5" if test $USE_FILTER_SHUFFLE != "yes" ; then SKIP $arg else - TOOLTEST $arg + TOOLTEST shuffle_copy $arg fi # shuffle remove @@ -633,7 +707,7 @@ arg="h5repack_shuffle.h5 -f dset_shuffle:NONE" if test $USE_FILTER_SHUFFLE != "yes" ; then SKIP $arg else - TOOLTEST $arg + TOOLTEST shuffle_remove $arg fi # fletcher32 copy @@ -641,7 +715,7 @@ arg="h5repack_fletcher.h5" if test $USE_FILTER_FLETCHER32 != "yes" ; then SKIP $arg else - TOOLTEST $arg + TOOLTEST fletcher_copy $arg fi # fletcher32 remove @@ -649,7 +723,7 @@ arg="h5repack_fletcher.h5 -f dset_fletcher32:NONE" if test $USE_FILTER_FLETCHER32 != "yes" ; then SKIP $arg else - TOOLTEST $arg + TOOLTEST fletcher_remove $arg fi # nbit copy @@ -657,7 +731,7 @@ arg="h5repack_nbit.h5" if test $USE_FILTER_NBIT != "yes" ; then SKIP $arg else - TOOLTEST $arg + TOOLTEST nbit_copy $arg fi # nbit remove @@ -665,7 +739,7 @@ arg="h5repack_nbit.h5 -f dset_nbit:NONE" if test $USE_FILTER_NBIT != "yes" ; then SKIP $arg else - TOOLTEST $arg + TOOLTEST nbit_remove $arg fi # nbit add @@ -673,7 +747,7 @@ arg="h5repack_nbit.h5 -f dset_int31:NBIT" if test $USE_FILTER_NBIT != "yes" ; then SKIP $arg else - TOOLTEST $arg + TOOLTEST nbit_add $arg fi # scaleoffset copy @@ -681,7 +755,7 @@ arg="h5repack_soffset.h5" if test $USE_FILTER_SCALEOFFSET != "yes" ; then SKIP $arg else - TOOLTEST $arg + TOOLTEST scale_copy $arg fi # scaleoffset add @@ -689,7 +763,7 @@ arg="h5repack_soffset.h5 -f dset_none:SOFF=31,IN" if test $USE_FILTER_SCALEOFFSET != "yes" ; then SKIP $arg else - TOOLTEST $arg + TOOLTEST scale_add $arg fi # scaleoffset remove @@ -697,7 +771,7 @@ arg="h5repack_soffset.h5 -f dset_scaleoffset:NONE" if test $USE_FILTER_SCALEOFFSET != "yes" ; then SKIP $arg else - TOOLTEST $arg + TOOLTEST scale_remove $arg fi # remove all filters @@ -705,7 +779,7 @@ arg="h5repack_filters.h5 -f NONE" if test $USE_FILTER_FLETCHER32 != "yes" -o $USE_FILTER_DEFLATE != "yes" -o $USE_FILTER_SZIP != "yes" -o $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SHUFFLE != "yes" -o $USE_FILTER_NBIT != "yes" -o $USE_FILTER_SCALEOFFSET != "yes" ; then SKIP $arg else - TOOLTEST $arg + TOOLTEST remove_all $arg fi #filter conversions @@ -714,14 +788,14 @@ arg="h5repack_deflate.h5 -f dset_deflate:SZIP=8,NN" if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" -o $USE_FILTER_DEFLATE != "yes" ; then SKIP $arg else - TOOLTEST $arg + TOOLTEST deflate_convert $arg fi arg="h5repack_szip.h5 -f dset_szip:GZIP=1" if test $USE_FILTER_SZIP != "yes" -o $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_DEFLATE != "yes" ; then SKIP $arg else - TOOLTEST $arg + TOOLTEST szip_convert $arg fi @@ -730,7 +804,7 @@ arg="h5repack_layout.h5 -f GZIP=1 -m 1024" if test $USE_FILTER_DEFLATE != "yes" ; then SKIP $arg else - TOOLTEST $arg + TOOLTEST deflate_limit $arg fi #file @@ -738,67 +812,50 @@ arg="h5repack_layout.h5 -e $TESTDIR/h5repack.info" if test $USE_FILTER_DEFLATE != "yes" ; then SKIP $arg else - TOOLTEST $arg + TOOLTEST deflate_file $arg fi ######################################################### # layout options (these files have no filters) ######################################################### -TOOLTEST_MAIN h5repack_layout.h5 --layout dset2:CHUNK=20x10 -VERIFY_LAYOUT_DSET h5repack_layout.h5 dset2 CHUNKED +VERIFY_LAYOUT_DSET dset2_chunk_20x10 h5repack_layout.h5 dset2 CHUNKED --layout dset2:CHUNK=20x10 -TOOLTEST_MAIN h5repack_layout.h5 -l CHUNK=20x10 -VERIFY_LAYOUT_ALL h5repack_layout.h5 CHUNKED +VERIFY_LAYOUT_ALL chunk_20x10 h5repack_layout.h5 CHUNKED -l CHUNK=20x10 -TOOLTEST_MAIN h5repack_layout.h5 -l dset2:CONTI -VERIFY_LAYOUT_DSET h5repack_layout.h5 dset2 CONTIGUOUS +VERIFY_LAYOUT_DSET dset2_conti h5repack_layout.h5 dset2 CONTIGUOUS -l dset2:CONTI -TOOLTEST_MAIN h5repack_layout.h5 -l CONTI -VERIFY_LAYOUT_ALL h5repack_layout.h5 CONTIGUOUS +VERIFY_LAYOUT_ALL conti h5repack_layout.h5 CONTIGUOUS -l CONTI -TOOLTEST_MAIN h5repack_layout.h5 -l dset2:COMPA -VERIFY_LAYOUT_DSET h5repack_layout.h5 dset2 COMPACT +VERIFY_LAYOUT_DSET dset2_compa h5repack_layout.h5 dset2 COMPACT -l dset2:COMPA -TOOLTEST_MAIN h5repack_layout.h5 -l COMPA -VERIFY_LAYOUT_ALL h5repack_layout.h5 COMPACT +VERIFY_LAYOUT_ALL compa h5repack_layout.h5 COMPACT -l COMPA ################################################################ # layout conversions (file has no filters) ############################################################### -TOOLTEST_MAIN h5repack_layout.h5 -l dset_compact:CONTI -VERIFY_LAYOUT_DSET h5repack_layout.h5 dset_compact CONTIGUOUS +VERIFY_LAYOUT_DSET dset_compa_conti h5repack_layout.h5 dset_compact CONTIGUOUS -l dset_compact:CONTI -TOOLTEST_MAIN h5repack_layout.h5 -l dset_compact:CHUNK=2x5 -VERIFY_LAYOUT_DSET h5repack_layout.h5 dset_compact CHUNKED +VERIFY_LAYOUT_DSET dset_compa_chunk h5repack_layout.h5 dset_compact CHUNKED -l dset_compact:CHUNK=2x5 -TOOLTEST_MAIN h5repack_layout.h5 -l dset_compact:COMPA -VERIFY_LAYOUT_DSET h5repack_layout.h5 dset_compact COMPACT +VERIFY_LAYOUT_DSET dset_compa_compa h5repack_layout.h5 dset_compact COMPACT -l dset_compact:COMPA -TOOLTEST_MAIN h5repack_layout.h5 -l dset_contiguous:COMPA -VERIFY_LAYOUT_DSET h5repack_layout.h5 dset_contiguous COMPACT +VERIFY_LAYOUT_DSET dset_conti_compa h5repack_layout.h5 dset_contiguous COMPACT -l dset_contiguous:COMPA -TOOLTEST_MAIN h5repack_layout.h5 -l dset_contiguous:CHUNK=3x6 -VERIFY_LAYOUT_DSET h5repack_layout.h5 dset_contiguous CHUNKED +VERIFY_LAYOUT_DSET dset_conti_chunk h5repack_layout.h5 dset_contiguous CHUNKED -l dset_contiguous:CHUNK=3x6 -TOOLTEST_MAIN h5repack_layout.h5 -l dset_contiguous:CONTI -VERIFY_LAYOUT_DSET h5repack_layout.h5 dset_contiguous CONTIGUOUS +VERIFY_LAYOUT_DSET dset_conti_conti h5repack_layout.h5 dset_contiguous CONTIGUOUS -l dset_contiguous:CONTI -TOOLTEST_MAIN h5repack_layout.h5 -l dset_chunk:COMPA -VERIFY_LAYOUT_DSET h5repack_layout.h5 dset_chunk COMPACT +VERIFY_LAYOUT_DSET chunk_compa h5repack_layout.h5 dset_chunk COMPACT -l dset_chunk:COMPA -TOOLTEST_MAIN h5repack_layout.h5 -l dset_chunk:CONTI -VERIFY_LAYOUT_DSET h5repack_layout.h5 dset_chunk CONTIGUOUS +VERIFY_LAYOUT_DSET chunk_conti h5repack_layout.h5 dset_chunk CONTIGUOUS -l dset_chunk:CONTI -TOOLTEST_MAIN h5repack_layout.h5 -l dset_chunk:CHUNK=18x13 -VERIFY_LAYOUT_DSET h5repack_layout.h5 dset_chunk CHUNKED +VERIFY_LAYOUT_DSET chunk_18x13 h5repack_layout.h5 dset_chunk CHUNKED -l dset_chunk:CHUNK=18x13 # test convert small size dataset ( < 1k) to compact layout without -m -TOOLTEST_MAIN h5repack_layout2.h5 -l contig_small:COMPA -VERIFY_LAYOUT_DSET h5repack_layout2.h5 contig_small COMPACT +VERIFY_LAYOUT_DSET contig_small_compa h5repack_layout2.h5 contig_small COMPACT -l contig_small:COMPA -TOOLTEST_MAIN h5repack_layout2.h5 -l chunked_small_fixed:COMPA -VERIFY_LAYOUT_DSET h5repack_layout2.h5 chunked_small_fixed COMPACT +VERIFY_LAYOUT_DSET contig_small_fixed_compa h5repack_layout2.h5 chunked_small_fixed COMPACT -l chunked_small_fixed:COMPA #--------------------------------------------------------------------------- # Test file contains chunked datasets (need multiple dsets) with @@ -806,17 +863,14 @@ VERIFY_LAYOUT_DSET h5repack_layout2.h5 chunked_small_fixed COMPACT # Use first dset to test. #--------------------------------------------------------------------------- # chunk to chunk - specify chunk dim bigger than any current dim -TOOLTEST_MAIN h5repack_layout3.h5 -l chunk_unlimit1:CHUNK=100x300 -VERIFY_LAYOUT_DSET h5repack_layout3.h5 chunk_unlimit1 CHUNK +VERIFY_LAYOUT_DSET chunk2chunk h5repack_layout3.h5 chunk_unlimit1 CHUNK -l chunk_unlimit1:CHUNK=100x300 # chunk to contiguous -TOOLTEST_MAIN h5repack_layout3.h5 -l chunk_unlimit1:CONTI -VERIFY_LAYOUT_DSET h5repack_layout3.h5 chunk_unlimit1 CONTI +VERIFY_LAYOUT_DSET chunk2conti h5repack_layout3.h5 chunk_unlimit1 CONTI -l chunk_unlimit1:CONTI # chunk to compact - convert big dataset (should be > 64k) for this purpose, # should remain as original layout (chunk) -TOOLTEST_MAIN h5repack_layout3.h5 -l chunk_unlimit1:COMPA -VERIFY_LAYOUT_DSET h5repack_layout3.h5 chunk_unlimit1 CHUNK +VERIFY_LAYOUT_DSET chunk2compa h5repack_layout3.h5 chunk_unlimit1 CHUNK -l chunk_unlimit1:COMPA #-------------------------------------------------------------------------- # Test -f for some specific cases. Chunked dataset with unlimited max dims. @@ -826,24 +880,22 @@ VERIFY_LAYOUT_DSET h5repack_layout3.h5 chunk_unlimit1 CHUNK # - should not change max dims from unlimit # chunk dim is bigger than dataset dim. ( dset size < 64k ) -TOOLTEST_MAIN h5repack_layout3.h5 -f chunk_unlimit1:NONE -VERIFY_LAYOUT_DSET h5repack_layout3.h5 chunk_unlimit1 H5S_UNLIMITED +VERIFY_LAYOUT_DSET error1 h5repack_layout3.h5 chunk_unlimit1 H5S_UNLIMITED -f chunk_unlimit1:NONE # chunk dim is bigger than dataset dim. ( dset size > 64k ) -TOOLTEST_MAIN h5repack_layout3.h5 -f chunk_unlimit2:NONE -VERIFY_LAYOUT_DSET h5repack_layout3.h5 chunk_unlimit2 H5S_UNLIMITED +VERIFY_LAYOUT_DSET error2 h5repack_layout3.h5 chunk_unlimit2 H5S_UNLIMITED -f chunk_unlimit2:NONE # chunk dims are smaller than dataset dims. ( dset size < 64k ) -TOOLTEST_MAIN h5repack_layout3.h5 -f chunk_unlimit3:NONE -VERIFY_LAYOUT_DSET h5repack_layout3.h5 chunk_unlimit3 H5S_UNLIMITED +#TOOLTEST_MAIN h5repack_layout3.h5 -f chunk_unlimit3:NONE +VERIFY_LAYOUT_DSET error3 h5repack_layout3.h5 chunk_unlimit3 H5S_UNLIMITED -f chunk_unlimit3:NONE # file input - should not fail -TOOLTEST h5repack_layout3.h5 -f NONE +TOOLTEST error4 h5repack_layout3.h5 -f NONE # Native option # Do not use FILE1, as the named dtype will be converted to native, and h5diff will # report a difference. -TOOLTEST h5repack_fill.h5 -n -TOOLTEST h5repack_attr.h5 -n +TOOLTEST native_fill h5repack_fill.h5 -n +TOOLTEST native_attr h5repack_attr.h5 -n # latest file format with long switches. use FILE4=h5repack_layout.h5 (no filters) @@ -851,8 +903,7 @@ arg="h5repack_layout.h5 --layout CHUNK=20x10 --filter GZIP=1 --minimum=10 --nati if test $USE_FILTER_DEFLATE != "yes" ; then SKIP $arg else - TOOLTEST_MAIN $arg - VERIFY_LAYOUT_ALL h5repack_layout.h5 CHUNKED + VERIFY_LAYOUT_ALL layout_long_switches h5repack_layout.h5 CHUNKED --layout CHUNK=20x10 --filter GZIP=1 --minimum=10 --native --latest --compact=8 --indexed=6 --ssize=8[:dtype] fi # latest file format with short switches. use FILE4=h5repack_layout.h5 (no filters) @@ -860,8 +911,7 @@ arg="h5repack_layout.h5 -l CHUNK=20x10 -f GZIP=1 -m 10 -n -L -c 8 -d 6 -s 8[:dty if test $USE_FILTER_DEFLATE != "yes" ; then SKIP $arg else - TOOLTEST_MAIN $arg - VERIFY_LAYOUT_ALL h5repack_layout.h5 CHUNKED + VERIFY_LAYOUT_ALL layout_short_switches h5repack_layout.h5 CHUNKED -l CHUNK=20x10 -f GZIP=1 -m 10 -n -L -c 8 -d 6 -s 8[:dtype] fi # several global filters @@ -870,7 +920,7 @@ arg="h5repack_layout.h5 --filter GZIP=1 --filter SHUF" if test $USE_FILTER_DEFLATE != "yes" -o $USE_FILTER_SHUFFLE != "yes" ; then SKIP $arg else - TOOLTEST $arg + TOOLTEST global_filters $arg fi # syntax of -i infile -o outfile @@ -879,46 +929,47 @@ arg="h5repack_layout.h5 -l CHUNK=20x10 -f GZIP=1 -m 10 -n -L -c 8 -d 6 -s 8[:dty if test $USE_FILTER_DEFLATE != "yes" ; then SKIP $arg else - TOOLTEST0 $arg + TOOLTEST0 old_style_layout_short_switches $arg fi # add a userblock to file -arg="h5repack_objs.h5 -u ublock.bin -b 2048" -TOOLTEST $arg +arg="h5repack_objs.h5 -u $TESTDIR/ublock.bin -b 2048" +TOOLTEST add_userblock $arg # add alignment arg="h5repack_objs.h5 -t 1 -a 1 " -TOOLTEST $arg +TOOLTEST add_alignment $arg # Check repacking file with old version of layout message (should get upgraded # to new version and be readable, etc.) -TOOLTEST h5repack_layouto.h5 +TOOLTEST pgrade_layout h5repack_layouto.h5 # test for datum size > H5TOOLS_MALLOCSIZE -TOOLTEST h5repack_objs.h5 -f GZIP=1 +TOOLTEST gt_mallocsize h5repack_objs.h5 -f GZIP=1 # Check repacking file with committed datatypes in odd configurations -TOOLTEST h5repack_named_dtypes.h5 +TOOLTEST committed_dt h5repack_named_dtypes.h5 # tests family driver (file is located in common testfiles folder, uses TOOLTEST1 -TOOLTEST1 tfamily%05d.h5 +TOOLTEST1 family tfamily%05d.h5 # test various references (bug 1814 and 1726) -TOOLTEST h5repack_refs.h5 +TOOLTEST bug1814 h5repack_refs.h5 # test attribute with various references (bug1797 / HDFFV-5932) # the references in attribute of compund or vlen datatype -TOOLTEST h5repack_attr_refs.h5 +TOOLTEST HDFFV-5932 h5repack_attr_refs.h5 # Add test for memory leak in attirbute. This test is verified by CTEST. # 1. leak from vlen string # 2. leak from compound type without reference member # (HDFFV-7840, ) # Note: this test is experimental for sharing test file among tools -TOOLTEST h5diff_attr1.h5 +TOOLTEST HDFFV-7840 h5diff_attr1.h5 # tests for metadata block size option -TOOLTEST_META h5repack_layout.h5 --metadata_block_size=8192 +TOOLTEST_META meta_short h5repack_layout.h5 -M 8192 +TOOLTEST_META meta_long h5repack_layout.h5 --metadata_block_size=8192 if test $nerrors -eq 0 ; then echo "All $TESTNAME tests passed." |