summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MANIFEST134
-rw-r--r--src/CMakeLists.txt7
-rw-r--r--test/CMakeLists.txt190
-rw-r--r--test/CMakeTests.cmake168
-rw-r--r--tools/h5dump/CMakeTests.cmake8
-rw-r--r--tools/h5dump/h5dump.c3
-rw-r--r--tools/h5dump/testh5dump.sh.in4
-rw-r--r--tools/h5repack/CMakeTests.cmake40
-rw-r--r--tools/h5repack/h5repack.c2
-rw-r--r--tools/h5repack/h5repack.sh.in53
-rw-r--r--tools/h5repack/h5repack_copy.c10
-rw-r--r--tools/h5repack/h5repack_main.c2
-rw-r--r--tools/h5repack/testfiles/h5repack_layout.h5.ddl130
-rw-r--r--tools/testfiles/h5dump-help.txt2
-rw-r--r--tools/testfiles/tboot2A.ddl20
-rw-r--r--tools/testfiles/tboot2B.ddl20
-rw-r--r--tools/testfiles/tnofilename-with-packed-bits.ddl2
-rw-r--r--tools/testfiles/tpbitsIncomplete.ddl2
-rw-r--r--tools/testfiles/tpbitsLengthExceeded.ddl2
-rw-r--r--tools/testfiles/tpbitsLengthPositive.ddl2
-rw-r--r--tools/testfiles/tpbitsMaxExceeded.ddl2
-rw-r--r--tools/testfiles/tpbitsOffsetExceeded.ddl2
-rw-r--r--tools/testfiles/tpbitsOffsetNegative.ddl2
23 files changed, 559 insertions, 248 deletions
diff --git a/MANIFEST b/MANIFEST
index d93e310..cd92fa7 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1357,7 +1357,6 @@
./tools/misc/testfiles/h5mkgrp_version.txt.in
./tools/misc/h5perf_gentest.c
-
# h5stat sources
./tools/h5stat/Makefile.am
./tools/h5stat/Makefile.in
@@ -1425,14 +1424,18 @@
./tools/testfiles/family_file00015.h5
./tools/testfiles/family_file00016.h5
./tools/testfiles/family_file00017.h5
-./tools/testfiles/filter_fail.h5
-./tools/testfiles/filter_fail.ddl
-./tools/testfiles/packedbits.ddl
./tools/testfiles/file_space.h5
./tools/testfiles/file_space.ddl
+./tools/testfiles/filter_fail.h5
+./tools/testfiles/filter_fail.ddl
./tools/testfiles/h5dump-help.txt
+./tools/testfiles/packedbits.ddl
+./tools/testfiles/taindices.h5
./tools/testfiles/tall-1.ddl
./tools/testfiles/tall-2.ddl
+./tools/testfiles/tall-2A.ddl
+./tools/testfiles/tall-2A0.ddl
+./tools/testfiles/tall-2B.ddl
./tools/testfiles/tall-3.ddl
./tools/testfiles/tall-4s.ddl
./tools/testfiles/tall-5s.ddl
@@ -1441,6 +1444,7 @@
./tools/testfiles/tall-7.ddl
./tools/testfiles/tall-7N.ddl
./tools/testfiles/tall.h5
+./tools/testfiles/tallfilters.ddl
./tools/testfiles/tarray1.ddl
./tools/testfiles/tarray1.h5
./tools/testfiles/tarray1_big.ddl
@@ -1459,22 +1463,40 @@
./tools/testfiles/tarray7.h5
./tools/testfiles/tarray8.ddl
./tools/testfiles/tarray8.h5
+./tools/testfiles/tattr.h5
./tools/testfiles/tattr-1.ddl
./tools/testfiles/tattr-2.ddl
./tools/testfiles/tattr-3.ddl
./tools/testfiles/tattr-4_be.ddl
-./tools/testfiles/tattr.h5
+./tools/testfiles/tattr2.h5
+./tools/testfiles/tattr4_be.h5
+./tools/testfiles/tattrcontents1.ddl
+./tools/testfiles/tattrcontents2.ddl
./tools/testfiles/tattrintsize.ddl
./tools/testfiles/tattrintsize.h5
-./tools/testfiles/tattr4_be.h5
./tools/testfiles/tattrreg.h5
./tools/testfiles/tattrreg.ddl
./tools/testfiles/tattrregR.ddl
+./tools/testfiles/tbigdims.ddl
+./tools/testfiles/tbigdims.h5
+./tools/testfiles/tbinary.h5
+./tools/testfiles/tbin1.ddl
+./tools/testfiles/tbin2.ddl
+./tools/testfiles/tbin3.ddl
+./tools/testfiles/tbin4.ddl
./tools/testfiles/tbinregR.exp
./tools/testfiles/tbinregR.ddl
./tools/testfiles/tbitfields.h5
+./tools/testfiles/tboot1.ddl
+./tools/testfiles/tboot2.ddl
+./tools/testfiles/tboot2A.ddl
+./tools/testfiles/tboot2B.ddl
./tools/testfiles/tchar.h5
./tools/testfiles/tchar1.ddl
+./tools/testfiles/tchunked.ddl
+./tools/testfiles/tcompact.ddl
+./tools/testfiles/tcontents.ddl
+./tools/testfiles/tcontiguos.ddl
./tools/testfiles/tcmpdattrintsize.ddl
./tools/testfiles/tcmpdintsize.ddl
./tools/testfiles/tcmpdattrintsize.h5
@@ -1489,6 +1511,7 @@
./tools/testfiles/tdatareg.h5
./tools/testfiles/tdatareg.ddl
./tools/testfiles/tdataregR.ddl
+./tools/testfiles/tdeflate.ddl
./tools/testfiles/tdset-1.ddl
./tools/testfiles/tdset-2.ddl
./tools/testfiles/tdset-3s.ddl
@@ -1504,6 +1527,7 @@
./tools/testfiles/texceedsubcount.ddl
./tools/testfiles/texceedsubstart.ddl
./tools/testfiles/texceedsubstride.ddl
+./tools/testfiles/texternal.ddl
./tools/testfiles/textlink.h5
./tools/testfiles/textlink.h5.xml
./tools/testfiles/textlink.ddl
@@ -1512,7 +1536,6 @@
./tools/testfiles/textlinksrc.ddl
./tools/testfiles/textlinksrc.h5
./tools/testfiles/textlinktar.h5
-./tools/testfiles/tsoftlinks.h5
./tools/testfiles/tfamily.ddl
./tools/testfiles/tfamily00000.h5
./tools/testfiles/tfamily00001.h5
@@ -1525,6 +1548,12 @@
./tools/testfiles/tfamily00008.h5
./tools/testfiles/tfamily00009.h5
./tools/testfiles/tfamily00010.h5
+./tools/testfiles/tfcontents1.h5
+./tools/testfiles/tfcontents2.h5
+./tools/testfiles/tfill.ddl
+./tools/testfiles/tfilters.h5
+./tools/testfiles/tfletcher32.ddl
+./tools/testfiles/tfvalues.h5
./tools/testfiles/tgroup-1.ddl
./tools/testfiles/tgroup-2.ddl
./tools/testfiles/tgroup.h5
@@ -1537,8 +1566,17 @@
./tools/testfiles/thlink-4.ddl
./tools/testfiles/thlink-5.ddl
./tools/testfiles/thlink.h5
+./tools/testfiles/thyperslab.ddl
+./tools/testfiles/thyperslab.h5
+./tools/testfiles/tindicesyes.ddl
+./tools/testfiles/tindicesno.ddl
+./tools/testfiles/tindicessub2.ddl
+./tools/testfiles/tindicessub3.ddl
+./tools/testfiles/tindicessub4.ddl
+./tools/testfiles/tindicessub1.ddl
./tools/testfiles/tlarge_objname.ddl
./tools/testfiles/tlarge_objname.h5
+./tools/testfiles/tldouble.h5
./tools/testfiles/tlonglinks.ddl
./tools/testfiles/tlonglinks.h5
./tools/testfiles/tloop-1.ddl
@@ -1554,8 +1592,6 @@
./tools/testfiles/tmulti-s.h5
./tools/testfiles/tmultifile.ls
./tools/testfiles/tmultifile.ddl
-./tools/testfiles/tqmarkfile.ddl
-./tools/testfiles/tstarfile.ddl
./tools/testfiles/tnbit.ddl
./tools/testfiles/tnestcomp-1.ddl
./tools/testfiles/tnestedcomp.h5
@@ -1573,10 +1609,17 @@
./tools/testfiles/tnullspace.ddl
./tools/testfiles/tobjref.h5
./tools/testfiles/topaque.h5
+./tools/testfiles/tordercontents1.ddl
+./tools/testfiles/tordercontents2.ddl
+./tools/testfiles/torderlinks1.ddl
+./tools/testfiles/torderlinks2.ddl
+./tools/testfiles/tperror.ddl
+./tools/testfiles/tqmarkfile.ddl
./tools/testfiles/trawdatafile.ddl
./tools/testfiles/trawdatafile.exp
./tools/testfiles/trawssetfile.ddl
./tools/testfiles/trawssetfile.exp
+./tools/testfiles/treference.ddl
./tools/testfiles/tsaf.ddl
./tools/testfiles/tsaf.h5
./tools/testfiles/tscalarattrintsize.ddl
@@ -1586,19 +1629,32 @@
./tools/testfiles/tscalarstring.ddl
./tools/testfiles/tscalarstring.h5
./tools/testfiles/tscaleoffset.ddl
+./tools/testfiles/tshuffle.ddl
./tools/testfiles/tslink-1.ddl
./tools/testfiles/tslink-2.ddl
./tools/testfiles/tslink-D.ddl
./tools/testfiles/tslink.h5
+./tools/testfiles/tsoftlinks.h5
./tools/testfiles/tsplit_file-m.h5
./tools/testfiles/tsplit_file-r.h5
./tools/testfiles/tsplit_file.ddl
-./tools/testfiles/tstr-1.ddl
+./tools/testfiles/tstarfile.ddl
./tools/testfiles/tstr.h5
./tools/testfiles/tstr2.h5
+./tools/testfiles/tstr3.h5
+./tools/testfiles/tstr-1.ddl
./tools/testfiles/tstr-2.ddl
./tools/testfiles/tstr2bin2.exp
./tools/testfiles/tstr2bin6.exp
+./tools/testfiles/tstring.ddl
+./tools/testfiles/tstring2.ddl
+./tools/testfiles/tstringe.ddl
+./tools/testfiles/tszip.ddl
+./tools/testfiles/tudlink.h5
+./tools/testfiles/tudlink.h5.xml
+./tools/testfiles/tudlink-1.ddl
+./tools/testfiles/tudlink-2.ddl
+./tools/testfiles/tuserfilter.ddl
./tools/testfiles/tvldtypes1.ddl
./tools/testfiles/tvldtypes1.h5
./tools/testfiles/tvldtypes2.ddl
@@ -1611,63 +1667,8 @@
./tools/testfiles/tvldtypes5.h5
./tools/testfiles/tvlstr.h5
./tools/testfiles/tvlstr.ddl
-./tools/testfiles/tudlink.h5
-./tools/testfiles/tudlink.h5.xml
-./tools/testfiles/tudlink-1.ddl
-./tools/testfiles/tudlink-2.ddl
-./tools/testfiles/tattr2.h5
-./tools/testfiles/tall-2A.ddl
-./tools/testfiles/tall-2A0.ddl
-./tools/testfiles/tall-2B.ddl
-./tools/testfiles/tattrcontents1.ddl
-./tools/testfiles/tattrcontents2.ddl
-./tools/testfiles/tcontents.ddl
-./tools/testfiles/tordercontents1.ddl
-./tools/testfiles/tordercontents2.ddl
-./tools/testfiles/torderlinks1.ddl
-./tools/testfiles/torderlinks2.ddl
-./tools/testfiles/tfilters.h5
-./tools/testfiles/tchunked.ddl
-./tools/testfiles/tcompact.ddl
-./tools/testfiles/tcontiguos.ddl
-./tools/testfiles/tdeflate.ddl
-./tools/testfiles/texternal.ddl
-./tools/testfiles/tfletcher32.ddl
-./tools/testfiles/treference.ddl
-./tools/testfiles/tshuffle.ddl
-./tools/testfiles/tstring.ddl
-./tools/testfiles/tszip.ddl
-./tools/testfiles/tuserfilter.ddl
-./tools/testfiles/tallfilters.ddl
-./tools/testfiles/tstringe.ddl
-./tools/testfiles/tindicesyes.ddl
-./tools/testfiles/tindicesno.ddl
-./tools/testfiles/tfcontents1.h5
-./tools/testfiles/tfcontents2.h5
-./tools/testfiles/tboot1.ddl
-./tools/testfiles/tboot2.ddl
-./tools/testfiles/tperror.ddl
-./tools/testfiles/tfill.ddl
-./tools/testfiles/tfvalues.h5
-./tools/testfiles/tstring2.ddl
-./tools/testfiles/tstr3.h5
-./tools/testfiles/taindices.h5
./tools/testfiles/tvms.ddl
-./tools/testfiles/tldouble.h5
./tools/testfiles/tvms.h5
-./tools/testfiles/tbinary.h5
-./tools/testfiles/tbin1.ddl
-./tools/testfiles/tbin2.ddl
-./tools/testfiles/tbin3.ddl
-./tools/testfiles/tbin4.ddl
-./tools/testfiles/tindicessub2.ddl
-./tools/testfiles/tindicessub3.ddl
-./tools/testfiles/tindicessub4.ddl
-./tools/testfiles/tindicessub1.ddl
-./tools/testfiles/thyperslab.ddl
-./tools/testfiles/tbigdims.ddl
-./tools/testfiles/tbigdims.h5
-./tools/testfiles/thyperslab.h5
./tools/testfiles/twidedisplay.ddl
./tools/testfiles/twithddl.exp
./tools/testfiles/twithddlfile.ddl
@@ -1767,6 +1768,7 @@
./tools/testfiles/tpbitsIntOffsetExceeded.ddl
./tools/testfiles/tpbitsLongOffsetExceeded.ddl
./tools/testfiles/tpbitsOverlapped.ddl
+
# h5dump h5import validation
./tools/testfiles/out3.h5import
./tools/testfiles/tordergr.h5
@@ -1782,6 +1784,7 @@
./tools/testfiles/torderattr.h5
./tools/testfiles/tfpformat.ddl
./tools/testfiles/tfpformat.h5
+
# h5dump h5repack validation
./tools/testfiles/h5repack_filters.h5.ddl
./tools/testfiles/zerodim.ddl
@@ -2162,6 +2165,7 @@
./tools/h5repack/testfiles/h5repack_attr.h5
./tools/h5repack/testfiles/h5repack_hlink.h5
./tools/h5repack/testfiles/h5repack_layout.h5
+./tools/h5repack/testfiles/h5repack_layout.h5.ddl
./tools/h5repack/testfiles/h5repack_layouto.h5
./tools/h5repack/testfiles/h5repack_layout2.h5
./tools/h5repack/testfiles/h5repack_layout3.h5
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 7535138..c2a1c7e 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -786,8 +786,13 @@ INCLUDE_DIRECTORIES (${CMAKE_BINARY_DIR})
# Setup the H5Detect utility which generates H5Tinit with platform
# specific type checks inside
#-----------------------------------------------------------------------------
+IF (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+ SET (LOCAL_OPT_FLAG "-O0")
+ELSE (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+ SET (LOCAL_OPT_FLAG " ")
+ENDIF (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
ADD_EXECUTABLE (H5detect ${HDF5_SRC_DIR}/H5detect.c)
-TARGET_C_PROPERTIES (H5detect " " " ")
+TARGET_C_PROPERTIES (H5detect ${LOCAL_OPT_FLAG} " ")
IF (MSVC)
TARGET_LINK_LIBRARIES (H5detect "ws2_32.lib")
ENDIF (MSVC)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 84bc114..2704f0c 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -120,4 +120,194 @@ IF (BUILD_SHARED_LIBS)
ENDFOREACH (test_lib ${TEST2_PLUGIN_LIBS})
ENDIF (BUILD_SHARED_LIBS)
+SET (testhdf5_SRCS
+ ${HDF5_TEST_SOURCE_DIR}/testhdf5.c
+ ${HDF5_TEST_SOURCE_DIR}/tarray.c
+ ${HDF5_TEST_SOURCE_DIR}/tattr.c
+ ${HDF5_TEST_SOURCE_DIR}/tchecksum.c
+ ${HDF5_TEST_SOURCE_DIR}/tconfig.c
+ ${HDF5_TEST_SOURCE_DIR}/tcoords.c
+ ${HDF5_TEST_SOURCE_DIR}/tfile.c
+ ${HDF5_TEST_SOURCE_DIR}/tgenprop.c
+ ${HDF5_TEST_SOURCE_DIR}/th5o.c
+ ${HDF5_TEST_SOURCE_DIR}/th5s.c
+ ${HDF5_TEST_SOURCE_DIR}/theap.c
+ ${HDF5_TEST_SOURCE_DIR}/tid.c
+ ${HDF5_TEST_SOURCE_DIR}/titerate.c
+ ${HDF5_TEST_SOURCE_DIR}/tmeta.c
+ ${HDF5_TEST_SOURCE_DIR}/tmisc.c
+ ${HDF5_TEST_SOURCE_DIR}/trefer.c
+ ${HDF5_TEST_SOURCE_DIR}/trefstr.c
+ ${HDF5_TEST_SOURCE_DIR}/tselect.c
+ ${HDF5_TEST_SOURCE_DIR}/tskiplist.c
+ ${HDF5_TEST_SOURCE_DIR}/tsohm.c
+ ${HDF5_TEST_SOURCE_DIR}/ttime.c
+ ${HDF5_TEST_SOURCE_DIR}/ttst.c
+ ${HDF5_TEST_SOURCE_DIR}/tunicode.c
+ ${HDF5_TEST_SOURCE_DIR}/tvltypes.c
+ ${HDF5_TEST_SOURCE_DIR}/tvlstr.c
+)
+
+#-- Adding test for testhdf5
+ADD_EXECUTABLE (testhdf5 ${testhdf5_SRCS})
+TARGET_NAMING (testhdf5 ${LIB_TYPE})
+TARGET_C_PROPERTIES (testhdf5 " " " ")
+TARGET_LINK_LIBRARIES (testhdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
+SET_TARGET_PROPERTIES (testhdf5 PROPERTIES FOLDER test)
+
+MACRO (ADD_H5_EXE file)
+ ADD_EXECUTABLE (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c)
+ TARGET_NAMING (${file} ${LIB_TYPE})
+ TARGET_C_PROPERTIES (${file} " " " ")
+ TARGET_LINK_LIBRARIES (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
+ SET_TARGET_PROPERTIES (${file} PROPERTIES FOLDER test)
+ENDMACRO (ADD_H5_EXE file)
+
+SET (H5_TESTS
+ accum
+ lheap
+ ohdr
+ stab
+ gheap
+ #cache
+ #cache_api
+ #cache_tagging
+ pool
+ hyperslab
+ istore
+ bittests
+ dt_arith
+ dtypes
+ cmpd_dset
+ filter_fail
+ extend
+ external
+ efc
+ objcopy
+ links
+ unlink
+ big
+ mtime
+ fillval
+ mount
+ flush1
+ flush2
+ app_ref
+ enum
+ set_extent
+ #ttsafe
+ getname
+ vfd
+ ntypes
+ dangle
+ dtransform
+ reserved
+ cross_read
+ freespace
+ mf
+ farray
+ earray
+ btree2
+ fheap
+ #error_test
+ #err_compat
+ tcheck_version
+ testmeta
+ #links_env
+ file_image
+ enc_dec_plist
+ enc_dec_plist_with_endianess
+ unregister
+)
+
+FOREACH (test ${H5_TESTS})
+ ADD_H5_EXE(${test})
+ENDFOREACH (test ${H5_TESTS})
+
+##############################################################################
+##############################################################################
+### A D D I T I O N A L T E S T S ###
+##############################################################################
+##############################################################################
+
+#-- Adding test for cache
+ADD_EXECUTABLE (cache ${HDF5_TEST_SOURCE_DIR}/cache.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c)
+TARGET_NAMING (cache ${LIB_TYPE})
+TARGET_C_PROPERTIES (cache " " " ")
+TARGET_LINK_LIBRARIES (cache ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+SET_TARGET_PROPERTIES (cache PROPERTIES FOLDER test)
+
+#-- Adding test for cache_api
+ADD_EXECUTABLE (cache_api ${HDF5_TEST_SOURCE_DIR}/cache_api.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c)
+TARGET_NAMING (cache_api ${LIB_TYPE})
+TARGET_C_PROPERTIES (cache_api " " " ")
+TARGET_LINK_LIBRARIES (cache_api ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+SET_TARGET_PROPERTIES (cache_api PROPERTIES FOLDER test)
+
+#-- Adding test for cache_tagging
+ADD_EXECUTABLE (cache_tagging ${HDF5_TEST_SOURCE_DIR}/cache_tagging.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c)
+TARGET_NAMING (cache_tagging ${LIB_TYPE})
+TARGET_C_PROPERTIES (cache_tagging " " " ")
+TARGET_LINK_LIBRARIES (cache_tagging ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+SET_TARGET_PROPERTIES (cache_tagging PROPERTIES FOLDER test)
+
+#-- Adding test for ttsafe
+ADD_EXECUTABLE (ttsafe
+ ${HDF5_TEST_SOURCE_DIR}/ttsafe.c
+ ${HDF5_TEST_SOURCE_DIR}/ttsafe_dcreate.c
+ ${HDF5_TEST_SOURCE_DIR}/ttsafe_error.c
+ ${HDF5_TEST_SOURCE_DIR}/ttsafe_cancel.c
+ ${HDF5_TEST_SOURCE_DIR}/ttsafe_acreate.c
+)
+TARGET_NAMING (ttsafe ${LIB_TYPE})
+TARGET_C_PROPERTIES (ttsafe " " " ")
+TARGET_LINK_LIBRARIES (ttsafe ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+SET_TARGET_PROPERTIES (ttsafe PROPERTIES FOLDER test)
+
+#-- Adding test for err_compat
+IF (HDF5_ENABLE_DEPRECATED_SYMBOLS)
+ ADD_EXECUTABLE (err_compat ${HDF5_TEST_SOURCE_DIR}/err_compat.c)
+ TARGET_NAMING (err_compat ${LIB_TYPE})
+ TARGET_C_PROPERTIES (err_compat " " " ")
+ TARGET_LINK_LIBRARIES (err_compat ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+ SET_TARGET_PROPERTIES (err_compat PROPERTIES FOLDER test)
+ENDIF (HDF5_ENABLE_DEPRECATED_SYMBOLS)
+
+#-- Adding test for error_test
+ADD_EXECUTABLE (error_test ${HDF5_TEST_SOURCE_DIR}/error_test.c)
+TARGET_NAMING (error_test ${LIB_TYPE})
+TARGET_C_PROPERTIES (error_test " " " ")
+TARGET_LINK_LIBRARIES (error_test ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+SET_TARGET_PROPERTIES (error_test PROPERTIES FOLDER test)
+
+#-- Adding test for links_env
+ADD_EXECUTABLE (links_env ${HDF5_TEST_SOURCE_DIR}/links_env.c)
+TARGET_NAMING (links_env ${LIB_TYPE})
+TARGET_C_PROPERTIES (links_env " " " ")
+TARGET_LINK_LIBRARIES (links_env ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+SET_TARGET_PROPERTIES (links_env PROPERTIES FOLDER test)
+
+#-- Adding test for libinfo
+SET (GREP_RUNNER ${PROJECT_BINARY_DIR}/GrepRunner.cmake)
+FILE (WRITE ${GREP_RUNNER}
+ "FILE (STRINGS \${TEST_PROGRAM} TEST_RESULT REGEX \"SUMMARY OF THE HDF5 CONFIGURATION\")
+IF (\${TEST_RESULT} STREQUAL \"0\")
+ MESSAGE (FATAL_ERROR \"Failed: The output: \${TEST_RESULT} of \${TEST_PROGRAM} did not contain SUMMARY OF THE HDF5 CONFIGURATION\")
+ELSE (\${TEST_RESULT} STREQUAL \"0\")
+ MESSAGE (STATUS \"COMMAND Result: \${TEST_RESULT}\")
+ENDIF (\${TEST_RESULT} STREQUAL \"0\")
+"
+)
+
+##############################################################################
+### P L U G I N T E S T S
+##############################################################################
+IF (BUILD_SHARED_LIBS)
+ ADD_EXECUTABLE (plugin ${HDF5_TEST_SOURCE_DIR}/plugin.c)
+ TARGET_NAMING (plugin ${LIB_TYPE})
+ TARGET_C_PROPERTIES (plugin " " " ")
+ TARGET_LINK_LIBRARIES (plugin ${HDF5_TEST_PLUGIN_LIB_TARGET})
+ SET_TARGET_PROPERTIES (plugin PROPERTIES FOLDER test)
+ENDIF (BUILD_SHARED_LIBS)
+
INCLUDE (CMakeTests.cmake)
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake
index 2f48bbe..b64eeca 100644
--- a/test/CMakeTests.cmake
+++ b/test/CMakeTests.cmake
@@ -136,41 +136,6 @@ FOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
)
ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
-SET (testhdf5_SRCS
- ${HDF5_TEST_SOURCE_DIR}/testhdf5.c
- ${HDF5_TEST_SOURCE_DIR}/tarray.c
- ${HDF5_TEST_SOURCE_DIR}/tattr.c
- ${HDF5_TEST_SOURCE_DIR}/tchecksum.c
- ${HDF5_TEST_SOURCE_DIR}/tconfig.c
- ${HDF5_TEST_SOURCE_DIR}/tcoords.c
- ${HDF5_TEST_SOURCE_DIR}/tfile.c
- ${HDF5_TEST_SOURCE_DIR}/tgenprop.c
- ${HDF5_TEST_SOURCE_DIR}/th5o.c
- ${HDF5_TEST_SOURCE_DIR}/th5s.c
- ${HDF5_TEST_SOURCE_DIR}/theap.c
- ${HDF5_TEST_SOURCE_DIR}/tid.c
- ${HDF5_TEST_SOURCE_DIR}/titerate.c
- ${HDF5_TEST_SOURCE_DIR}/tmeta.c
- ${HDF5_TEST_SOURCE_DIR}/tmisc.c
- ${HDF5_TEST_SOURCE_DIR}/trefer.c
- ${HDF5_TEST_SOURCE_DIR}/trefstr.c
- ${HDF5_TEST_SOURCE_DIR}/tselect.c
- ${HDF5_TEST_SOURCE_DIR}/tskiplist.c
- ${HDF5_TEST_SOURCE_DIR}/tsohm.c
- ${HDF5_TEST_SOURCE_DIR}/ttime.c
- ${HDF5_TEST_SOURCE_DIR}/ttst.c
- ${HDF5_TEST_SOURCE_DIR}/tunicode.c
- ${HDF5_TEST_SOURCE_DIR}/tvltypes.c
- ${HDF5_TEST_SOURCE_DIR}/tvlstr.c
-)
-
-#-- Adding test for testhdf5
-ADD_EXECUTABLE (testhdf5 ${testhdf5_SRCS})
-TARGET_NAMING (testhdf5 ${LIB_TYPE})
-TARGET_C_PROPERTIES (testhdf5 " " " ")
-TARGET_LINK_LIBRARIES (testhdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
-SET_TARGET_PROPERTIES (testhdf5 PROPERTIES FOLDER test)
-
# Remove any output file left over from previous test run
ADD_TEST (
NAME h5test-clear-testhdf5-objects
@@ -217,16 +182,6 @@ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
##############################################################################
##############################################################################
-MACRO (ADD_H5_TEST file)
- ADD_EXECUTABLE (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c)
- TARGET_NAMING (${file} ${LIB_TYPE})
- TARGET_C_PROPERTIES (${file} " " " ")
- TARGET_LINK_LIBRARIES (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
- SET_TARGET_PROPERTIES (${file} PROPERTIES FOLDER test)
-
- ADD_TEST (NAME ${file} COMMAND $<TARGET_FILE:${file}>)
-ENDMACRO (ADD_H5_TEST file)
-
# Remove any output file left over from previous test run
ADD_TEST (
NAME h5test-clear-objects
@@ -291,65 +246,8 @@ ADD_TEST (
unregister_filter_2.h5
)
-SET (H5_TESTS
- accum
- lheap
- ohdr
- stab
- gheap
- #cache
- #cache_api
- #cache_tagging
- pool
- hyperslab
- istore
- bittests
- dt_arith
- dtypes
- cmpd_dset
- filter_fail
- extend
- external
- efc
- objcopy
- links
- unlink
- big
- mtime
- fillval
- mount
- flush1
- flush2
- app_ref
- enum
- set_extent
- #ttsafe
- getname
- vfd
- ntypes
- dangle
- dtransform
- reserved
- cross_read
- freespace
- mf
- farray
- earray
- btree2
- fheap
- #error_test
- #err_compat
- tcheck_version
- testmeta
- #links_env
- file_image
- enc_dec_plist
- enc_dec_plist_with_endianess
- unregister
-)
-
FOREACH (test ${H5_TESTS})
- ADD_H5_TEST(${test})
+ ADD_TEST (NAME ${test} COMMAND $<TARGET_FILE:${test}>)
SET_TESTS_PROPERTIES(${test} PROPERTIES DEPENDS h5test-clear-objects)
ENDFOREACH (test ${H5_TESTS})
@@ -362,11 +260,6 @@ SET_TESTS_PROPERTIES(flush2 PROPERTIES DEPENDS flush1)
##############################################################################
#-- Adding test for cache
-ADD_EXECUTABLE (cache ${HDF5_TEST_SOURCE_DIR}/cache.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c)
-TARGET_NAMING (cache ${LIB_TYPE})
-TARGET_C_PROPERTIES (cache " " " ")
-TARGET_LINK_LIBRARIES (cache ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
-SET_TARGET_PROPERTIES (cache PROPERTIES FOLDER test)
ADD_TEST (
NAME h5test-clear-cache-objects
COMMAND ${CMAKE_COMMAND}
@@ -377,12 +270,6 @@ ADD_TEST (NAME cache COMMAND $<TARGET_FILE:cache>)
SET_TESTS_PROPERTIES(cache PROPERTIES DEPENDS h5test-clear-cache-objects)
#-- Adding test for cache_api
-ADD_EXECUTABLE (cache_api ${HDF5_TEST_SOURCE_DIR}/cache_api.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c)
-TARGET_NAMING (cache_api ${LIB_TYPE})
-TARGET_C_PROPERTIES (cache_api " " " ")
-TARGET_LINK_LIBRARIES (cache_api ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
-SET_TARGET_PROPERTIES (cache_api PROPERTIES FOLDER test)
-
ADD_TEST (
NAME h5test-clear-cache_api-objects
COMMAND ${CMAKE_COMMAND}
@@ -393,12 +280,6 @@ ADD_TEST (NAME cache_api COMMAND $<TARGET_FILE:cache_api>)
SET_TESTS_PROPERTIES(cache_api PROPERTIES DEPENDS h5test-clear-cache_api-objects)
#-- Adding test for cache_tagging
-ADD_EXECUTABLE (cache_tagging ${HDF5_TEST_SOURCE_DIR}/cache_tagging.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c)
-TARGET_NAMING (cache_tagging ${LIB_TYPE})
-TARGET_C_PROPERTIES (cache_tagging " " " ")
-TARGET_LINK_LIBRARIES (cache_tagging ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
-SET_TARGET_PROPERTIES (cache_tagging PROPERTIES FOLDER test)
-
ADD_TEST (
NAME h5test-clear-cache_tagging-objects
COMMAND ${CMAKE_COMMAND}
@@ -410,18 +291,6 @@ ADD_TEST (NAME cache_tagging COMMAND $<TARGET_FILE:cache_tagging>)
SET_TESTS_PROPERTIES(cache_tagging PROPERTIES DEPENDS h5test-clear-cache_tagging-objects)
#-- Adding test for ttsafe
-ADD_EXECUTABLE (ttsafe
- ${HDF5_TEST_SOURCE_DIR}/ttsafe.c
- ${HDF5_TEST_SOURCE_DIR}/ttsafe_dcreate.c
- ${HDF5_TEST_SOURCE_DIR}/ttsafe_error.c
- ${HDF5_TEST_SOURCE_DIR}/ttsafe_cancel.c
- ${HDF5_TEST_SOURCE_DIR}/ttsafe_acreate.c
-)
-TARGET_NAMING (ttsafe ${LIB_TYPE})
-TARGET_C_PROPERTIES (ttsafe " " " ")
-TARGET_LINK_LIBRARIES (ttsafe ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
-SET_TARGET_PROPERTIES (ttsafe PROPERTIES FOLDER test)
-
ADD_TEST (
NAME h5test-clear-ttsafe-objects
COMMAND ${CMAKE_COMMAND}
@@ -436,12 +305,6 @@ SET_TESTS_PROPERTIES(ttsafe PROPERTIES DEPENDS h5test-clear-ttsafe-objects)
#-- Adding test for err_compat
IF (HDF5_ENABLE_DEPRECATED_SYMBOLS)
- ADD_EXECUTABLE (err_compat ${HDF5_TEST_SOURCE_DIR}/err_compat.c)
- TARGET_NAMING (err_compat ${LIB_TYPE})
- TARGET_C_PROPERTIES (err_compat " " " ")
- TARGET_LINK_LIBRARIES (err_compat ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
- SET_TARGET_PROPERTIES (err_compat PROPERTIES FOLDER test)
-
ADD_TEST (
NAME h5test-clear-err_compat-objects
COMMAND ${CMAKE_COMMAND}
@@ -463,12 +326,6 @@ IF (HDF5_ENABLE_DEPRECATED_SYMBOLS)
ENDIF (HDF5_ENABLE_DEPRECATED_SYMBOLS)
#-- Adding test for error_test
-ADD_EXECUTABLE (error_test ${HDF5_TEST_SOURCE_DIR}/error_test.c)
-TARGET_NAMING (error_test ${LIB_TYPE})
-TARGET_C_PROPERTIES (error_test " " " ")
-TARGET_LINK_LIBRARIES (error_test ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
-SET_TARGET_PROPERTIES (error_test PROPERTIES FOLDER test)
-
ADD_TEST (
NAME h5test-clear-error_test-objects
COMMAND ${CMAKE_COMMAND}
@@ -490,12 +347,6 @@ SET_TESTS_PROPERTIES(error_test PROPERTIES DEPENDS h5test-clear-error_test-objec
SET_TESTS_PROPERTIES (error_test PROPERTIES ENVIRONMENT "HDF5_PLUGIN_PRELOAD=::")
#-- Adding test for links_env
-ADD_EXECUTABLE (links_env ${HDF5_TEST_SOURCE_DIR}/links_env.c)
-TARGET_NAMING (links_env ${LIB_TYPE})
-TARGET_C_PROPERTIES (links_env " " " ")
-TARGET_LINK_LIBRARIES (links_env ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
-SET_TARGET_PROPERTIES (links_env PROPERTIES FOLDER test)
-
ADD_TEST (
NAME h5test-clear-links_env-objects
COMMAND ${CMAKE_COMMAND}
@@ -520,17 +371,6 @@ ADD_TEST (NAME links_env COMMAND "${CMAKE_COMMAND}"
SET_TESTS_PROPERTIES(links_env PROPERTIES DEPENDS h5test-clear-links_env-objects)
#-- Adding test for libinfo
-SET (GREP_RUNNER ${PROJECT_BINARY_DIR}/GrepRunner.cmake)
-FILE (WRITE ${GREP_RUNNER}
- "FILE (STRINGS \${TEST_PROGRAM} TEST_RESULT REGEX \"SUMMARY OF THE HDF5 CONFIGURATION\")
-IF (\${TEST_RESULT} STREQUAL \"0\")
- MESSAGE (FATAL_ERROR \"Failed: The output: \${TEST_RESULT} of \${TEST_PROGRAM} did not contain SUMMARY OF THE HDF5 CONFIGURATION\")
-ELSE (\${TEST_RESULT} STREQUAL \"0\")
- MESSAGE (STATUS \"COMMAND Result: \${TEST_RESULT}\")
-ENDIF (\${TEST_RESULT} STREQUAL \"0\")
-"
-)
-
ADD_TEST (NAME testlibinfo COMMAND ${CMAKE_COMMAND} -D "TEST_PROGRAM=$<TARGET_FILE:${HDF5_LIB_TARGET}>" -P "${GREP_RUNNER}")
##############################################################################
@@ -544,12 +384,6 @@ IF (BUILD_SHARED_LIBS)
SET(CMAKE_SEP ":")
ENDIF(WIN32 AND NOT CYGWIN)
- ADD_EXECUTABLE (plugin ${HDF5_TEST_SOURCE_DIR}/plugin.c)
- TARGET_NAMING (plugin ${LIB_TYPE})
- TARGET_C_PROPERTIES (plugin " " " ")
- TARGET_LINK_LIBRARIES (plugin ${HDF5_TEST_PLUGIN_LIB_TARGET})
- SET_TARGET_PROPERTIES (plugin PROPERTIES FOLDER test)
-
ADD_TEST (NAME H5PLUGIN-plugin COMMAND $<TARGET_FILE:plugin>)
SET_TESTS_PROPERTIES (H5PLUGIN-plugin PROPERTIES ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/testdir1${CMAKE_SEP}${CMAKE_BINARY_DIR}/testdir2")
ELSE (BUILD_SHARED_LIBS)
diff --git a/tools/h5dump/CMakeTests.cmake b/tools/h5dump/CMakeTests.cmake
index 026b6b2..c88495d 100644
--- a/tools/h5dump/CMakeTests.cmake
+++ b/tools/h5dump/CMakeTests.cmake
@@ -52,6 +52,8 @@
${HDF5_TOOLS_SRC_DIR}/testfiles/tbigdims.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/tboot1.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/tboot2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tboot2A.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tboot2B.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/tchar1.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/tchunked.ddl
${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdattrintsize.ddl
@@ -797,6 +799,10 @@
tboot1.out.err
tboot2.out
tboot2.out.err
+ tboot2A.out
+ tboot2A.out.err
+ tboot2B.out
+ tboot2B.out.err
tchar1.out
tchar1.out.err
tchunked.out
@@ -1202,6 +1208,8 @@
# tests for super block
ADD_H5_TEST (tboot1 0 --enable-error-stack -H -B -d dset tfcontents1.h5)
ADD_H5_TEST (tboot2 0 --enable-error-stack -B tfcontents2.h5)
+ ADD_H5_TEST (tboot2A 0 --enable-error-stack --boot-block tfcontents2.h5)
+ ADD_H5_TEST (tboot2B 0 --enable-error-stack --superblock tfcontents2.h5)
ADD_H5_TEST (file_space 0 --enable-error-stack -B file_space.h5)
# test -p with a non existing dataset
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index ea38c61..3c60bb0 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -77,6 +77,7 @@ static struct long_options l_opts[] = {
{ "hel", no_arg, 'h' },
{ "contents", optional_arg, 'n' },
{ "properties", no_arg, 'p' },
+ { "superblock", no_arg, 'B' },
{ "boot-block", no_arg, 'B' },
{ "boot-bloc", no_arg, 'B' },
{ "boot-blo", no_arg, 'B' },
@@ -289,7 +290,7 @@ usage(const char *prog)
PRINTVALSTREAM(rawoutstream, "\n");
PRINTVALSTREAM(rawoutstream, "--------------- Subsetting Options ---------------\n");
PRINTVALSTREAM(rawoutstream, " Subsetting is available by using the following options with a dataset\n");
- PRINTVALSTREAM(rawoutstream, " attribute. Subsetting is done by selecting a hyperslab from the data.\n");
+ PRINTVALSTREAM(rawoutstream, " option. Subsetting is done by selecting a hyperslab from the data.\n");
PRINTVALSTREAM(rawoutstream, " Thus, the options mirror those for performing a hyperslab selection.\n");
PRINTVALSTREAM(rawoutstream, " One of the START, COUNT, STRIDE, or BLOCK parameters are mandatory if you do subsetting.\n");
PRINTVALSTREAM(rawoutstream, " The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in\n");
diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in
index 77a0113..be05705 100644
--- a/tools/h5dump/testh5dump.sh.in
+++ b/tools/h5dump/testh5dump.sh.in
@@ -212,6 +212,8 @@ $SRC_H5DUMP_TESTFILES/tbinregR.ddl
$SRC_H5DUMP_TESTFILES/tbigdims.ddl
$SRC_H5DUMP_TESTFILES/tboot1.ddl
$SRC_H5DUMP_TESTFILES/tboot2.ddl
+$SRC_H5DUMP_TESTFILES/tboot2A.ddl
+$SRC_H5DUMP_TESTFILES/tboot2B.ddl
$SRC_H5DUMP_TESTFILES/tchar1.ddl
$SRC_H5DUMP_TESTFILES/tchunked.ddl
$SRC_H5DUMP_TESTFILES/tcmpdattrintsize.ddl
@@ -1040,6 +1042,8 @@ TOOLTEST charsets.ddl --enable-error-stack charsets.h5
# tests for super block
TOOLTEST tboot1.ddl --enable-error-stack -H -B -d dset tfcontents1.h5
TOOLTEST tboot2.ddl --enable-error-stack -B tfcontents2.h5
+TOOLTEST tboot2A.ddl --enable-error-stack --boot-block tfcontents2.h5
+TOOLTEST tboot2B.ddl --enable-error-stack --superblock tfcontents2.h5
TOOLTEST file_space.ddl --enable-error-stack -B file_space.h5
# test -p with a non existing dataset
diff --git a/tools/h5repack/CMakeTests.cmake b/tools/h5repack/CMakeTests.cmake
index 79d75a7..c27aaa0 100644
--- a/tools/h5repack/CMakeTests.cmake
+++ b/tools/h5repack/CMakeTests.cmake
@@ -82,6 +82,7 @@
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_ext.bin
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/ublock.bin
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack.info
+ ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5.ddl
# tools/testfiles
${HDF5_TOOLS_SRC_DIR}/testfiles/h5repack_filters.h5.ddl
)
@@ -163,7 +164,9 @@
ELSE (${testtype} STREQUAL "SKIP")
# If using memchecker add tests without using scripts
IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5REPACK_CMP-${testname} COMMAND $<TARGET_FILE:h5repack> ${ARGN} testfiles/${resultfile} testfiles/out-${testname}.${resultfile})
+ ADD_TEST (
+ NAME H5REPACK_CMP-${testname}
+ COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile})
ELSE (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5REPACK_CMP-${testname}
@@ -184,6 +187,39 @@
ENDIF (${testtype} STREQUAL "SKIP")
ENDMACRO (ADD_H5_CMP_TEST)
+ MACRO (ADD_H5_DMP_TEST testname testtype resultcode resultfile)
+ IF (${testtype} STREQUAL "SKIP")
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5REPACK_DMP-${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
+ ADD_TEST (
+ NAME H5REPACK_DMP-${testname}
+ COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile})
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5REPACK_DMP-${testname} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5REPACK_DMP-h5dump-${testname}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
+ -D "TEST_ARGS:STRING=-pH;./testfiles/out-${testname}.${resultfile}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_OUTPUT=./testfiles/${resultfile}-${testname}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=testfiles/${resultfile}.ddl"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5REPACK_DMP-h5dump-${testname} PROPERTIES DEPENDS "H5REPACK_DMP-${testname}")
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ENDIF (${testtype} STREQUAL "SKIP")
+ ENDMACRO (ADD_H5_DMP_TEST)
+
MACRO (ADD_H5_VERIFY_TEST testname testtype resultcode testfile testdset testfilter)
IF (${testtype} STREQUAL "SKIP")
IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
@@ -768,7 +804,7 @@
IF (NOT USE_FILTER_DEFLATE)
SET (TESTTYPE "SKIP")
ENDIF (NOT USE_FILTER_DEFLATE)
- ADD_H5_TEST (deflate_limit ${TESTTYPE} ${arg})
+ ADD_H5_DMP_TEST (deflate_limit ${TESTTYPE} 0 ${arg})
#file
SET (arg ${FILE4} -e ${INFO_FILE})
diff --git a/tools/h5repack/h5repack.c b/tools/h5repack/h5repack.c
index dda81cf..5d30bf2 100644
--- a/tools/h5repack/h5repack.c
+++ b/tools/h5repack/h5repack.c
@@ -93,7 +93,7 @@ h5repack_init(pack_opt_t *options, int verbose, hbool_t latest,
int k, n;
HDmemset(options, 0, sizeof(pack_opt_t));
- options->min_comp = 1024;
+ options->min_comp = 0;
options->verbose = verbose;
options->latest = latest;
options->layout_g = H5D_LAYOUT_ERROR;
diff --git a/tools/h5repack/h5repack.sh.in b/tools/h5repack/h5repack.sh.in
index ca25183..42b8ecb 100644
--- a/tools/h5repack/h5repack.sh.in
+++ b/tools/h5repack/h5repack.sh.in
@@ -120,6 +120,7 @@ LIST_OTHER_TEST_FILES="
$SRC_H5REPACK_TESTFILES/h5repack_ext.bin
$SRC_H5REPACK_TESTFILES/ublock.bin
$SRC_H5REPACK_TESTFILES/h5repack.info
+$SRC_H5REPACK_TESTFILES/h5repack_layout.h5.ddl
$SRC_TOOLS_TESTFILES/h5repack_filters.h5.ddl
"
@@ -201,7 +202,7 @@ DIFFTEST()
fi
}
-
+
# Call h5repack
#
@@ -475,6 +476,54 @@ TOOLTESTV()
rm -f $actual $actual_err
rm -f $outfile
}
+
+# This is same as TOOLTESTV() with comparing h5dump output
+# from -pH option
+#
+TOOLTEST_DUMP()
+{
+ infile=$TESTDIR/$2
+ outfile=$TESTDIR/out-$1.$2
+ expect="$TESTDIR/$2.ddl"
+ actual="$TESTDIR/out-$1.$2.out"
+ actual_err="$TESTDIR/out-$1.$2.err"
+
+ shift
+ shift
+
+ # Run test.
+ TESTING $H5REPACK $@
+ (
+ $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
+ ) >$actual 2>$actual_err
+ RET=$?
+ if [ $RET != 0 ] ; then
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ else
+ echo " PASSED"
+ VERIFY h5dump output $@
+ (
+ $RUNSERIAL $H5DUMP_BIN -pH $outfile
+ ) >$actual 2>$actual_err
+ cat $actual_err >> $actual
+
+ RET=$?
+
+ fi
+
+ if cmp -s $expect $actual; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && diff -c $expect $actual |sed 's/^/ /'
+ fi
+
+ rm -f $actual $actual_err
+ rm -f $outfile
+}
# TOOLTEST_META:
# Test metadata block size option.
@@ -820,7 +869,7 @@ arg="h5repack_layout.h5 -f GZIP=1 -m 1024"
if test $USE_FILTER_DEFLATE != "yes" ; then
SKIP $arg
else
- TOOLTEST deflate_limit $arg
+ TOOLTEST_DUMP deflate_limit $arg
fi
#file
diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c
index f9dd334..02337fd 100644
--- a/tools/h5repack/h5repack_copy.c
+++ b/tools/h5repack/h5repack_copy.c
@@ -1017,6 +1017,16 @@ int do_copy_objects(hid_t fidin,
/* get the storage size of the input dataset */
dsize_in=H5Dget_storage_size(dset_in);
+ /* check for small size datasets (less than 1k) except
+ * changing to COMPACT. For the reference, COMPACT is limited
+ * by size 64K by library.
+ */
+ if (options->layout_g != H5D_COMPACT)
+ {
+ if ( size_dset < options->min_comp )
+ apply_s=0;
+ }
+
/* apply the filter */
if (apply_s)
{
diff --git a/tools/h5repack/h5repack_main.c b/tools/h5repack/h5repack_main.c
index 51276ea..05ff447 100644
--- a/tools/h5repack/h5repack_main.c
+++ b/tools/h5repack/h5repack_main.c
@@ -180,7 +180,7 @@ static void usage(const char *prog)
printf("\n");
- printf(" M - is an integer greater than 1, size of dataset in bytes (default is 1024) \n");
+ printf(" M - is an integer greater than 1, size of dataset in bytes (default is 0) \n");
printf(" E - is a filename.\n");
printf(" S - is an integer\n");
printf(" U - is a filename.\n");
diff --git a/tools/h5repack/testfiles/h5repack_layout.h5.ddl b/tools/h5repack/testfiles/h5repack_layout.h5.ddl
new file mode 100644
index 0000000..d380201
--- /dev/null
+++ b/tools/h5repack/testfiles/h5repack_layout.h5.ddl
@@ -0,0 +1,130 @@
+HDF5 "./testfiles/out-deflate_limit.h5repack_layout.h5" {
+GROUP "/" {
+ DATASET "dset1" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) }
+ STORAGE_LAYOUT {
+ CHUNKED ( 40, 20 )
+ SIZE 1150 (2.783:1 COMPRESSION)
+ }
+ FILTERS {
+ COMPRESSION DEFLATE { LEVEL 1 }
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE 0
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_INCR
+ }
+ }
+ DATASET "dset2" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) }
+ STORAGE_LAYOUT {
+ CHUNKED ( 40, 20 )
+ SIZE 1150 (2.783:1 COMPRESSION)
+ }
+ FILTERS {
+ COMPRESSION DEFLATE { LEVEL 1 }
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE 0
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_INCR
+ }
+ }
+ DATASET "dset3" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) }
+ STORAGE_LAYOUT {
+ CHUNKED ( 40, 20 )
+ SIZE 1150 (2.783:1 COMPRESSION)
+ }
+ FILTERS {
+ COMPRESSION DEFLATE { LEVEL 1 }
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE 0
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_INCR
+ }
+ }
+ DATASET "dset4" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) }
+ STORAGE_LAYOUT {
+ CHUNKED ( 40, 20 )
+ SIZE 1150 (2.783:1 COMPRESSION)
+ }
+ FILTERS {
+ COMPRESSION DEFLATE { LEVEL 1 }
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE 0
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_INCR
+ }
+ }
+ DATASET "dset_chunk" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 40, 20 ) / ( 40, H5S_UNLIMITED ) }
+ STORAGE_LAYOUT {
+ CHUNKED ( 20, 10 )
+ SIZE 1283 (2.494:1 COMPRESSION)
+ }
+ FILTERS {
+ COMPRESSION DEFLATE { LEVEL 1 }
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE 0
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_INCR
+ }
+ }
+ DATASET "dset_compact" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) }
+ STORAGE_LAYOUT {
+ CHUNKED ( 40, 20 )
+ SIZE 1150 (2.783:1 COMPRESSION)
+ }
+ FILTERS {
+ COMPRESSION DEFLATE { LEVEL 1 }
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE 0
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_INCR
+ }
+ }
+ DATASET "dset_contiguous" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) }
+ STORAGE_LAYOUT {
+ CHUNKED ( 40, 20 )
+ SIZE 1150 (2.783:1 COMPRESSION)
+ }
+ FILTERS {
+ COMPRESSION DEFLATE { LEVEL 1 }
+ }
+ FILLVALUE {
+ FILL_TIME H5D_FILL_TIME_IFSET
+ VALUE 0
+ }
+ ALLOCATION_TIME {
+ H5D_ALLOC_TIME_INCR
+ }
+ }
+}
+}
diff --git a/tools/testfiles/h5dump-help.txt b/tools/testfiles/h5dump-help.txt
index 2a59a32..444dd97 100644
--- a/tools/testfiles/h5dump-help.txt
+++ b/tools/testfiles/h5dump-help.txt
@@ -59,7 +59,7 @@ usage: h5dump [OPTIONS] files
--------------- Subsetting Options ---------------
Subsetting is available by using the following options with a dataset
- attribute. Subsetting is done by selecting a hyperslab from the data.
+ option. Subsetting is done by selecting a hyperslab from the data.
Thus, the options mirror those for performing a hyperslab selection.
One of the START, COUNT, STRIDE, or BLOCK parameters are mandatory if you do subsetting.
The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in
diff --git a/tools/testfiles/tboot2A.ddl b/tools/testfiles/tboot2A.ddl
new file mode 100644
index 0000000..d83b92b
--- /dev/null
+++ b/tools/testfiles/tboot2A.ddl
@@ -0,0 +1,20 @@
+HDF5 "tfcontents2.h5" {
+SUPER_BLOCK {
+ SUPERBLOCK_VERSION 0
+ FREELIST_VERSION 0
+ SYMBOLTABLE_VERSION 0
+ OBJECTHEADER_VERSION 0
+ OFFSET_SIZE 8
+ LENGTH_SIZE 8
+ BTREE_RANK 16
+ BTREE_LEAF 4
+ ISTORE_K 32
+ FILE_SPACE_STRATEGY H5F_FILE_SPACE_ALL
+ FREE_SPACE_THRESHOLD 1
+ USER_BLOCK {
+ USERBLOCK_SIZE 0
+ }
+}
+GROUP "/" {
+}
+}
diff --git a/tools/testfiles/tboot2B.ddl b/tools/testfiles/tboot2B.ddl
new file mode 100644
index 0000000..d83b92b
--- /dev/null
+++ b/tools/testfiles/tboot2B.ddl
@@ -0,0 +1,20 @@
+HDF5 "tfcontents2.h5" {
+SUPER_BLOCK {
+ SUPERBLOCK_VERSION 0
+ FREELIST_VERSION 0
+ SYMBOLTABLE_VERSION 0
+ OBJECTHEADER_VERSION 0
+ OFFSET_SIZE 8
+ LENGTH_SIZE 8
+ BTREE_RANK 16
+ BTREE_LEAF 4
+ ISTORE_K 32
+ FILE_SPACE_STRATEGY H5F_FILE_SPACE_ALL
+ FREE_SPACE_THRESHOLD 1
+ USER_BLOCK {
+ USERBLOCK_SIZE 0
+ }
+}
+GROUP "/" {
+}
+}
diff --git a/tools/testfiles/tnofilename-with-packed-bits.ddl b/tools/testfiles/tnofilename-with-packed-bits.ddl
index 1ad1249..64a2880 100644
--- a/tools/testfiles/tnofilename-with-packed-bits.ddl
+++ b/tools/testfiles/tnofilename-with-packed-bits.ddl
@@ -59,7 +59,7 @@ usage: h5dump [OPTIONS] files
--------------- Subsetting Options ---------------
Subsetting is available by using the following options with a dataset
- attribute. Subsetting is done by selecting a hyperslab from the data.
+ option. Subsetting is done by selecting a hyperslab from the data.
Thus, the options mirror those for performing a hyperslab selection.
One of the START, COUNT, STRIDE, or BLOCK parameters are mandatory if you do subsetting.
The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in
diff --git a/tools/testfiles/tpbitsIncomplete.ddl b/tools/testfiles/tpbitsIncomplete.ddl
index 1468ad1..cdb1f91 100644
--- a/tools/testfiles/tpbitsIncomplete.ddl
+++ b/tools/testfiles/tpbitsIncomplete.ddl
@@ -59,7 +59,7 @@ usage: h5dump [OPTIONS] files
--------------- Subsetting Options ---------------
Subsetting is available by using the following options with a dataset
- attribute. Subsetting is done by selecting a hyperslab from the data.
+ option. Subsetting is done by selecting a hyperslab from the data.
Thus, the options mirror those for performing a hyperslab selection.
One of the START, COUNT, STRIDE, or BLOCK parameters are mandatory if you do subsetting.
The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in
diff --git a/tools/testfiles/tpbitsLengthExceeded.ddl b/tools/testfiles/tpbitsLengthExceeded.ddl
index 557f2a7..6d2492a 100644
--- a/tools/testfiles/tpbitsLengthExceeded.ddl
+++ b/tools/testfiles/tpbitsLengthExceeded.ddl
@@ -59,7 +59,7 @@ usage: h5dump [OPTIONS] files
--------------- Subsetting Options ---------------
Subsetting is available by using the following options with a dataset
- attribute. Subsetting is done by selecting a hyperslab from the data.
+ option. Subsetting is done by selecting a hyperslab from the data.
Thus, the options mirror those for performing a hyperslab selection.
One of the START, COUNT, STRIDE, or BLOCK parameters are mandatory if you do subsetting.
The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in
diff --git a/tools/testfiles/tpbitsLengthPositive.ddl b/tools/testfiles/tpbitsLengthPositive.ddl
index 342e4e8..4f56619 100644
--- a/tools/testfiles/tpbitsLengthPositive.ddl
+++ b/tools/testfiles/tpbitsLengthPositive.ddl
@@ -59,7 +59,7 @@ usage: h5dump [OPTIONS] files
--------------- Subsetting Options ---------------
Subsetting is available by using the following options with a dataset
- attribute. Subsetting is done by selecting a hyperslab from the data.
+ option. Subsetting is done by selecting a hyperslab from the data.
Thus, the options mirror those for performing a hyperslab selection.
One of the START, COUNT, STRIDE, or BLOCK parameters are mandatory if you do subsetting.
The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in
diff --git a/tools/testfiles/tpbitsMaxExceeded.ddl b/tools/testfiles/tpbitsMaxExceeded.ddl
index eb569d2..3432433 100644
--- a/tools/testfiles/tpbitsMaxExceeded.ddl
+++ b/tools/testfiles/tpbitsMaxExceeded.ddl
@@ -59,7 +59,7 @@ usage: h5dump [OPTIONS] files
--------------- Subsetting Options ---------------
Subsetting is available by using the following options with a dataset
- attribute. Subsetting is done by selecting a hyperslab from the data.
+ option. Subsetting is done by selecting a hyperslab from the data.
Thus, the options mirror those for performing a hyperslab selection.
One of the START, COUNT, STRIDE, or BLOCK parameters are mandatory if you do subsetting.
The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in
diff --git a/tools/testfiles/tpbitsOffsetExceeded.ddl b/tools/testfiles/tpbitsOffsetExceeded.ddl
index a00b561..e51a09e 100644
--- a/tools/testfiles/tpbitsOffsetExceeded.ddl
+++ b/tools/testfiles/tpbitsOffsetExceeded.ddl
@@ -59,7 +59,7 @@ usage: h5dump [OPTIONS] files
--------------- Subsetting Options ---------------
Subsetting is available by using the following options with a dataset
- attribute. Subsetting is done by selecting a hyperslab from the data.
+ option. Subsetting is done by selecting a hyperslab from the data.
Thus, the options mirror those for performing a hyperslab selection.
One of the START, COUNT, STRIDE, or BLOCK parameters are mandatory if you do subsetting.
The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in
diff --git a/tools/testfiles/tpbitsOffsetNegative.ddl b/tools/testfiles/tpbitsOffsetNegative.ddl
index aa6e79b..ba6e46d 100644
--- a/tools/testfiles/tpbitsOffsetNegative.ddl
+++ b/tools/testfiles/tpbitsOffsetNegative.ddl
@@ -59,7 +59,7 @@ usage: h5dump [OPTIONS] files
--------------- Subsetting Options ---------------
Subsetting is available by using the following options with a dataset
- attribute. Subsetting is done by selecting a hyperslab from the data.
+ option. Subsetting is done by selecting a hyperslab from the data.
Thus, the options mirror those for performing a hyperslab selection.
One of the START, COUNT, STRIDE, or BLOCK parameters are mandatory if you do subsetting.
The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in