diff options
author | Jacob Smith <jake.smith@hdfgroup.org> | 2019-09-23 22:23:02 (GMT) |
---|---|---|
committer | Jacob Smith <jake.smith@hdfgroup.org> | 2019-09-23 22:23:02 (GMT) |
commit | 35a9e9c50fbbab20ed920daa3daf903d82cd79d7 (patch) | |
tree | 90299be3be2ffe9eb0e53b530eca309d789ac6c0 /tools/test/h5repack | |
parent | 1070468dac5d0fd5e02b69514d7a0dfacfd28606 (diff) | |
parent | 7997eb8c84dd07dacbcc427049f838d883e263b8 (diff) | |
download | hdf5-35a9e9c50fbbab20ed920daa3daf903d82cd79d7.zip hdf5-35a9e9c50fbbab20ed920daa3daf903d82cd79d7.tar.gz hdf5-35a9e9c50fbbab20ed920daa3daf903d82cd79d7.tar.bz2 |
Merge branch 'develop' of https://bitbucket.hdfgroup.org/scm/~jake.smith/hdf5 into bugfix/repack_external_storage
Diffstat (limited to 'tools/test/h5repack')
-rw-r--r-- | tools/test/h5repack/CMakeTests.cmake | 434 | ||||
-rw-r--r-- | tools/test/h5repack/CMakeVFDTests.cmake | 99 | ||||
-rw-r--r-- | tools/test/h5repack/h5repack.sh.in | 9 | ||||
-rw-r--r-- | tools/test/h5repack/h5repacktst.c | 122 | ||||
-rw-r--r-- | tools/test/h5repack/testfiles/h5repack-help.txt | 3 | ||||
-rw-r--r-- | tools/test/h5repack/testh5repack_detect_szip.c | 4 |
6 files changed, 328 insertions, 343 deletions
diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake index d31028a..eae1a7f 100644 --- a/tools/test/h5repack/CMakeTests.cmake +++ b/tools/test/h5repack/CMakeTests.cmake @@ -179,26 +179,15 @@ macro (ADD_HELP_TEST testname resultcode) # If using memchecker add tests without using scripts if (HDF5_ENABLE_USING_MEMCHECKER) - add_test (NAME H5REPACK-h5repack-${testname} COMMAND $<TARGET_FILE:h5repack${tgt_ext}> ${ARGN}) - set_tests_properties (H5REPACK-h5repack-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") - if (last_test) - set_tests_properties (H5REPACK-h5repack-${testname} PROPERTIES DEPENDS ${last_test}) - endif () - set (last_test "H5REPACK-h5repack-${testname}") - else () - add_test ( - NAME H5REPACK-h5repack-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - testfiles/h5repack-${testname}.out - testfiles/h5repack-${testname}.out.err + add_test (NAME H5REPACK-h5repack-${testname} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> ${ARGN}) + set_tests_properties (H5REPACK-h5repack-${testname} PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" ) - if (last_test) - set_tests_properties (H5REPACK-h5repack-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) - endif () + else () add_test ( NAME H5REPACK-h5repack-${testname} COMMAND "${CMAKE_COMMAND}" + -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" -D "TEST_PROGRAM=$<TARGET_FILE:h5repack${tgt_ext}>" -D "TEST_ARGS:STRING=${ARGN}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" @@ -207,39 +196,43 @@ -D "TEST_REFERENCE=h5repack-${testname}.txt" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) - set_tests_properties (H5REPACK-h5repack-${testname} PROPERTIES DEPENDS H5REPACK-h5repack-${testname}-clear-objects) endif () + set_tests_properties (H5REPACK-h5repack-${testname} PROPERTIES + FIXTURES_REQUIRED clear_h5repack + ) endmacro () macro (ADD_H5_TEST_OLD testname testtype testfile) - if ("${testtype}" STREQUAL "SKIP") - if (NOT HDF5_ENABLE_USING_MEMCHECKER) + if (NOT HDF5_ENABLE_USING_MEMCHECKER) + if ("${testtype}" STREQUAL "SKIP") add_test ( NAME H5REPACK_OLD-${testname} COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} -i ${PROJECT_BINARY_DIR}/testfiles/${testfile} -o ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}" ) set_property(TEST H5REPACK_OLD-${testname} PROPERTY DISABLED) + else () + add_test ( + 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_ext}> ${ARGN} -i ${PROJECT_BINARY_DIR}/testfiles/${testfile} -o ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} + ) + set_tests_properties (H5REPACK_OLD-${testname} PROPERTIES + DEPENDS H5REPACK_OLD-${testname}-clear-objects + ) + add_test ( + NAME H5REPACK_OLD-${testname}_DFF + COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} + ) + set_tests_properties (H5REPACK_OLD-${testname}_DFF PROPERTIES + DEPENDS H5REPACK_OLD-${testname} + ) endif () - else () - add_test ( - NAME H5REPACK_OLD-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - testfiles/out-${testname}.${testfile} - ) - if (last_test) - set_tests_properties (H5REPACK_OLD-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) - endif () - add_test ( - NAME H5REPACK_OLD-${testname} - COMMAND $<TARGET_FILE:h5repack${tgt_ext}> ${ARGN} -i ${PROJECT_BINARY_DIR}/testfiles/${testfile} -o ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} - ) - set_tests_properties (H5REPACK_OLD-${testname} PROPERTIES DEPENDS H5REPACK_OLD-${testname}-clear-objects) - add_test ( - NAME H5REPACK_OLD-${testname}_DFF - COMMAND $<TARGET_FILE:h5diff${tgt_ext}> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} - ) - set_tests_properties (H5REPACK_OLD-${testname}_DFF PROPERTIES DEPENDS H5REPACK_OLD-${testname}) endif () endmacro () @@ -255,23 +248,25 @@ else () add_test ( NAME H5REPACK-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - testfiles/out-${testname}.${testfile} + COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${testfile} + ) + set_tests_properties (H5REPACK-${testname}-clear-objects PROPERTIES + FIXTURES_REQUIRED clear_h5repack ) - if (last_test) - set_tests_properties (H5REPACK-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) - endif () add_test ( NAME H5REPACK-${testname} - COMMAND $<TARGET_FILE:h5repack${tgt_ext}> --enable-error-stack ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} + COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> --enable-error-stack ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} + ) + set_tests_properties (H5REPACK-${testname} PROPERTIES + DEPENDS H5REPACK-${testname}-clear-objects ) - set_tests_properties (H5REPACK-${testname} PROPERTIES DEPENDS H5REPACK-${testname}-clear-objects) add_test ( NAME H5REPACK-${testname}_DFF - COMMAND $<TARGET_FILE:h5diff${tgt_ext}> --enable-error-stack ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} + COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> --enable-error-stack ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} + ) + set_tests_properties (H5REPACK-${testname}_DFF PROPERTIES + DEPENDS H5REPACK-${testname} ) - set_tests_properties (H5REPACK-${testname}_DFF PROPERTIES DEPENDS H5REPACK-${testname}) endif () endmacro () @@ -289,26 +284,20 @@ if (HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5REPACK_CMP-${testname} - COMMAND $<TARGET_FILE:h5repack${tgt_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile} + COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile} ) - if (last_test) - set_tests_properties (H5REPACK_CMP-${testname} PROPERTIES DEPENDS ${last_test}) - endif () else () add_test ( NAME H5REPACK_CMP-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - testfiles/out-${testname}.${resultfile} - testfiles/${resultfile}-${testname}.out - testfiles/${resultfile}-${testname}.out.err + COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${resultfile} + ) + set_tests_properties (H5REPACK_CMP-${testname}-clear-objects PROPERTIES + FIXTURES_REQUIRED clear_h5repack ) - if (last_test) - set_tests_properties (H5REPACK_CMP-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) - endif () add_test ( NAME H5REPACK_CMP-${testname} COMMAND "${CMAKE_COMMAND}" + -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" -D "TEST_PROGRAM=$<TARGET_FILE:h5repack${tgt_ext}>" -D "TEST_ARGS:STRING=${ARGN};${resultfile};out-${testname}.${resultfile}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" @@ -318,7 +307,9 @@ -D "TEST_REFERENCE=${resultfile}-${testname}.tst" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) - set_tests_properties (H5REPACK_CMP-${testname} PROPERTIES DEPENDS H5REPACK_CMP-${testname}-clear-objects) + set_tests_properties (H5REPACK_CMP-${testname} PROPERTIES + DEPENDS H5REPACK_CMP-${testname}-clear-objects + ) endif () endif () endmacro () @@ -337,26 +328,23 @@ if (HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5REPACK_MASK-${testname} - COMMAND $<TARGET_FILE:h5repack${tgt_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile} + COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_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 ) - if (last_test) - set_tests_properties (H5REPACK_MASK-${testname} PROPERTIES DEPENDS ${last_test}) - endif () else (HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5REPACK_MASK-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - testfiles/out-${testname}.${resultfile} - testfiles/${resultfile}-${testname}.out - testfiles/${resultfile}-${testname}.out.err + 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 ) - if (last_test) - set_tests_properties (H5REPACK_MASK-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) - endif () add_test ( NAME H5REPACK_MASK-${testname} COMMAND "${CMAKE_COMMAND}" + -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" -D "TEST_PROGRAM=$<TARGET_FILE:h5repack${tgt_ext}>" -D "TEST_ARGS:STRING=${ARGN};${resultfile};out-${testname}.${resultfile}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" @@ -384,24 +372,23 @@ else () add_test ( NAME H5REPACK_DMP-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - testfiles/out-${testname}.${resultfile} - testfiles/${resultfile}-${testname}.out - testfiles/${resultfile}-${testname}.out.err + COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${resultfile} + ) + set_tests_properties (H5REPACK_DMP-${testname}-clear-objects PROPERTIES + FIXTURES_REQUIRED clear_h5repack ) - if (last_test) - set_tests_properties (H5REPACK_DMP-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) - endif () add_test ( NAME H5REPACK_DMP-${testname} - COMMAND $<TARGET_FILE:h5repack${tgt_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile} + COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile} + ) + set_tests_properties (H5REPACK_DMP-${testname} PROPERTIES + DEPENDS H5REPACK_DMP-${testname}-clear-objects ) - set_tests_properties (H5REPACK_DMP-${testname} PROPERTIES DEPENDS H5REPACK_DMP-${testname}-clear-objects) if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5REPACK_DMP-h5dump-${testname} COMMAND "${CMAKE_COMMAND}" + -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>" -D "TEST_ARGS:STRING=-q;creation_order;-pH;out-${testname}.${resultfile}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" @@ -410,7 +397,9 @@ -D "TEST_REFERENCE=${testname}.${resultfile}.ddl" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) - set_tests_properties (H5REPACK_DMP-h5dump-${testname} PROPERTIES DEPENDS "H5REPACK_DMP-${testname}") + set_tests_properties (H5REPACK_DMP-h5dump-${testname} PROPERTIES + DEPENDS "H5REPACK_DMP-${testname}" + ) endif () endif () endmacro () @@ -427,24 +416,23 @@ else () add_test ( NAME H5REPACK_STAT-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - testfiles/out-${statarg}.${resultfile} - testfiles/${resultfile}-${testname}.out - testfiles/${resultfile}-${testname}.out.err + COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${statarg}.${resultfile} + ) + set_tests_properties (H5REPACK_STAT-${testname}-clear-objects PROPERTIES + FIXTURES_REQUIRED clear_h5repack ) - if (last_test) - set_tests_properties (H5REPACK_STAT-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) - endif () add_test ( NAME H5REPACK_STAT-${testname} - COMMAND $<TARGET_FILE:h5repack${tgt_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${statarg}.${resultfile} + COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${statarg}.${resultfile} + ) + set_tests_properties (H5REPACK_STAT-${testname} PROPERTIES + DEPENDS H5REPACK_STAT-${testname}-clear-objects ) - set_tests_properties (H5REPACK_STAT-${testname} PROPERTIES DEPENDS H5REPACK_STAT-${testname}-clear-objects) if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5REPACK_STAT-h5stat-${testname} COMMAND "${CMAKE_COMMAND}" + -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" -D "TEST_PROGRAM=$<TARGET_FILE:h5stat${tgt_ext}>" -D "TEST_ARGS:STRING=-S;-s;out-${statarg}.${resultfile}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" @@ -453,7 +441,9 @@ -D "TEST_REFERENCE=${statarg}.${resultfile}.ddl" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) - set_tests_properties (H5REPACK_STAT-h5stat-${testname} PROPERTIES DEPENDS "H5REPACK_STAT-${testname}") + set_tests_properties (H5REPACK_STAT-h5stat-${testname} PROPERTIES + DEPENDS "H5REPACK_STAT-${testname}" + ) endif () endif () endmacro () @@ -471,29 +461,30 @@ if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5REPACK_VERIFY_LAYOUT-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - testfiles/out-${testname}.${testfile} - testfiles/${testfile}-${testname}-v.out - testfiles/${testfile}-${testname}-v.out.err + COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${testfile} + ) + set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname}-clear-objects PROPERTIES + FIXTURES_REQUIRED clear_h5repack ) - if (last_test) - set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) - endif () add_test ( NAME H5REPACK_VERIFY_LAYOUT-${testname} - COMMAND $<TARGET_FILE:h5repack${tgt_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} + COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} + ) + set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname} PROPERTIES + DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}-clear-objects ) - set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname} PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}-clear-objects) add_test ( NAME H5REPACK_VERIFY_LAYOUT-${testname}_DFF - COMMAND $<TARGET_FILE:h5diff${tgt_ext}> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} + COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diff${tgt_ext}> ${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} ) - set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname}_DFF PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}) if (NOT ${resultcode}) add_test ( NAME H5REPACK_VERIFY_LAYOUT-${testname}_DMP COMMAND "${CMAKE_COMMAND}" + -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>" -D "TEST_ARGS:STRING=-d;${testdset};-pH;out-${testname}.${testfile}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" @@ -503,7 +494,9 @@ -D "TEST_REFERENCE=${testfilter}" -P "${HDF_RESOURCES_EXT_DIR}/grepTest.cmake" ) - set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname}_DMP PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}_DFF) + set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname}_DMP PROPERTIES + DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}_DFF + ) else () if ("${testfilter}" STREQUAL "CHUNKED") set (nottestfilter "(CONTIGUOUS|COMPACT)") @@ -517,6 +510,7 @@ add_test ( NAME H5REPACK_VERIFY_LAYOUT-${testname}_DMP COMMAND "${CMAKE_COMMAND}" + -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>" -D "TEST_ARGS:STRING=-pH;out-${testname}.${testfile}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" @@ -526,7 +520,9 @@ -D "TEST_REFERENCE=${testfilter}" -P "${HDF_RESOURCES_EXT_DIR}/grepTest.cmake" ) - set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname}_DMP PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}_DFF) + set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname}_DMP PROPERTIES + DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}_DFF + ) endif () endif () endif () @@ -546,24 +542,23 @@ # Remove any output file left over from previous test run add_test ( NAME H5REPACK_VERIFY_LAYOUT_VDS-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - testfiles/out-${testname}.${testfile} - testfiles/${testfile}-${testname}-v.out - testfiles/${testfile}-${testname}-v.out.err + COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${testfile} + ) + set_tests_properties (H5REPACK_VERIFY_LAYOUT_VDS-${testname}-clear-objects PROPERTIES + FIXTURES_REQUIRED clear_h5repack ) - if (last_test) - set_tests_properties (H5REPACK_VERIFY_LAYOUT_VDS-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) - endif () add_test ( NAME H5REPACK_VERIFY_LAYOUT_VDS-${testname} - COMMAND $<TARGET_FILE:h5repack${tgt_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} + COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} + ) + set_tests_properties (H5REPACK_VERIFY_LAYOUT_VDS-${testname} PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" + DEPENDS H5REPACK_VERIFY_LAYOUT_VDS-${testname}-clear-objects ) - set_tests_properties (H5REPACK_VERIFY_LAYOUT_VDS-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") - set_tests_properties (H5REPACK_VERIFY_LAYOUT_VDS-${testname} PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT_VDS-${testname}-clear-objects) add_test ( NAME H5REPACK_VERIFY_LAYOUT_VDS-${testname}_DMP COMMAND "${CMAKE_COMMAND}" + -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>" -D "TEST_ARGS:STRING=-d;${testdset};-p;out-${testname}.${testfile}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" @@ -572,8 +567,10 @@ -D "TEST_REFERENCE=${testfile}-${testname}-v.ddl" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) - set_tests_properties (H5REPACK_VERIFY_LAYOUT_VDS-${testname}_DMP PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") - set_tests_properties (H5REPACK_VERIFY_LAYOUT_VDS-${testname}_DMP PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT_VDS-${testname}) + set_tests_properties (H5REPACK_VERIFY_LAYOUT_VDS-${testname}_DMP PROPERTIES + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles" + DEPENDS H5REPACK_VERIFY_LAYOUT_VDS-${testname} + ) endif () endif () endmacro () @@ -583,23 +580,22 @@ if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5REPACK_VERIFY_SUPERBLOCK-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - testfiles/out-${testname}.${testfile} - testfiles/${testfile}-${testname}-v.out - testfiles/${testfile}-${testname}-v.out.err + COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${testfile} + ) + set_tests_properties (H5REPACK_VERIFY_SUPERBLOCK-${testname}-clear-objects PROPERTIES + FIXTURES_REQUIRED clear_h5repack ) - if (last_test) - set_tests_properties (H5REPACK_VERIFY_SUPERBLOCK-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) - endif () add_test ( NAME H5REPACK_VERIFY_SUPERBLOCK-${testname} - COMMAND $<TARGET_FILE:h5repack${tgt_ext}> -j;${lowbound};-k;${highbound} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} + COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> -j;${lowbound};-k;${highbound} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} + ) + set_tests_properties (H5REPACK_VERIFY_SUPERBLOCK-${testname} PROPERTIES + DEPENDS H5REPACK_VERIFY_SUPERBLOCK-${testname}-clear-objects ) - set_tests_properties (H5REPACK_VERIFY_SUPERBLOCK-${testname} PROPERTIES DEPENDS H5REPACK_VERIFY_SUPERBLOCK-${testname}-clear-objects) add_test ( NAME H5REPACK_VERIFY_SUPERBLOCK-${testname}_DMP COMMAND "${CMAKE_COMMAND}" + -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" -D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>" -D "TEST_ARGS:STRING=-H;-B;out-${testname}.${testfile}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" @@ -609,28 +605,27 @@ -D "TEST_REFERENCE=SUPERBLOCK_VERSION ${superblock}" -P "${HDF_RESOURCES_EXT_DIR}/grepTest.cmake" ) - set_tests_properties (H5REPACK_VERIFY_SUPERBLOCK-${testname}_DMP PROPERTIES DEPENDS H5REPACK_VERIFY_SUPERBLOCK-${testname}) + set_tests_properties (H5REPACK_VERIFY_SUPERBLOCK-${testname}_DMP PROPERTIES + DEPENDS H5REPACK_VERIFY_SUPERBLOCK-${testname} + ) endif () endmacro () macro (ADD_H5_VERIFY_INVALIDBOUNDS testname resultcode lowbound highbound) add_test ( NAME ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - testfiles/out-${testname}.${testfile} + 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 ) - if (last_test) - set_tests_properties (ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) - endif () add_test ( NAME ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname} - COMMAND $<TARGET_FILE:h5repack${tgt_ext}> -j;${lowbound};-k;${highbound} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} + COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> -j;${lowbound};-k;${highbound} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} ) - set_tests_properties ( - ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname} PROPERTIES - DEPENDS ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname}-clear-objects - WILL_FAIL "true" + set_tests_properties (ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname} PROPERTIES + DEPENDS ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname}-clear-objects + WILL_FAIL "true" ) endmacro () @@ -638,28 +633,33 @@ # Remove any output file left over from previous test run add_test ( NAME H5REPACK_META-${testname}_N-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove + COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}_N.${testname}.h5 testfiles/out-${testname}_M.${testname}.h5 ) - if (last_test) - set_tests_properties (H5REPACK_META-${testname}_N-clear-objects PROPERTIES DEPENDS ${last_test}) - endif () + set_tests_properties (H5REPACK_META-${testname}_N-clear-objects PROPERTIES + FIXTURES_REQUIRED clear_h5repack + ) add_test ( NAME H5REPACK_META-${testname}_N - COMMAND $<TARGET_FILE:h5repack${tgt_ext}> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_N.${testname}.h5 + COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_N.${testname}.h5 + ) + set_tests_properties (H5REPACK_META-${testname}_N PROPERTIES + DEPENDS H5REPACK_META-${testname}_N-clear-objects ) - set_tests_properties (H5REPACK_META-${testname}_N PROPERTIES DEPENDS H5REPACK_META-${testname}_N-clear-objects) add_test ( NAME H5REPACK_META-${testname}_M - COMMAND $<TARGET_FILE:h5repack${tgt_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_M.${testname}.h5 + COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_M.${testname}.h5 + ) + set_tests_properties (H5REPACK_META-${testname}_M PROPERTIES + DEPENDS H5REPACK_META-${testname}_N ) - 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) + set_tests_properties (H5REPACK_META-${testname} PROPERTIES + WILL_FAIL "true" + DEPENDS H5REPACK_META-${testname}_M + ) endmacro () macro (ADD_H5_UD_TEST testname resultcode resultfile) @@ -667,20 +667,15 @@ # Remove any output file left over from previous test run add_test ( NAME H5REPACK_UD-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - testfiles/out-${testname}.${resultfile} - testfiles/${testname}.${resultfile}.out - testfiles/${testname}.${resultfile}.out.err - testfiles/${resultfile}-${testname}.out - testfiles/${resultfile}-${testname}.out.err + COMMAND ${CMAKE_COMMAND} -E remove testfiles/out-${testname}.${resultfile} + ) + set_tests_properties (H5REPACK_UD-${testname}-clear-objects PROPERTIES + FIXTURES_REQUIRED clear_h5repack ) - if (last_test) - set_tests_properties (H5REPACK_UD-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) - endif () add_test ( NAME H5REPACK_UD-${testname} COMMAND "${CMAKE_COMMAND}" + -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" -D "TEST_PROGRAM=$<TARGET_FILE:h5repack-shared>" -D "TEST_ARGS:STRING=${ARGN};${resultfile};out-${testname}.${resultfile}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" @@ -693,10 +688,13 @@ -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_OUTPUT_DIRECTORY}" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) - set_tests_properties (H5REPACK_UD-${testname} PROPERTIES DEPENDS H5REPACK_UD-${testname}-clear-objects) + set_tests_properties (H5REPACK_UD-${testname} PROPERTIES + DEPENDS H5REPACK_UD-${testname}-clear-objects + ) add_test ( NAME H5REPACK_UD-${testname}-h5dump COMMAND "${CMAKE_COMMAND}" + -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" -D "TEST_PROGRAM=$<TARGET_FILE:h5dump-shared>" -D "TEST_ARGS:STRING=-pH;out-${testname}.${resultfile}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" @@ -708,7 +706,9 @@ -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_OUTPUT_DIRECTORY}" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) - set_tests_properties (H5REPACK_UD-${testname}-h5dump PROPERTIES DEPENDS "H5REPACK_UD-${testname}") + set_tests_properties (H5REPACK_UD-${testname}-h5dump PROPERTIES + DEPENDS "H5REPACK_UD-${testname}" + ) endif () endmacro () @@ -740,6 +740,7 @@ set (FILE15 h5repack_named_dtypes.h5) set (FILE16 tfamily%05d.h5) # located in common testfiles folder set (FILE18 h5repack_layout2.h5) + set (FILE19 h5repack_layout3.h5) set (FILE_REF h5repack_refs.h5) set (FILE_ATTR_REF h5repack_attr_refs.h5) set (FILEV1 1_vds.h5) @@ -752,67 +753,6 @@ if (HDF5_ENABLE_USING_MEMCHECKER) # Remove any output file left over from previous test run set (LIST_TO_CLEAR - h5dump-help.out - h5repack_layout.h5-chunk_18x13-v.out - h5repack_layout.h5-chunk_18x13-v.out.err - h5repack_layout.h5-chunk_20x10-v.out - h5repack_layout.h5-chunk_20x10-v.out.err - h5repack_layout.h5-chunk_compa-v.out - h5repack_layout.h5-chunk_compa-v.out.err - h5repack_layout.h5-chunk_conti-v.out - h5repack_layout.h5-chunk_conti-v.out.err - h5repack_layout.h5-compa-v.out - h5repack_layout.h5-compa-v.out.err - h5repack_layout.h5-conti-v.out - h5repack_layout.h5-conti-v.out.err - h5repack_layout.h5-deflate_limit.out - h5repack_layout.h5-deflate_limit.out.err - h5repack_layout.h5-dset2_chunk_20x10-v.out - h5repack_layout.h5-dset2_chunk_20x10-v.out.err - h5repack_layout.h5-dset2_chunk_20x10-errstk.out - h5repack_layout.h5-dset2_chunk_20x10-errstk.out.err - h5repack_layout.h5-dset2_compa-v.out - h5repack_layout.h5-dset2_compa-v.out.err - h5repack_layout.h5-dset2_conti-v.out - h5repack_layout.h5-dset2_conti-v.out.err - h5repack_layout.h5-dset_compa_chunk-v.out - h5repack_layout.h5-dset_compa_chunk-v.out.err - h5repack_layout.h5-dset_compa_compa-v.out - h5repack_layout.h5-dset_compa_compa-v.out.err - h5repack_layout.h5-dset_compa_conti-v.out - h5repack_layout.h5-dset_compa_conti-v.out.err - h5repack_layout.h5-dset_conti_chunk-v.out - h5repack_layout.h5-dset_conti_chunk-v.out.err - h5repack_layout.h5-dset_conti_compa-v.out - h5repack_layout.h5-dset_conti_compa-v.out.err - h5repack_layout.h5-dset_conti_conti-v.out - h5repack_layout.h5-dset_conti_conti-v.out.err - h5repack_layout.h5-layout_long_switches-v.out - h5repack_layout.h5-layout_long_switches-v.out.err - h5repack_layout.h5-layout_short_switches-v.out - h5repack_layout.h5-layout_short_switches-v.out.err - h5repack_layout.h5-plugin_test.out - h5repack_layout.h5-plugin_test.out.err - h5repack_layout2.h5-contig_small_compa-v.out - h5repack_layout2.h5-contig_small_compa-v.out.err - h5repack_layout2.h5-contig_small_fixed_compa-v.out - h5repack_layout2.h5-contig_small_fixed_compa-v.out.err - h5repack_layout3.h5-ckdim_biger-v.out - h5repack_layout3.h5-ckdim_biger-v.out.err - h5repack_layout3.h5-ckdim_smaller-v.out - h5repack_layout3.h5-ckdim_smaller-v.out.err - h5repack_layout3.h5-chunk2chunk-v.out - h5repack_layout3.h5-chunk2chunk-v.out.err - h5repack_layout3.h5-chunk2compa-v.out - h5repack_layout3.h5-chunk2compa-v.out.err - h5repack_layout3.h5-chunk2conti-v.out - h5repack_layout3.h5-chunk2conti-v.out.err - h5repack_layout3.h5-error1-v.out - h5repack_layout3.h5-error1-v.out.err - h5repack_layout3.h5-error2-v.out - h5repack_layout3.h5-error2-v.out.err - h5repack_layout3.h5-error3-v.out - h5repack_layout3.h5-error3-v.out.err out-family.tfamily%05d.h5 out-HDFFV-7840.h5diff_attr1.h5 out-attr.h5repack_attr.h5 @@ -921,15 +861,15 @@ NAME H5REPACK-clearall-objects COMMAND ${CMAKE_COMMAND} -E remove ${LIST_TO_CLEAR} ) - set_tests_properties (H5REPACK-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") - if (last_test) - set_tests_properties (H5REPACK-clearall-objects PROPERTIES DEPENDS ${last_test}) - endif () + 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 $<TARGET_FILE:testh5repack_detect_szip>) + add_test (NAME H5REPACK-testh5repack_detect_szip COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:testh5repack_detect_szip>) if (HDF5_ENABLE_SZIP_SUPPORT) if (HDF5_ENABLE_SZIP_ENCODING) set (passRegex "yes") @@ -943,11 +883,11 @@ 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 (last_test "H5REPACK-testh5repack_detect_szip") - add_test (NAME H5REPACK-h5repacktest COMMAND $<TARGET_FILE:h5repacktest>) - set_tests_properties (H5REPACK-h5repacktest PROPERTIES DEPENDS H5REPACK-testh5repack_detect_szip) - set (last_test "H5REPACK-h5repacktest") - +# add_test (NAME H5REPACK-h5repacktest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repacktest>) +# set_tests_properties (H5REPACK-h5repacktest PROPERTIES DEPENDS H5REPACK-testh5repack_detect_szip) +# set (last_test "H5REPACK-h5repacktest") # # The tests # We use the files generated by h5repacktst @@ -1268,14 +1208,14 @@ # Use first dset to test. #--------------------------------------------------------------------------- # chunk to chunk - specify chunk dim bigger than any current dim - ADD_H5_VERIFY_TEST (chunk2chunk "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CHUNK -l chunk_unlimit1:CHUNK=100x300) + ADD_H5_VERIFY_TEST (chunk2chunk "TEST" 0 ${FILE19} chunk_unlimit1 CHUNK -l chunk_unlimit1:CHUNK=100x300) # chunk to contiguous - ADD_H5_VERIFY_TEST (chunk2conti "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CONTI -l chunk_unlimit1:CONTI) + ADD_H5_VERIFY_TEST (chunk2conti "TEST" 0 ${FILE19} 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_VERIFY_TEST (chunk2compa "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CHUNK -l chunk_unlimit1:COMPA) + ADD_H5_VERIFY_TEST (chunk2compa "TEST" 0 ${FILE19} chunk_unlimit1 CHUNK -l chunk_unlimit1:COMPA) #-------------------------------------------------------------------------- # Test -f for some specific cases. Chunked dataset with unlimited max dims. @@ -1285,16 +1225,16 @@ # - should not change max dims from unlimit # chunk dim is bigger than dataset dim. ( dset size < 64k ) - ADD_H5_VERIFY_TEST (error1 "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 H5S_UNLIMITED -f chunk_unlimit1:NONE) + ADD_H5_VERIFY_TEST (error1 "TEST" 0 ${FILE19} chunk_unlimit1 H5S_UNLIMITED -f chunk_unlimit1:NONE) # chunk dim is bigger than dataset dim. ( dset size > 64k ) - ADD_H5_VERIFY_TEST (error2 "TEST" 0 h5repack_layout3.h5 chunk_unlimit2 H5S_UNLIMITED -f chunk_unlimit2:NONE) + ADD_H5_VERIFY_TEST (error2 "TEST" 0 ${FILE19} chunk_unlimit2 H5S_UNLIMITED -f chunk_unlimit2:NONE) # chunk dims are smaller than dataset dims. ( dset size < 64k ) - ADD_H5_VERIFY_TEST (error3 "TEST" 0 h5repack_layout3.h5 chunk_unlimit3 H5S_UNLIMITED -f chunk_unlimit3:NONE) + ADD_H5_VERIFY_TEST (error3 "TEST" 0 ${FILE19} chunk_unlimit3 H5S_UNLIMITED -f chunk_unlimit3:NONE) # file input - should not fail - ADD_H5_TEST (error4 "TEST" h5repack_layout3.h5 -f NONE) + ADD_H5_TEST (error4 "TEST" ${FILE19} -f NONE) #-------------------------------------------------------------------------- # Test base: Convert CHUNK to CONTI for a chunked dataset with small dataset @@ -1302,9 +1242,9 @@ # (HDFFV-8214) #-------------------------------------------------------------------------- # chunk dim is bigger than dataset dim. should succeed. - ADD_H5_VERIFY_TEST (ckdim_biger "TEST" 0 h5repack_layout3.h5 chunk_unlimit2 CONTI -l chunk_unlimit2:CONTI) + ADD_H5_VERIFY_TEST (ckdim_biger "TEST" 0 ${FILE19} chunk_unlimit2 CONTI -l chunk_unlimit2:CONTI) # chunk dim is smaller than dataset dim. should succeed. - ADD_H5_VERIFY_TEST (ckdim_smaller "TEST" 0 h5repack_layout3.h5 chunk_unlimit3 CONTI -l chunk_unlimit3:CONTI) + ADD_H5_VERIFY_TEST (ckdim_smaller "TEST" 0 ${FILE19} chunk_unlimit3 CONTI -l chunk_unlimit3:CONTI) diff --git a/tools/test/h5repack/CMakeVFDTests.cmake b/tools/test/h5repack/CMakeVFDTests.cmake index e100e3c..c1a280b 100644 --- a/tools/test/h5repack/CMakeVFDTests.cmake +++ b/tools/test/h5repack/CMakeVFDTests.cmake @@ -16,18 +16,19 @@ ############################################################################## ############################################################################## - set (VFD_LIST - sec2 - stdio - core - split - multi - family - ) +set (VFD_LIST + sec2 + stdio + core + core_paged + split + multi + family +) - if (DIRECT_VFD) - set (VFD_LIST ${VFD_LIST} direct) - endif () +if (DIRECT_VFD) + set (VFD_LIST ${VFD_LIST} direct) +endif () ############################################################################## ############################################################################## @@ -35,23 +36,61 @@ ############################################################################## ############################################################################## - macro (ADD_VFD_TEST vfdname resultcode) +macro (ADD_VFD_TEST vfdname resultcode) + if (NOT HDF5_ENABLE_USING_MEMCHECKER) + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdname}") + 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 + WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/${vfdname} + ) add_test ( - NAME H5REPACK-VFD-${vfdname}-h5repacktest - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$<TARGET_FILE:h5repacktest>" - -D "TEST_ARGS:STRING=" - -D "TEST_VFD:STRING=${vfdname}" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=h5repacktest" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}" - -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + NAME H5REPACK_VFD-${vfdname}-h5repacktest + COMMAND "${CMAKE_COMMAND}" + -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}" + -D "TEST_PROGRAM=$<TARGET_FILE:h5repacktest>" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-h5repacktest.out" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" ) - if (last_test) - set_tests_properties (H5REPACK-VFD-${vfdname}-h5repacktest PROPERTIES DEPENDS ${last_test}) - endif () - set (last_test "H5REPACK-VFD-${vfdname}-h5repacktest") - endmacro () + 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}) + endif () +endmacro () ############################################################################## ############################################################################## @@ -59,7 +98,7 @@ ############################################################################## ############################################################################## - # Run test with different Virtual File Driver - foreach (vfd ${VFD_LIST}) - ADD_VFD_TEST (${vfd} 0) - endforeach () +# Run test with different Virtual File Driver +foreach (vfd ${VFD_LIST}) + ADD_VFD_TEST (${vfd} 0) +endforeach () diff --git a/tools/test/h5repack/h5repack.sh.in b/tools/test/h5repack/h5repack.sh.in index 1232b33..6e63136 100644 --- a/tools/test/h5repack/h5repack.sh.in +++ b/tools/test/h5repack/h5repack.sh.in @@ -1496,7 +1496,12 @@ TOOLTEST add_alignment $arg TOOLTEST upgrade_layout h5repack_layouto.h5 # test for datum size > H5TOOLS_MALLOCSIZE -TOOLTEST gt_mallocsize h5repack_objs.h5 -f GZIP=1 +arg="h5repack_objs.h5 -f GZIP=1" +if test $USE_FILTER_DEFLATE != "yes" ; then + SKIP $arg +else + TOOLTEST gt_mallocsize $arg +fi # Check repacking file with committed datatypes in odd configurations TOOLTEST committed_dt h5repack_named_dtypes.h5 @@ -1567,7 +1572,7 @@ VERIFY_SUPERBLOCK 1 2 2 h5repack_layout.h5 -j 1 -k 2 h5repack_layout.h5 # -j 2 -k 2, superblock will be 3 VERIFY_SUPERBLOCK 2 2 3 h5repack_layout.h5 -j 2 -k 2 h5repack_layout.h5 # -j 0 -k 1, file cannot be opened -VERIFY_INVALIDBOUNDS 0 1 bounds_latest_latest.h5 +VERIFY_INVALIDBOUNDS 0 1 bounds_latest_latest.h5 ######################################## # Testing external storage diff --git a/tools/test/h5repack/h5repacktst.c b/tools/test/h5repack/h5repacktst.c index a89bf10..ec8df3c 100644 --- a/tools/test/h5repack/h5repacktst.c +++ b/tools/test/h5repack/h5repacktst.c @@ -3108,7 +3108,7 @@ int make_early(void) goto out; if ((tid = H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) goto out; - sprintf(name, "%d", i); + HDsprintf(name, "%d", i); if ((H5Tcommit2(fid, name, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto out; if (H5Tclose(tid) < 0) @@ -3133,7 +3133,7 @@ int make_early(void) { if ((tid = H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) goto out; - sprintf(name, "%d", i); + HDsprintf(name, "%d", i); if ((H5Tcommit2(fid, name, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) goto out; if (H5Tclose(tid) < 0) @@ -3195,7 +3195,7 @@ int make_layout(hid_t loc_id) */ for (i=0; i<4; i++) { - sprintf(name,"dset%d",i+1); + HDsprintf(name,"dset%d",i+1); if (write_dset(loc_id,RANK,dims,name,H5T_NATIVE_INT,buf) < 0) return -1; } @@ -4120,7 +4120,7 @@ int write_dset_in(hid_t loc_id, dbuf = (double*)HDmalloc( size ); if (NULL == dbuf) { - printf ("\nError: Cannot allocate memory for \"arrayd\" data buffer size %dMB.\n", (int) size / 1000000 ); + HDprintf ("\nError: Cannot allocate memory for \"arrayd\" data buffer size %dMB.\n", (int) size / 1000000 ); goto out; } @@ -6182,7 +6182,7 @@ static herr_t add_attr_with_objref(hid_t file_id, hid_t obj_id) status = H5Rcreate(&data_attr_objref[0],file_id,NAME_OBJ_DS1,H5R_OBJECT,(hid_t)-1); if (status < 0) { - fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6191,7 +6191,7 @@ static herr_t add_attr_with_objref(hid_t file_id, hid_t obj_id) status = H5Rcreate(&data_attr_objref[1],file_id,NAME_OBJ_GRP,H5R_OBJECT,(hid_t)-1); if (status < 0) { - fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6200,7 +6200,7 @@ static herr_t add_attr_with_objref(hid_t file_id, hid_t obj_id) status = H5Rcreate(&data_attr_objref[2],file_id,NAME_OBJ_NDTYPE,H5R_OBJECT,(hid_t)-1); if (status < 0) { - fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6209,7 +6209,7 @@ static herr_t add_attr_with_objref(hid_t file_id, hid_t obj_id) status = make_attr(obj_id,1,dim_attr_objref,"Attr_OBJREF",H5T_STD_REF_OBJ,data_attr_objref); if (status < 0) { - fprintf(stderr, "Error: %s %d> make_attr failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> make_attr failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6251,7 +6251,7 @@ static herr_t add_attr_with_regref(hid_t file_id, hid_t obj_id) sid_regrefed_dset = H5Screate_simple (2, dim_regrefed_dset, NULL); if (sid_regrefed_dset < 0) { - fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6260,7 +6260,7 @@ static herr_t add_attr_with_regref(hid_t file_id, hid_t obj_id) status = H5Sselect_elements (sid_regrefed_dset, H5S_SELECT_SET, (size_t)3, coords_regrefed_dset[0]); if (status < 0) { - fprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6269,7 +6269,7 @@ static herr_t add_attr_with_regref(hid_t file_id, hid_t obj_id) status = H5Rcreate (&data_attr_regref[0], file_id, NAME_OBJ_DS2, H5R_DATASET_REGION, sid_regrefed_dset); if (status < 0) { - fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6278,7 +6278,7 @@ static herr_t add_attr_with_regref(hid_t file_id, hid_t obj_id) status = make_attr(obj_id,1,dim_attr_regref,"Attr_REGREF",H5T_STD_REF_DSETREG,data_attr_regref); if (status < 0) { - fprintf(stderr, "Error: %s %d> make_attr failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> make_attr failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6324,7 +6324,7 @@ static herr_t gen_refered_objs(hid_t loc_id) sid = H5Screate_simple(1, dims1, NULL); if (sid < 0) { - fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6332,7 +6332,7 @@ static herr_t gen_refered_objs(hid_t loc_id) did1 = H5Dcreate2 (loc_id, NAME_OBJ_DS1, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (did1 < 0) { - fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6340,7 +6340,7 @@ static herr_t gen_refered_objs(hid_t loc_id) status = H5Dwrite(did1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data); if (status < 0) { - fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6352,7 +6352,7 @@ static herr_t gen_refered_objs(hid_t loc_id) gid = H5Gcreate2 (loc_id, NAME_OBJ_GRP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (gid < 0) { - fprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6365,7 +6365,7 @@ static herr_t gen_refered_objs(hid_t loc_id) status = H5Tcommit2(loc_id, NAME_OBJ_NDTYPE, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - fprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6378,7 +6378,7 @@ static herr_t gen_refered_objs(hid_t loc_id) sid2 = H5Screate_simple (2, dims2, NULL); if (sid2 < 0) { - fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6387,7 +6387,7 @@ static herr_t gen_refered_objs(hid_t loc_id) did2 = H5Dcreate2 (loc_id, NAME_OBJ_DS2, H5T_STD_I8LE, sid2, H5P_DEFAULT,H5P_DEFAULT,H5P_DEFAULT); if (did2 < 0) { - fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6396,7 +6396,7 @@ static herr_t gen_refered_objs(hid_t loc_id) status = H5Dwrite (did2, H5T_NATIVE_CHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, data2); if (status < 0) { - fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6453,7 +6453,7 @@ static herr_t gen_obj_ref(hid_t loc_id) status = H5Rcreate (&objref_buf[0], loc_id, NAME_OBJ_DS1, H5R_OBJECT, (hid_t)-1); if (status < 0) { - fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6462,7 +6462,7 @@ static herr_t gen_obj_ref(hid_t loc_id) status = H5Rcreate (&objref_buf[1], loc_id, NAME_OBJ_GRP, H5R_OBJECT, (hid_t)-1); if (status < 0) { - fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6471,7 +6471,7 @@ static herr_t gen_obj_ref(hid_t loc_id) status = H5Rcreate (&objref_buf[2], loc_id, NAME_OBJ_NDTYPE, H5R_OBJECT, (hid_t)-1); if (status < 0) { - fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6482,7 +6482,7 @@ static herr_t gen_obj_ref(hid_t loc_id) sid = H5Screate_simple (1, dims_dset_objref, NULL); if (sid < 0) { - fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6490,7 +6490,7 @@ static herr_t gen_obj_ref(hid_t loc_id) oid = H5Dcreate2 (loc_id, "Dset_OBJREF", H5T_STD_REF_OBJ, sid, H5P_DEFAULT,H5P_DEFAULT,H5P_DEFAULT); if (oid < 0) { - fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6498,7 +6498,7 @@ static herr_t gen_obj_ref(hid_t loc_id) status = H5Dwrite(oid, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, objref_buf); if (status < 0) { - fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6511,7 +6511,7 @@ static herr_t gen_obj_ref(hid_t loc_id) status = add_attr_with_objref(loc_id, oid); if (status < 0) { - fprintf(stderr, "Error: %s %d> add_attr_with_objref failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> add_attr_with_objref failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6520,7 +6520,7 @@ static herr_t gen_obj_ref(hid_t loc_id) status = add_attr_with_regref(loc_id, oid); if (status < 0) { - fprintf(stderr, "Error: %s %d> add_attr_with_regref failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> add_attr_with_regref failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6573,7 +6573,7 @@ static herr_t gen_region_ref(hid_t loc_id) sid_trg = H5Screate_simple (2, dims_trg, NULL); if (sid_trg < 0) { - fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6582,7 +6582,7 @@ static herr_t gen_region_ref(hid_t loc_id) status = H5Sselect_elements (sid_trg, H5S_SELECT_SET, (size_t)4, coords[0]); if (status < 0) { - fprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6591,7 +6591,7 @@ static herr_t gen_region_ref(hid_t loc_id) status = H5Rcreate (&rr_data[0], loc_id, NAME_OBJ_DS2, H5R_DATASET_REGION, sid_trg); if (status < 0) { - fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6600,7 +6600,7 @@ static herr_t gen_region_ref(hid_t loc_id) status = H5Sselect_hyperslab (sid_trg, H5S_SELECT_SET, start, stride, count, block); if (status < 0) { - fprintf(stderr, "Error: %s %d> H5Sselect_hyperslab failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Sselect_hyperslab failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6609,7 +6609,7 @@ static herr_t gen_region_ref(hid_t loc_id) status = H5Rcreate (&rr_data[1], loc_id, NAME_OBJ_DS2, H5R_DATASET_REGION, sid_trg); if (status < 0) { - fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6618,7 +6618,7 @@ static herr_t gen_region_ref(hid_t loc_id) sid_ref = H5Screate_simple (1, dims1, NULL); if (sid_ref < 0) { - fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6627,7 +6627,7 @@ static herr_t gen_region_ref(hid_t loc_id) oid_ref = H5Dcreate2 (loc_id, REG_REF_DS1, H5T_STD_REF_DSETREG, sid_ref, H5P_DEFAULT,H5P_DEFAULT,H5P_DEFAULT); if (oid_ref < 0) { - fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6636,7 +6636,7 @@ static herr_t gen_region_ref(hid_t loc_id) status = H5Dwrite (oid_ref, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, rr_data); if (status < 0) { - fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6649,7 +6649,7 @@ static herr_t gen_region_ref(hid_t loc_id) status = add_attr_with_objref(loc_id, oid_ref); if (status < 0) { - fprintf(stderr, "Error: %s %d> add_attr_with_objref failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> add_attr_with_objref failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6658,7 +6658,7 @@ static herr_t gen_region_ref(hid_t loc_id) status = add_attr_with_regref(loc_id, oid_ref); if (status < 0) { - fprintf(stderr, "Error: %s %d> add_attr_with_regref failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> add_attr_with_regref failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6691,7 +6691,7 @@ static herr_t make_references(hid_t loc_id) status = gen_refered_objs(loc_id); if (status == FAIL) { - fprintf(stderr, "Failed to generate referenced object.\n"); + HDfprintf(stderr, "Failed to generate referenced object.\n"); ret = FAIL; } @@ -6699,7 +6699,7 @@ static herr_t make_references(hid_t loc_id) status = gen_obj_ref(loc_id); if (status == FAIL) { - fprintf(stderr, "Failed to generate object reference.\n"); + HDfprintf(stderr, "Failed to generate object reference.\n"); ret = FAIL; } @@ -6707,7 +6707,7 @@ static herr_t make_references(hid_t loc_id) status = gen_region_ref(loc_id); if (status == FAIL) { - fprintf(stderr, "Failed to generate region reference.\n"); + HDfprintf(stderr, "Failed to generate region reference.\n"); ret = FAIL; } @@ -6831,7 +6831,7 @@ static herr_t make_complex_attr_references(hid_t loc_id) status = H5Dwrite(objdid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, obj_data[0]); if (status < 0) { - fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6841,7 +6841,7 @@ static herr_t make_complex_attr_references(hid_t loc_id) status = H5Tcommit2(loc_id, NAME_OBJ_NDTYPE, objtid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (status < 0) { - fprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6854,7 +6854,7 @@ static herr_t make_complex_attr_references(hid_t loc_id) main_gid = H5Gcreate2(loc_id, "group_main", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if (main_gid < 0) { - fprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6869,7 +6869,7 @@ static herr_t make_complex_attr_references(hid_t loc_id) status = H5Dwrite(main_did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, obj_data[0]); if (status < 0) { - fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6893,7 +6893,7 @@ static herr_t make_complex_attr_references(hid_t loc_id) status = H5Rcreate (&(comp_objref_data[0].val_objref), loc_id, NAME_OBJ_DS1, H5R_OBJECT,(hid_t)-1); if (status < 0) { - fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6903,7 +6903,7 @@ static herr_t make_complex_attr_references(hid_t loc_id) status = H5Rcreate (&(comp_objref_data[1].val_objref), loc_id, NAME_OBJ_GRP, H5R_OBJECT,(hid_t)-1); if (status < 0) { - fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6913,7 +6913,7 @@ static herr_t make_complex_attr_references(hid_t loc_id) status = H5Rcreate (&(comp_objref_data[2].val_objref), loc_id, NAME_OBJ_NDTYPE, H5R_OBJECT,(hid_t)-1); if (status < 0) { - fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6927,7 +6927,7 @@ static herr_t make_complex_attr_references(hid_t loc_id) status = H5Awrite (comp_objref_aid, comp_objref_tid, comp_objref_data); if (status < 0) { - fprintf(stderr, "Error: %s %d> H5Awrite failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Awrite failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6949,14 +6949,14 @@ static herr_t make_complex_attr_references(hid_t loc_id) status = H5Sselect_elements (objsid, H5S_SELECT_SET, (size_t)4, coords[0]); if (status < 0) { - fprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } status = H5Rcreate (&(comp_regref_data[0].val_regref), loc_id, NAME_OBJ_DS1, H5R_DATASET_REGION, objsid); if (status < 0) { - fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6970,7 +6970,7 @@ static herr_t make_complex_attr_references(hid_t loc_id) status = H5Awrite (comp_regref_aid, comp_regref_tid, comp_regref_data); if (status < 0) { - fprintf(stderr, "Error: %s %d> H5Awrite failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Awrite failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -6996,7 +6996,7 @@ static herr_t make_complex_attr_references(hid_t loc_id) status = H5Rcreate (&((hobj_ref_t*)vlen_objref_data[0].p)[0], loc_id, NAME_OBJ_DS1, H5R_OBJECT, (hid_t)-1); if (status < 0) { - fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -7004,7 +7004,7 @@ static herr_t make_complex_attr_references(hid_t loc_id) status = H5Rcreate (&((hobj_ref_t*)vlen_objref_data[1].p)[0], loc_id, NAME_OBJ_GRP, H5R_OBJECT, (hid_t)-1); if (status < 0) { - fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -7012,7 +7012,7 @@ static herr_t make_complex_attr_references(hid_t loc_id) status = H5Rcreate (&((hobj_ref_t*)vlen_objref_data[2].p)[0], loc_id, NAME_OBJ_NDTYPE, H5R_OBJECT, (hid_t)-1); if (status < 0) { - fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -7030,7 +7030,7 @@ static herr_t make_complex_attr_references(hid_t loc_id) status = H5Awrite (vlen_objref_attr_id, vlen_objref_attr_tid, vlen_objref_data); if (status < 0) { - fprintf(stderr, "Error: %s %d> H5Awrite failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Awrite failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -7039,7 +7039,7 @@ static herr_t make_complex_attr_references(hid_t loc_id) status = H5Dvlen_reclaim (vlen_objref_attr_tid, vlen_objref_attr_sid, H5P_DEFAULT, vlen_objref_data); if (status < 0) { - fprintf(stderr, "Error: %s %d> H5Dvlen_reclaim failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Dvlen_reclaim failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -7060,14 +7060,14 @@ static herr_t make_complex_attr_references(hid_t loc_id) status = H5Sselect_elements(objsid, H5S_SELECT_SET, (size_t)4, coords[0]); if (status < 0) { - fprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } status = H5Rcreate (&((hdset_reg_ref_t*)vlen_regref_data[0].p)[0], loc_id, NAME_OBJ_DS1, H5R_DATASET_REGION, objsid); if (status < 0) { - fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -7085,7 +7085,7 @@ static herr_t make_complex_attr_references(hid_t loc_id) status = H5Awrite(vlen_regref_attr_id, vlen_regref_attr_tid, vlen_regref_data); if (status < 0) { - fprintf(stderr, "Error: %s %d> H5Awrite failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Awrite failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } @@ -7094,7 +7094,7 @@ static herr_t make_complex_attr_references(hid_t loc_id) status = H5Dvlen_reclaim (vlen_regref_attr_tid, vlen_regref_attr_sid, H5P_DEFAULT, vlen_regref_data); if (status < 0) { - fprintf(stderr, "Error: %s %d> H5Dvlen_reclaim failed.\n", FUNC, __LINE__); + HDfprintf(stderr, "Error: %s %d> H5Dvlen_reclaim failed.\n", FUNC, __LINE__); ret = FAIL; goto out; } diff --git a/tools/test/h5repack/testfiles/h5repack-help.txt b/tools/test/h5repack/testfiles/h5repack-help.txt index 03553dd..e55eed9 100644 --- a/tools/test/h5repack/testfiles/h5repack-help.txt +++ b/tools/test/h5repack/testfiles/h5repack-help.txt @@ -60,7 +60,8 @@ usage: h5repack [OPTIONS] file1 file2 0: This is H5F_LIBVER_EARLIEST in H5F_libver_t struct 1: This is H5F_LIBVER_V18 in H5F_libver_t struct 2: This is H5F_LIBVER_V110 in H5F_libver_t struct - (H5F_LIBVER_LATEST is aliased to H5F_LIBVER_V110 for this release + 3: This is H5F_LIBVER_V112 in H5F_libver_t struct + (H5F_LIBVER_LATEST is aliased to H5F_LIBVER_V112 for this release FS_STRATEGY is a string indicating the file space strategy used: FSM_AGGR: diff --git a/tools/test/h5repack/testh5repack_detect_szip.c b/tools/test/h5repack/testh5repack_detect_szip.c index 6e7a24e..6b86dd5 100644 --- a/tools/test/h5repack/testh5repack_detect_szip.c +++ b/tools/test/h5repack/testh5repack_detect_szip.c @@ -50,10 +50,10 @@ int main(void) #ifdef H5_HAVE_FILTER_SZIP if (h5tools_can_encode(H5Z_FILTER_SZIP) == 1) { - printf("yes\n"); + HDprintf("yes\n"); return(1); } #endif /* H5_HAVE_FILTER_SZIP */ - printf("no\n"); + HDprintf("no\n"); return(0); } |