mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-19 16:50:46 +08:00
[svn-r20713] Packed Bits Merge:
removed option defines and #ifdef/#endif refactored all printf to HDfprintf in h5dump.c formatted and indention improvements synched with 1.8 branch Tested: local linux
This commit is contained in:
parent
344352d88e
commit
907a5a1df0
@ -580,15 +580,6 @@ IF (WIN32 AND NOT CYGWIN)
|
||||
ENDIF (HDF5_ENABLE_THREADSAFE)
|
||||
ENDIF (WIN32 AND NOT CYGWIN)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Option to use PACKED BITS SUPPORT
|
||||
#-----------------------------------------------------------------------------
|
||||
OPTION (HDF5_USE_H5DUMP_PACKED_BITS "Use the PACKED BITS feature in h5dump" OFF)
|
||||
SET (H5_HAVE_H5DUMP_PACKED_BITS 0)
|
||||
IF (HDF5_USE_H5DUMP_PACKED_BITS)
|
||||
SET (H5_HAVE_H5DUMP_PACKED_BITS 1)
|
||||
ENDIF (HDF5_USE_H5DUMP_PACKED_BITS)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Add the HDF5 Library Target to the build
|
||||
#-----------------------------------------------------------------------------
|
||||
|
1
MANIFEST
1
MANIFEST
@ -2055,6 +2055,7 @@
|
||||
./config/cmake/ConfigureChecks.cmake
|
||||
./config/cmake/CPack.cmake
|
||||
./config/cmake/NSIS.template.in
|
||||
./config/cmake/NSIS.InstallOptions.ini.in
|
||||
./CMakeLists.txt
|
||||
./CTestConfig.cmake
|
||||
./c++/CMakeLists.txt
|
||||
|
@ -209,9 +209,6 @@
|
||||
/* Define to 1 if you have the <gpfs.h> header file. */
|
||||
#cmakedefine H5_HAVE_GPFS_H @H5_HAVE_GPFS_H@
|
||||
|
||||
/* Define if h5dump packed bits feature is enabled */
|
||||
#cmakedefine H5_HAVE_H5DUMP_PACKED_BITS @H5_HAVE_H5DUMP_PACKED_BITS@
|
||||
|
||||
/* Define if library will contain instrumentation to detect correct
|
||||
optimization operation */
|
||||
#cmakedefine H5_HAVE_INSTRUMENTED_LIBRARY @H5_HAVE_INSTRUMENTED_LIBRARY@
|
||||
|
37
config/cmake/NSIS.InstallOptions.ini.in
Normal file
37
config/cmake/NSIS.InstallOptions.ini.in
Normal file
@ -0,0 +1,37 @@
|
||||
[Settings]
|
||||
NumFields=5
|
||||
|
||||
[Field 1]
|
||||
Type=label
|
||||
Text=By default @CPACK_PACKAGE_INSTALL_DIRECTORY@ does not add its directory to the system PATH.
|
||||
Left=0
|
||||
Right=-1
|
||||
Top=0
|
||||
Bottom=20
|
||||
|
||||
[Field 2]
|
||||
Type=radiobutton
|
||||
Text=Do not add @CPACK_PACKAGE_NAME@ to the system PATH
|
||||
Left=0
|
||||
Right=-1
|
||||
Top=30
|
||||
Bottom=40
|
||||
State=1
|
||||
|
||||
[Field 3]
|
||||
Type=radiobutton
|
||||
Text=Add @CPACK_PACKAGE_NAME@ to the system PATH for all users
|
||||
Left=0
|
||||
Right=-1
|
||||
Top=40
|
||||
Bottom=50
|
||||
State=0
|
||||
|
||||
[Field 4]
|
||||
Type=radiobutton
|
||||
Text=Add @CPACK_PACKAGE_NAME@ to the system PATH for current user
|
||||
Left=0
|
||||
Right=-1
|
||||
Top=50
|
||||
Bottom=60
|
||||
State=0
|
@ -24,8 +24,6 @@ SET (HDF5_ENABLE_SZIP_SUPPORT ON CACHE BOOL "Use SZip Filter" FORCE)
|
||||
|
||||
SET (HDF5_ENABLE_SZIP_ENCODING ON CACHE BOOL "Use SZip Encoding" FORCE)
|
||||
|
||||
SET (HDF5_USE_H5DUMP_PACKED_BITS ON CACHE BOOL "Use the PACKED BITS feature in h5dump" FORCE)
|
||||
|
||||
SET (HDF5_ENABLE_HSIZET ON CACHE BOOL "Enable datasets larger than memory" FORCE)
|
||||
|
||||
SET (HDF5_ENABLE_DEPRECATED_SYMBOLS ON CACHE BOOL "Enable deprecated public API symbols" FORCE)
|
||||
|
@ -24,8 +24,6 @@ SET (HDF5_ENABLE_SZIP_SUPPORT ON CACHE BOOL "Use SZip Filter" FORCE)
|
||||
|
||||
SET (HDF5_ENABLE_SZIP_ENCODING ON CACHE BOOL "Use SZip Encoding" FORCE)
|
||||
|
||||
SET (HDF5_USE_H5DUMP_PACKED_BITS ON CACHE BOOL "Use the PACKED BITS feature in h5dump" FORCE)
|
||||
|
||||
SET (HDF5_ENABLE_HSIZET ON CACHE BOOL "Enable datasets larger than memory" FORCE)
|
||||
|
||||
SET (HDF5_ENABLE_DEPRECATED_SYMBOLS ON CACHE BOOL "Enable deprecated public API symbols" FORCE)
|
||||
|
@ -124,7 +124,6 @@ Notes: This short instruction is written for users who want to quickly build
|
||||
SET (HDF5_ENABLE_SZIP_ENCODING ON CACHE BOOL "Use SZip Encoding" FORCE)
|
||||
SET (HDF5_ENABLE_SZIP_SUPPORT ON CACHE BOOL "Use SZip Filter" FORCE)
|
||||
SET (HDF5_ENABLE_Z_LIB_SUPPORT ON CACHE BOOL "Enable Zlib Filters" FORCE)
|
||||
SET (HDF5_USE_H5DUMP_PACKED_BITS ON CACHE BOOL "Use the PACKED BITS feature in h5dump" FORCE)
|
||||
SET (HDF5_ENABLE_COVERAGE OFF CACHE BOOL "Enable code coverage for Libraries and Programs" FORCE)
|
||||
|
||||
2. Configure the cache settings
|
||||
|
@ -399,78 +399,75 @@ IF (BUILD_TESTING)
|
||||
ENDIF (WIN32 AND NOT CYGWIN)
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
# Special option for Packed Bits
|
||||
# Packed Bits
|
||||
# --------------------------------------------------------------------
|
||||
IF (HDF5_USE_H5DUMP_PACKED_BITS)
|
||||
#-- Copy all the HDF5 files from the test directory into the source directory
|
||||
SET (HDF5_REFERENCE_PBITS
|
||||
tnofilename-with-packed-bits.ddl
|
||||
tpbitsArray.ddl
|
||||
tpbitsCompound.ddl
|
||||
tpbitsIncomplete.ddl
|
||||
tpbitsLengthExceeded.ddl
|
||||
tpbitsCharLengthExceeded.ddl
|
||||
tpbitsIntLengthExceeded.ddl
|
||||
tpbitsLongLengthExceeded.ddl
|
||||
tpbitsLengthPositive.ddl
|
||||
tpbitsMax.ddl
|
||||
tpbitsMaxExceeded.ddl
|
||||
tpbitsOffsetExceeded.ddl
|
||||
tpbitsCharOffsetExceeded.ddl
|
||||
tpbitsIntOffsetExceeded.ddl
|
||||
tpbitsLongOffsetExceeded.ddl
|
||||
tpbitsOffsetNegative.ddl
|
||||
tpbitsOverlapped.ddl
|
||||
tpbitsSigned.ddl
|
||||
tpbitsUnsigned.ddl
|
||||
tpbitsSignedInt.ddl
|
||||
tpbitsUnsignedInt.ddl
|
||||
tpbitsSignedLong.ddl
|
||||
tpbitsUnsignedLong.ddl
|
||||
tpbitsSignedLongLong.ddl
|
||||
tpbitsUnsignedLongLong.ddl
|
||||
tpbitsSignedWhole.ddl
|
||||
tpbitsUnsignedWhole.ddl
|
||||
tpbitsSignedIntWhole.ddl
|
||||
tpbitsUnsignedIntWhole.ddl
|
||||
tpbitsSignedLongWhole.ddl
|
||||
tpbitsUnsignedLongWhole.ddl
|
||||
tpbitsSignedLongLongWhole.ddl
|
||||
tpbitsUnsignedLongLongWhole.ddl
|
||||
tpbitsSignedLongLongWhole1.ddl
|
||||
tpbitsUnsignedLongLongWhole1.ddl
|
||||
tpbitsSignedLongLongWhole63.ddl
|
||||
tpbitsUnsignedLongLongWhole63.ddl
|
||||
tpbitsSigned4.ddl
|
||||
tpbitsUnsigned4.ddl
|
||||
tpbitsSignedInt8.ddl
|
||||
tpbitsUnsignedInt8.ddl
|
||||
tpbitsSignedLong16.ddl
|
||||
tpbitsUnsignedLong16.ddl
|
||||
tpbitsSignedLongLong32.ddl
|
||||
tpbitsUnsignedLongLong32.ddl
|
||||
tpbitsSigned2.ddl
|
||||
tpbitsUnsigned2.ddl
|
||||
tpbitsSignedInt4.ddl
|
||||
tpbitsUnsignedInt4.ddl
|
||||
tpbitsSignedLong8.ddl
|
||||
tpbitsUnsignedLong8.ddl
|
||||
tpbitsSignedLongLong16.ddl
|
||||
tpbitsUnsignedLongLong16.ddl
|
||||
#-- Copy all the HDF5 files from the test directory into the source directory
|
||||
SET (HDF5_REFERENCE_PBITS
|
||||
tnofilename-with-packed-bits.ddl
|
||||
tpbitsArray.ddl
|
||||
tpbitsCompound.ddl
|
||||
tpbitsIncomplete.ddl
|
||||
tpbitsLengthExceeded.ddl
|
||||
tpbitsCharLengthExceeded.ddl
|
||||
tpbitsIntLengthExceeded.ddl
|
||||
tpbitsLongLengthExceeded.ddl
|
||||
tpbitsLengthPositive.ddl
|
||||
tpbitsMax.ddl
|
||||
tpbitsMaxExceeded.ddl
|
||||
tpbitsOffsetExceeded.ddl
|
||||
tpbitsCharOffsetExceeded.ddl
|
||||
tpbitsIntOffsetExceeded.ddl
|
||||
tpbitsLongOffsetExceeded.ddl
|
||||
tpbitsOffsetNegative.ddl
|
||||
tpbitsOverlapped.ddl
|
||||
tpbitsSigned.ddl
|
||||
tpbitsUnsigned.ddl
|
||||
tpbitsSignedInt.ddl
|
||||
tpbitsUnsignedInt.ddl
|
||||
tpbitsSignedLong.ddl
|
||||
tpbitsUnsignedLong.ddl
|
||||
tpbitsSignedLongLong.ddl
|
||||
tpbitsUnsignedLongLong.ddl
|
||||
tpbitsSignedWhole.ddl
|
||||
tpbitsUnsignedWhole.ddl
|
||||
tpbitsSignedIntWhole.ddl
|
||||
tpbitsUnsignedIntWhole.ddl
|
||||
tpbitsSignedLongWhole.ddl
|
||||
tpbitsUnsignedLongWhole.ddl
|
||||
tpbitsSignedLongLongWhole.ddl
|
||||
tpbitsUnsignedLongLongWhole.ddl
|
||||
tpbitsSignedLongLongWhole1.ddl
|
||||
tpbitsUnsignedLongLongWhole1.ddl
|
||||
tpbitsSignedLongLongWhole63.ddl
|
||||
tpbitsUnsignedLongLongWhole63.ddl
|
||||
tpbitsSigned4.ddl
|
||||
tpbitsUnsigned4.ddl
|
||||
tpbitsSignedInt8.ddl
|
||||
tpbitsUnsignedInt8.ddl
|
||||
tpbitsSignedLong16.ddl
|
||||
tpbitsUnsignedLong16.ddl
|
||||
tpbitsSignedLongLong32.ddl
|
||||
tpbitsUnsignedLongLong32.ddl
|
||||
tpbitsSigned2.ddl
|
||||
tpbitsUnsigned2.ddl
|
||||
tpbitsSignedInt4.ddl
|
||||
tpbitsUnsignedInt4.ddl
|
||||
tpbitsSignedLong8.ddl
|
||||
tpbitsUnsignedLong8.ddl
|
||||
tpbitsSignedLongLong16.ddl
|
||||
tpbitsUnsignedLongLong16.ddl
|
||||
)
|
||||
|
||||
FOREACH (ddl_pbits ${HDF5_REFERENCE_PBITS})
|
||||
SET (ddldest "${PROJECT_BINARY_DIR}/${ddl_pbits}")
|
||||
#MESSAGE (STATUS " Translating ${ddl_pbits}")
|
||||
ADD_CUSTOM_COMMAND (
|
||||
TARGET h5dump
|
||||
POST_BUILD
|
||||
COMMAND ${XLATE_UTILITY}
|
||||
ARGS ${HDF5_TOOLS_SRC_DIR}/testfiles/${ddl_pbits} ${ddldest} -l3
|
||||
)
|
||||
|
||||
FOREACH (ddl_pbits ${HDF5_REFERENCE_PBITS})
|
||||
SET (ddldest "${PROJECT_BINARY_DIR}/${ddl_pbits}")
|
||||
#MESSAGE (STATUS " Translating ${ddl_pbits}")
|
||||
ADD_CUSTOM_COMMAND (
|
||||
TARGET h5dump
|
||||
POST_BUILD
|
||||
COMMAND ${XLATE_UTILITY}
|
||||
ARGS ${HDF5_TOOLS_SRC_DIR}/testfiles/${ddl_pbits} ${ddldest} -l3
|
||||
)
|
||||
ENDFOREACH (ddl_pbits ${HDF5_REFERENCE_PBITS})
|
||||
|
||||
ENDIF (HDF5_USE_H5DUMP_PACKED_BITS)
|
||||
ENDFOREACH (ddl_pbits ${HDF5_REFERENCE_PBITS})
|
||||
|
||||
##############################################################################
|
||||
##############################################################################
|
||||
@ -608,11 +605,6 @@ IF (BUILD_TESTING)
|
||||
SET (USE_FILTER_NBIT H5_HAVE_FILTER_NBIT)
|
||||
SET (USE_FILTER_SCALEOFFSET H5_HAVE_FILTER_SCALEOFFSET)
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
# Determine if H5dump packed bits feature is included
|
||||
# --------------------------------------------------------------------
|
||||
SET (USE_PACKED_BITS HDF5_USE_H5DUMP_PACKED_BITS)
|
||||
|
||||
##############################################################################
|
||||
##############################################################################
|
||||
### T H E T E S T S ###
|
||||
@ -974,14 +966,7 @@ IF (BUILD_TESTING)
|
||||
# test printing characters in ASCII instead of decimal
|
||||
ADD_H5_TEST (tchar1 0 -r tchar.h5)
|
||||
|
||||
# test failure handling
|
||||
IF (NOT HDF5_USE_H5DUMP_PACKED_BITS)
|
||||
# Missing file name
|
||||
ADD_H5_TEST (tnofilename 1)
|
||||
ENDIF (NOT HDF5_USE_H5DUMP_PACKED_BITS)
|
||||
|
||||
# rev. 2004
|
||||
|
||||
# tests for super block
|
||||
ADD_H5_TEST (tboot1 0 -H -B -d dset tfcontents1.h5)
|
||||
ADD_H5_TEST (tboot2 0 -B tfcontents2.h5)
|
||||
@ -1200,203 +1185,201 @@ IF (BUILD_TESTING)
|
||||
ADD_H5_TEST (tall-6 0 -y -o data -d /g1/g1.1/dset1.1.1 tall.h5)
|
||||
|
||||
####### test for dataset packed bits ######
|
||||
IF (HDF5_USE_H5DUMP_PACKED_BITS)
|
||||
# Remove any output file left over from previous test run
|
||||
ADD_TEST (
|
||||
NAME H5DUMP_PACKED_BITS-clearall-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove
|
||||
tnofilename-with-packed-bits.out
|
||||
tnofilename-with-packed-bits.out.err
|
||||
tpbitsArray.out
|
||||
tpbitsArray.out.err
|
||||
tpbitsCompound.out
|
||||
tpbitsCompound.out.err
|
||||
tpbitsIncomplete.out
|
||||
tpbitsIncomplete.out.err
|
||||
tpbitsLengthExceeded.out
|
||||
tpbitsLengthExceeded.out.err
|
||||
tpbitsCharLengthExceeded.out
|
||||
tpbitsCharLengthExceeded.out.err
|
||||
tpbitsIntLengthExceeded.out
|
||||
tpbitsIntLengthExceeded.out.err
|
||||
tpbitsLongLengthExceeded.out
|
||||
tpbitsLongLengthExceeded.out.err
|
||||
tpbitsLengthPositive.out
|
||||
tpbitsLengthPositive.out.err
|
||||
tpbitsMax.out
|
||||
tpbitsMax.out.err
|
||||
tpbitsMaxExceeded.out
|
||||
tpbitsMaxExceeded.out.err
|
||||
tpbitsOffsetExceeded.out
|
||||
tpbitsOffsetExceeded.out.err
|
||||
tpbitsCharOffsetExceeded.out
|
||||
tpbitsCharOffsetExceeded.out.err
|
||||
tpbitsIntOffsetExceeded.out
|
||||
tpbitsIntOffsetExceeded.out.err
|
||||
tpbitsLongOffsetExceeded.out
|
||||
tpbitsLongOffsetExceeded.out.err
|
||||
tpbitsOffsetNegative.out
|
||||
tpbitsOffsetNegative.out.err
|
||||
tpbitsOverlapped.out
|
||||
tpbitsOverlapped.out.err
|
||||
tpbitsSigned.out
|
||||
tpbitsSigned.out.err
|
||||
tpbitsUnsigned.out
|
||||
tpbitsUnsigned.out.err
|
||||
tpbitsSignedInt.out
|
||||
tpbitsSignedInt.out.err
|
||||
tpbitsUnsignedInt.out
|
||||
tpbitsUnsignedInt.out.err
|
||||
tpbitsSignedLong.out
|
||||
tpbitsSignedLong.out.err
|
||||
tpbitsUnsignedLong.out
|
||||
tpbitsUnsignedLong.out.err
|
||||
tpbitsSignedLongLong.out
|
||||
tpbitsSignedLongLong.out.err
|
||||
tpbitsUnsignedLongLong.out
|
||||
tpbitsUnsignedLongLong.out.err
|
||||
tpbitsSignedWhole.out
|
||||
tpbitsSignedWhole.out.err
|
||||
tpbitsUnsignedWhole.out
|
||||
tpbitsUnsignedWhole.out.err
|
||||
tpbitsSignedIntWhole.out
|
||||
tpbitsSignedIntWhole.out.err
|
||||
tpbitsUnsignedIntWhole.out
|
||||
tpbitsUnsignedIntWhole.out.err
|
||||
tpbitsSignedLongWhole.out
|
||||
tpbitsSignedLongWhole.out.err
|
||||
tpbitsUnsignedLongWhole.out
|
||||
tpbitsUnsignedLongWhole.out.err
|
||||
tpbitsSignedLongLongWhole.out
|
||||
tpbitsSignedLongLongWhole.out.err
|
||||
tpbitsUnsignedLongLongWhole.out
|
||||
tpbitsUnsignedLongLongWhole.out.err
|
||||
tpbitsSignedLongLongWhole1.out
|
||||
tpbitsSignedLongLongWhole1.out.err
|
||||
tpbitsUnsignedLongLongWhole1.out
|
||||
tpbitsUnsignedLongLongWhole1.out.err
|
||||
tpbitsSignedLongLongWhole63.out
|
||||
tpbitsSignedLongLongWhole63.out.err
|
||||
tpbitsUnsignedLongLongWhole63.out
|
||||
tpbitsUnsignedLongLongWhole63.out.err
|
||||
tpbitsSigned4.out
|
||||
tpbitsSigned4.out.err
|
||||
tpbitsUnsigned4.out
|
||||
tpbitsUnsigned4.out.err
|
||||
tpbitsSignedInt8.out
|
||||
tpbitsSignedInt8.out.err
|
||||
tpbitsUnsignedInt8.out
|
||||
tpbitsUnsignedInt8.out.err
|
||||
tpbitsSignedLong16.out
|
||||
tpbitsSignedLong16.out.err
|
||||
tpbitsUnsignedLong16.out
|
||||
tpbitsUnsignedLong16.out.err
|
||||
tpbitsSignedLongLong32.out
|
||||
tpbitsSignedLongLong32.out.err
|
||||
tpbitsUnsignedLongLong32.out
|
||||
tpbitsUnsignedLongLong32.out.err
|
||||
tpbitsSigned2.out
|
||||
tpbitsSigned2.out.err
|
||||
tpbitsUnsigned2.out
|
||||
tpbitsUnsigned2.out.err
|
||||
tpbitsSignedInt4.out
|
||||
tpbitsSignedInt4.out.err
|
||||
tpbitsUnsignedInt4.out
|
||||
tpbitsUnsignedInt4.out.err
|
||||
tpbitsSignedLong8.out
|
||||
tpbitsSignedLong8.out.err
|
||||
tpbitsUnsignedLong8.out
|
||||
tpbitsUnsignedLong8.out.err
|
||||
tpbitsSignedLongLong16.out
|
||||
tpbitsSignedLongLong16.out.err
|
||||
tpbitsUnsignedLongLong16.out
|
||||
tpbitsUnsignedLongLong16.out.err
|
||||
)
|
||||
IF (NOT "${last_test}" STREQUAL "")
|
||||
SET_TESTS_PROPERTIES (H5DUMP_PACKED_BITS-clearall-objects PROPERTIES DEPENDS ${last_test})
|
||||
ENDIF (NOT "${last_test}" STREQUAL "")
|
||||
SET (last_test "H5DUMP_PACKED_BITS-clearall-objects")
|
||||
# Remove any output file left over from previous test run
|
||||
ADD_TEST (
|
||||
NAME H5DUMP_PACKED_BITS-clearall-objects
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E remove
|
||||
tnofilename-with-packed-bits.out
|
||||
tnofilename-with-packed-bits.out.err
|
||||
tpbitsArray.out
|
||||
tpbitsArray.out.err
|
||||
tpbitsCompound.out
|
||||
tpbitsCompound.out.err
|
||||
tpbitsIncomplete.out
|
||||
tpbitsIncomplete.out.err
|
||||
tpbitsLengthExceeded.out
|
||||
tpbitsLengthExceeded.out.err
|
||||
tpbitsCharLengthExceeded.out
|
||||
tpbitsCharLengthExceeded.out.err
|
||||
tpbitsIntLengthExceeded.out
|
||||
tpbitsIntLengthExceeded.out.err
|
||||
tpbitsLongLengthExceeded.out
|
||||
tpbitsLongLengthExceeded.out.err
|
||||
tpbitsLengthPositive.out
|
||||
tpbitsLengthPositive.out.err
|
||||
tpbitsMax.out
|
||||
tpbitsMax.out.err
|
||||
tpbitsMaxExceeded.out
|
||||
tpbitsMaxExceeded.out.err
|
||||
tpbitsOffsetExceeded.out
|
||||
tpbitsOffsetExceeded.out.err
|
||||
tpbitsCharOffsetExceeded.out
|
||||
tpbitsCharOffsetExceeded.out.err
|
||||
tpbitsIntOffsetExceeded.out
|
||||
tpbitsIntOffsetExceeded.out.err
|
||||
tpbitsLongOffsetExceeded.out
|
||||
tpbitsLongOffsetExceeded.out.err
|
||||
tpbitsOffsetNegative.out
|
||||
tpbitsOffsetNegative.out.err
|
||||
tpbitsOverlapped.out
|
||||
tpbitsOverlapped.out.err
|
||||
tpbitsSigned.out
|
||||
tpbitsSigned.out.err
|
||||
tpbitsUnsigned.out
|
||||
tpbitsUnsigned.out.err
|
||||
tpbitsSignedInt.out
|
||||
tpbitsSignedInt.out.err
|
||||
tpbitsUnsignedInt.out
|
||||
tpbitsUnsignedInt.out.err
|
||||
tpbitsSignedLong.out
|
||||
tpbitsSignedLong.out.err
|
||||
tpbitsUnsignedLong.out
|
||||
tpbitsUnsignedLong.out.err
|
||||
tpbitsSignedLongLong.out
|
||||
tpbitsSignedLongLong.out.err
|
||||
tpbitsUnsignedLongLong.out
|
||||
tpbitsUnsignedLongLong.out.err
|
||||
tpbitsSignedWhole.out
|
||||
tpbitsSignedWhole.out.err
|
||||
tpbitsUnsignedWhole.out
|
||||
tpbitsUnsignedWhole.out.err
|
||||
tpbitsSignedIntWhole.out
|
||||
tpbitsSignedIntWhole.out.err
|
||||
tpbitsUnsignedIntWhole.out
|
||||
tpbitsUnsignedIntWhole.out.err
|
||||
tpbitsSignedLongWhole.out
|
||||
tpbitsSignedLongWhole.out.err
|
||||
tpbitsUnsignedLongWhole.out
|
||||
tpbitsUnsignedLongWhole.out.err
|
||||
tpbitsSignedLongLongWhole.out
|
||||
tpbitsSignedLongLongWhole.out.err
|
||||
tpbitsUnsignedLongLongWhole.out
|
||||
tpbitsUnsignedLongLongWhole.out.err
|
||||
tpbitsSignedLongLongWhole1.out
|
||||
tpbitsSignedLongLongWhole1.out.err
|
||||
tpbitsUnsignedLongLongWhole1.out
|
||||
tpbitsUnsignedLongLongWhole1.out.err
|
||||
tpbitsSignedLongLongWhole63.out
|
||||
tpbitsSignedLongLongWhole63.out.err
|
||||
tpbitsUnsignedLongLongWhole63.out
|
||||
tpbitsUnsignedLongLongWhole63.out.err
|
||||
tpbitsSigned4.out
|
||||
tpbitsSigned4.out.err
|
||||
tpbitsUnsigned4.out
|
||||
tpbitsUnsigned4.out.err
|
||||
tpbitsSignedInt8.out
|
||||
tpbitsSignedInt8.out.err
|
||||
tpbitsUnsignedInt8.out
|
||||
tpbitsUnsignedInt8.out.err
|
||||
tpbitsSignedLong16.out
|
||||
tpbitsSignedLong16.out.err
|
||||
tpbitsUnsignedLong16.out
|
||||
tpbitsUnsignedLong16.out.err
|
||||
tpbitsSignedLongLong32.out
|
||||
tpbitsSignedLongLong32.out.err
|
||||
tpbitsUnsignedLongLong32.out
|
||||
tpbitsUnsignedLongLong32.out.err
|
||||
tpbitsSigned2.out
|
||||
tpbitsSigned2.out.err
|
||||
tpbitsUnsigned2.out
|
||||
tpbitsUnsigned2.out.err
|
||||
tpbitsSignedInt4.out
|
||||
tpbitsSignedInt4.out.err
|
||||
tpbitsUnsignedInt4.out
|
||||
tpbitsUnsignedInt4.out.err
|
||||
tpbitsSignedLong8.out
|
||||
tpbitsSignedLong8.out.err
|
||||
tpbitsUnsignedLong8.out
|
||||
tpbitsUnsignedLong8.out.err
|
||||
tpbitsSignedLongLong16.out
|
||||
tpbitsSignedLongLong16.out.err
|
||||
tpbitsUnsignedLongLong16.out
|
||||
tpbitsUnsignedLongLong16.out.err
|
||||
)
|
||||
IF (NOT "${last_test}" STREQUAL "")
|
||||
SET_TESTS_PROPERTIES (H5DUMP_PACKED_BITS-clearall-objects PROPERTIES DEPENDS ${last_test})
|
||||
ENDIF (NOT "${last_test}" STREQUAL "")
|
||||
SET (last_test "H5DUMP_PACKED_BITS-clearall-objects")
|
||||
|
||||
# test failure handling
|
||||
# Missing file name
|
||||
ADD_H5_TEST (tnofilename-with-packed-bits 1)
|
||||
# Limits:
|
||||
# Maximum number of packed bits is 8 (for now).
|
||||
# Maximum integer size is 8*sizeof(long long).
|
||||
# Maximun Offset is Maximum size - 1.
|
||||
# Maximum Offset+Length is Maximum size.
|
||||
# Tests:
|
||||
# Normal operation on both signed and unsigned int datasets.
|
||||
# Sanity check
|
||||
# Their rawdata output should be the same.
|
||||
ADD_H5_TEST (tpbitsSignedWhole 0 -d /DS08BITS -M 0,8 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsUnsignedWhole 0 -d /DU08BITS -M 0,8 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsSignedIntWhole 0 -d /DS16BITS -M 0,16 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsUnsignedIntWhole 0 -d /DU16BITS -M 0,16 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsSignedLongWhole 0 -d /DS32BITS -M 0,32 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsUnsignedLongWhole 0 -d /DU32BITS -M 0,32 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsSignedLongLongWhole 0 -d /DS64BITS -M 0,64 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsUnsignedLongLongWhole 0 -d /DU64BITS -M 0,64 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsSignedLongLongWhole63 0 -d /DS64BITS -M 0,63 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsUnsignedLongLongWhole63 0 -d /DU64BITS -M 0,63 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsSignedLongLongWhole1 0 -d /DS64BITS -M 1,63 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsUnsignedLongLongWhole1 0 -d /DU64BITS -M 1,63 packedbits.h5)
|
||||
# Half sections
|
||||
ADD_H5_TEST (tpbitsSigned4 0 -d /DS08BITS -M 0,4,4,4 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsUnsigned4 0 -d /DU08BITS -M 0,4,4,4 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsSignedInt8 0 -d /DS16BITS -M 0,8,8,8 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsUnsignedInt8 0 -d /DU16BITS -M 0,8,8,8 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsSignedLong16 0 -d /DS32BITS -M 0,16,16,16 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsUnsignedLong16 0 -d /DU32BITS -M 0,16,16,16 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsSignedLongLong32 0 -d /DS64BITS -M 0,32,32,32 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsUnsignedLongLong32 0 -d /DU64BITS -M 0,32,32,32 packedbits.h5)
|
||||
# Quarter sections
|
||||
ADD_H5_TEST (tpbitsSigned2 0 -d /DS08BITS -M 0,2,2,2,4,2,6,2 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsUnsigned2 0 -d /DU08BITS -M 0,2,2,2,4,2,6,2 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsSignedInt4 0 -d /DS16BITS -M 0,4,4,4,8,4,12,4 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsUnsignedInt4 0 -d /DU16BITS -M 0,4,4,4,8,4,12,4 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsSignedLong8 0 -d /DS32BITS -M 0,8,8,8,16,8,24,8 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsUnsignedLong8 0 -d /DU32BITS -M 0,8,8,8,16,8,24,8 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsSignedLongLong16 0 -d /DS64BITS -M 0,16,16,16,32,16,48,16 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsUnsignedLongLong16 0 -d /DU64BITS -M 0,16,16,16,32,16,48,16 packedbits.h5)
|
||||
# Begin and End
|
||||
ADD_H5_TEST (tpbitsSigned 0 -d /DS08BITS -M 0,2,2,6 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsUnsigned 0 -d /DU08BITS -M 0,2,2,6 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsSignedInt 0 -d /DS16BITS -M 0,2,10,6 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsUnsignedInt 0 -d /DU16BITS -M 0,2,10,6 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsSignedLong 0 -d /DS32BITS -M 0,2,26,6 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsUnsignedLong 0 -d /DU32BITS -M 0,2,26,6 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsSignedLongLong 0 -d /DS64BITS -M 0,2,58,6 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsUnsignedLongLong 0 -d /DU64BITS -M 0,2,58,6 packedbits.h5)
|
||||
# Overlapped packed bits.
|
||||
ADD_H5_TEST (tpbitsOverlapped 0 -d /DS08BITS -M 0,1,1,1,2,1,0,3 packedbits.h5)
|
||||
# Maximum number of packed bits.
|
||||
ADD_H5_TEST (tpbitsMax 0 -d /DS08BITS -M 0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1 packedbits.h5)
|
||||
# Compound type.
|
||||
ADD_H5_TEST (tpbitsCompound 0 -d /dset1 -M 0,1,1,1 tcompound.h5)
|
||||
# Array type.
|
||||
ADD_H5_TEST (tpbitsArray 0 -d /Dataset1 -M 0,1,1,1 tarray1.h5)
|
||||
# Test Error handling.
|
||||
# Too many packed bits requested. Max is 8 for now.
|
||||
ADD_H5_TEST (tpbitsMaxExceeded 1 -d /DS08BITS -M 0,1,0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1 packedbits.h5)
|
||||
# Offset too large. Max is 8*sizeof(long long.
|
||||
ADD_H5_TEST (tpbitsOffsetExceeded 1 -d /DS08BITS -M 64,1 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsCharOffsetExceeded 0 -d /DS08BITS -M 8,1 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsIntOffsetExceeded 0 -d /DS16BITS -M 16,1 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsLongOffsetExceeded 0 -d /DS32BITS -M 32,1 packedbits.h5)
|
||||
# Bad offset, must not be negative.
|
||||
ADD_H5_TEST (tpbitsOffsetNegative 1 -d /DS08BITS -M -1,1 packedbits.h5)
|
||||
# Bad length, must not be positive.
|
||||
ADD_H5_TEST (tpbitsLengthPositive 1 -d /DS08BITS -M 4,0 packedbits.h5)
|
||||
# Offset+Length is too large. Max is 8*sizeof(long long).
|
||||
ADD_H5_TEST (tpbitsLengthExceeded 1 -d /DS08BITS -M 37,28 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsCharLengthExceeded 0 -d /DS08BITS -M 2,7 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsIntLengthExceeded 0 -d /DS16BITS -M 10,7 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsLongLengthExceeded 0 -d /DS32BITS -M 26,7 packedbits.h5)
|
||||
# Incomplete pair of packed bits request.
|
||||
ADD_H5_TEST (tpbitsIncomplete 1 -d /DS08BITS -M 0,2,2,1,0,2,2, packedbits.h5)
|
||||
ENDIF (HDF5_USE_H5DUMP_PACKED_BITS)
|
||||
# test failure handling
|
||||
# Missing file name
|
||||
ADD_H5_TEST (tnofilename-with-packed-bits 1)
|
||||
# Limits:
|
||||
# Maximum number of packed bits is 8 (for now).
|
||||
# Maximum integer size is 8*sizeof(long long).
|
||||
# Maximun Offset is Maximum size - 1.
|
||||
# Maximum Offset+Length is Maximum size.
|
||||
# Tests:
|
||||
# Normal operation on both signed and unsigned int datasets.
|
||||
# Sanity check
|
||||
# Their rawdata output should be the same.
|
||||
ADD_H5_TEST (tpbitsSignedWhole 0 -d /DS08BITS -M 0,8 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsUnsignedWhole 0 -d /DU08BITS -M 0,8 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsSignedIntWhole 0 -d /DS16BITS -M 0,16 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsUnsignedIntWhole 0 -d /DU16BITS -M 0,16 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsSignedLongWhole 0 -d /DS32BITS -M 0,32 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsUnsignedLongWhole 0 -d /DU32BITS -M 0,32 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsSignedLongLongWhole 0 -d /DS64BITS -M 0,64 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsUnsignedLongLongWhole 0 -d /DU64BITS -M 0,64 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsSignedLongLongWhole63 0 -d /DS64BITS -M 0,63 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsUnsignedLongLongWhole63 0 -d /DU64BITS -M 0,63 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsSignedLongLongWhole1 0 -d /DS64BITS -M 1,63 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsUnsignedLongLongWhole1 0 -d /DU64BITS -M 1,63 packedbits.h5)
|
||||
# Half sections
|
||||
ADD_H5_TEST (tpbitsSigned4 0 -d /DS08BITS -M 0,4,4,4 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsUnsigned4 0 -d /DU08BITS -M 0,4,4,4 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsSignedInt8 0 -d /DS16BITS -M 0,8,8,8 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsUnsignedInt8 0 -d /DU16BITS -M 0,8,8,8 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsSignedLong16 0 -d /DS32BITS -M 0,16,16,16 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsUnsignedLong16 0 -d /DU32BITS -M 0,16,16,16 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsSignedLongLong32 0 -d /DS64BITS -M 0,32,32,32 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsUnsignedLongLong32 0 -d /DU64BITS -M 0,32,32,32 packedbits.h5)
|
||||
# Quarter sections
|
||||
ADD_H5_TEST (tpbitsSigned2 0 -d /DS08BITS -M 0,2,2,2,4,2,6,2 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsUnsigned2 0 -d /DU08BITS -M 0,2,2,2,4,2,6,2 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsSignedInt4 0 -d /DS16BITS -M 0,4,4,4,8,4,12,4 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsUnsignedInt4 0 -d /DU16BITS -M 0,4,4,4,8,4,12,4 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsSignedLong8 0 -d /DS32BITS -M 0,8,8,8,16,8,24,8 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsUnsignedLong8 0 -d /DU32BITS -M 0,8,8,8,16,8,24,8 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsSignedLongLong16 0 -d /DS64BITS -M 0,16,16,16,32,16,48,16 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsUnsignedLongLong16 0 -d /DU64BITS -M 0,16,16,16,32,16,48,16 packedbits.h5)
|
||||
# Begin and End
|
||||
ADD_H5_TEST (tpbitsSigned 0 -d /DS08BITS -M 0,2,2,6 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsUnsigned 0 -d /DU08BITS -M 0,2,2,6 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsSignedInt 0 -d /DS16BITS -M 0,2,10,6 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsUnsignedInt 0 -d /DU16BITS -M 0,2,10,6 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsSignedLong 0 -d /DS32BITS -M 0,2,26,6 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsUnsignedLong 0 -d /DU32BITS -M 0,2,26,6 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsSignedLongLong 0 -d /DS64BITS -M 0,2,58,6 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsUnsignedLongLong 0 -d /DU64BITS -M 0,2,58,6 packedbits.h5)
|
||||
# Overlapped packed bits.
|
||||
ADD_H5_TEST (tpbitsOverlapped 0 -d /DS08BITS -M 0,1,1,1,2,1,0,3 packedbits.h5)
|
||||
# Maximum number of packed bits.
|
||||
ADD_H5_TEST (tpbitsMax 0 -d /DS08BITS -M 0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1 packedbits.h5)
|
||||
# Compound type.
|
||||
ADD_H5_TEST (tpbitsCompound 0 -d /dset1 -M 0,1,1,1 tcompound.h5)
|
||||
# Array type.
|
||||
ADD_H5_TEST (tpbitsArray 0 -d /Dataset1 -M 0,1,1,1 tarray1.h5)
|
||||
# Test Error handling.
|
||||
# Too many packed bits requested. Max is 8 for now.
|
||||
ADD_H5_TEST (tpbitsMaxExceeded 1 -d /DS08BITS -M 0,1,0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1 packedbits.h5)
|
||||
# Offset too large. Max is 8*sizeof(long long.
|
||||
ADD_H5_TEST (tpbitsOffsetExceeded 1 -d /DS08BITS -M 64,1 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsCharOffsetExceeded 0 -d /DS08BITS -M 8,1 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsIntOffsetExceeded 0 -d /DS16BITS -M 16,1 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsLongOffsetExceeded 0 -d /DS32BITS -M 32,1 packedbits.h5)
|
||||
# Bad offset, must not be negative.
|
||||
ADD_H5_TEST (tpbitsOffsetNegative 1 -d /DS08BITS -M -1,1 packedbits.h5)
|
||||
# Bad length, must not be positive.
|
||||
ADD_H5_TEST (tpbitsLengthPositive 1 -d /DS08BITS -M 4,0 packedbits.h5)
|
||||
# Offset+Length is too large. Max is 8*sizeof(long long).
|
||||
ADD_H5_TEST (tpbitsLengthExceeded 1 -d /DS08BITS -M 37,28 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsCharLengthExceeded 0 -d /DS08BITS -M 2,7 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsIntLengthExceeded 0 -d /DS16BITS -M 10,7 packedbits.h5)
|
||||
ADD_H5_TEST (tpbitsLongLengthExceeded 0 -d /DS32BITS -M 26,7 packedbits.h5)
|
||||
# Incomplete pair of packed bits request.
|
||||
ADD_H5_TEST (tpbitsIncomplete 1 -d /DS08BITS -M 0,2,2,1,0,2,2, packedbits.h5)
|
||||
|
||||
# Remove any output file left over from previous test run
|
||||
ADD_TEST (
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -69,11 +69,9 @@
|
||||
#define EXTERNAL_FILE "EXTERNAL_FILE"
|
||||
#define FILLVALUE "FILLVALUE"
|
||||
#define FILE_CONTENTS "FILE_CONTENTS"
|
||||
#ifdef H5_HAVE_H5DUMP_PACKED_BITS
|
||||
#define PACKED_BITS "PACKED_BITS"
|
||||
#define PACKED_OFFSET "OFFSET"
|
||||
#define PACKED_LENGTH "LENGTH"
|
||||
#endif
|
||||
|
||||
#define BEGIN "{"
|
||||
#define END "}"
|
||||
|
@ -23,9 +23,6 @@ USE_FILTER_FLETCHER32="@USE_FILTER_FLETCHER32@"
|
||||
USE_FILTER_NBIT="@USE_FILTER_NBIT@"
|
||||
USE_FILTER_SCALEOFFSET="@USE_FILTER_SCALEOFFSET@"
|
||||
|
||||
# Determine if H5dump packed bits feature is included
|
||||
Have_Packed_Bits="@PACKED_BITS@"
|
||||
|
||||
TESTNAME=h5dump
|
||||
EXIT_SUCCESS=0
|
||||
EXIT_FAILURE=1
|
||||
@ -82,12 +79,12 @@ TOOLTEST() {
|
||||
echo "#############################"
|
||||
echo "Expected output for '$DUMPER $@'"
|
||||
echo "#############################"
|
||||
cd $srcdir/../testfiles
|
||||
$RUNSERIAL $DUMPER_BIN $@
|
||||
cd $srcdir/../testfiles
|
||||
$RUNSERIAL $DUMPER_BIN $@
|
||||
) >$actual 2>$actual_err
|
||||
cat $actual_err >> $actual
|
||||
|
||||
if [ ! -f $expect ]; then
|
||||
if [ ! -f $expect ]; then
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actual $expect
|
||||
@ -96,13 +93,13 @@ TOOLTEST() {
|
||||
else
|
||||
echo "*FAILED*"
|
||||
echo " Expected result (*.ddl) differs from actual result (*.out)"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
|
||||
fi
|
||||
|
||||
# Clean up output file
|
||||
if test -z "$HDF5_NOCLEANUP"; then
|
||||
rm -f $actual $actual_err
|
||||
rm -f $actual $actual_err
|
||||
fi
|
||||
|
||||
}
|
||||
@ -121,12 +118,12 @@ TOOLTEST1() {
|
||||
TESTING $DUMPER $@
|
||||
(
|
||||
|
||||
cd $srcdir/../testfiles
|
||||
$RUNSERIAL $DUMPER_BIN $@
|
||||
cd $srcdir/../testfiles
|
||||
$RUNSERIAL $DUMPER_BIN $@
|
||||
) >$actual 2>$actual_err
|
||||
cat $actual_err >> $actual
|
||||
|
||||
if [ ! -f $expect ]; then
|
||||
if [ ! -f $expect ]; then
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actual $expect
|
||||
@ -135,13 +132,13 @@ TOOLTEST1() {
|
||||
else
|
||||
echo "*FAILED*"
|
||||
echo " Expected result (*.ddl) differs from actual result (*.out)"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
|
||||
fi
|
||||
|
||||
# Clean up output file
|
||||
if test -z "$HDF5_NOCLEANUP"; then
|
||||
rm -f $actual $actual_err
|
||||
rm -f $actual $actual_err
|
||||
fi
|
||||
|
||||
}
|
||||
@ -250,8 +247,8 @@ TOOLTEST3() {
|
||||
|
||||
# Print a "SKIP" message
|
||||
SKIP() {
|
||||
TESTING $DUMPER $@
|
||||
echo " -SKIP-"
|
||||
TESTING $DUMPER $@
|
||||
echo " -SKIP-"
|
||||
}
|
||||
|
||||
# Print a line-line message left justified in a field of 70 characters
|
||||
@ -268,8 +265,8 @@ DIFFTEST()
|
||||
{
|
||||
PRINT_H5DIFF $@
|
||||
(
|
||||
cd $srcdir/../testfiles
|
||||
$RUNSERIAL $H5DIFF_BIN "$@" -q
|
||||
cd $srcdir/../testfiles
|
||||
$RUNSERIAL $H5DIFF_BIN "$@" -q
|
||||
)
|
||||
RET=$?
|
||||
if [ $RET != 0 ] ; then
|
||||
@ -301,8 +298,8 @@ IMPORTTEST()
|
||||
|
||||
PRINT_H5IMPORT $@
|
||||
(
|
||||
cd $srcdir/../testfiles
|
||||
$RUNSERIAL $H5IMPORT_BIN "$@"
|
||||
cd $srcdir/../testfiles
|
||||
$RUNSERIAL $H5IMPORT_BIN "$@"
|
||||
)
|
||||
RET=$?
|
||||
if [ $RET != 0 ] ; then
|
||||
@ -317,7 +314,7 @@ IMPORTTEST()
|
||||
|
||||
##############################################################################
|
||||
##############################################################################
|
||||
### T H E T E S T S ###
|
||||
### T H E T E S T S ###
|
||||
##############################################################################
|
||||
##############################################################################
|
||||
|
||||
@ -646,12 +643,6 @@ TOOLTEST3 filter_fail.ddl --enable-error-stack filter_fail.h5
|
||||
TOOLTEST1 tall-6.ddl -y -o $TESTDIR/data -d /g1/g1.1/dset1.1.1 tall.h5
|
||||
|
||||
# test for dataset packed bits
|
||||
# Set up xCMD to test or skip.
|
||||
if test "$Have_Packed_Bits" = "yes"; then
|
||||
xCMD=TOOLTEST
|
||||
else
|
||||
xCMD=SKIP
|
||||
fi
|
||||
# Limits:
|
||||
# Maximum number of packed bits is 8 (for now).
|
||||
# Maximum integer size is 64 (for now).
|
||||
@ -661,72 +652,72 @@ fi
|
||||
# Normal operation on both signed and unsigned int datasets.
|
||||
# Sanity check
|
||||
# Their rawdata output should be the same.
|
||||
$xCMD tpbitsSignedWhole.ddl -d /DS08BITS -M 0,8 packedbits.h5
|
||||
$xCMD tpbitsUnsignedWhole.ddl -d /DU08BITS -M 0,8 packedbits.h5
|
||||
$xCMD tpbitsSignedIntWhole.ddl -d /DS16BITS -M 0,16 packedbits.h5
|
||||
$xCMD tpbitsUnsignedIntWhole.ddl -d /DU16BITS -M 0,16 packedbits.h5
|
||||
$xCMD tpbitsSignedLongWhole.ddl -d /DS32BITS -M 0,32 packedbits.h5
|
||||
$xCMD tpbitsUnsignedLongWhole.ddl -d /DU32BITS -M 0,32 packedbits.h5
|
||||
$xCMD tpbitsSignedLongLongWhole.ddl -d /DS64BITS -M 0,64 packedbits.h5
|
||||
$xCMD tpbitsUnsignedLongLongWhole.ddl -d /DU64BITS -M 0,64 packedbits.h5
|
||||
$xCMD tpbitsSignedLongLongWhole63.ddl -d /DS64BITS -M 0,63 packedbits.h5
|
||||
$xCMD tpbitsUnsignedLongLongWhole63.ddl -d /DU64BITS -M 0,63 packedbits.h5
|
||||
$xCMD tpbitsSignedLongLongWhole1.ddl -d /DS64BITS -M 1,63 packedbits.h5
|
||||
$xCMD tpbitsUnsignedLongLongWhole1.ddl -d /DU64BITS -M 1,63 packedbits.h5
|
||||
TOOLTEST tpbitsSignedWhole.ddl -d /DS08BITS -M 0,8 packedbits.h5
|
||||
TOOLTEST tpbitsUnsignedWhole.ddl -d /DU08BITS -M 0,8 packedbits.h5
|
||||
TOOLTEST tpbitsSignedIntWhole.ddl -d /DS16BITS -M 0,16 packedbits.h5
|
||||
TOOLTEST tpbitsUnsignedIntWhole.ddl -d /DU16BITS -M 0,16 packedbits.h5
|
||||
TOOLTEST tpbitsSignedLongWhole.ddl -d /DS32BITS -M 0,32 packedbits.h5
|
||||
TOOLTEST tpbitsUnsignedLongWhole.ddl -d /DU32BITS -M 0,32 packedbits.h5
|
||||
TOOLTEST tpbitsSignedLongLongWhole.ddl -d /DS64BITS -M 0,64 packedbits.h5
|
||||
TOOLTEST tpbitsUnsignedLongLongWhole.ddl -d /DU64BITS -M 0,64 packedbits.h5
|
||||
TOOLTEST tpbitsSignedLongLongWhole63.ddl -d /DS64BITS -M 0,63 packedbits.h5
|
||||
TOOLTEST tpbitsUnsignedLongLongWhole63.ddl -d /DU64BITS -M 0,63 packedbits.h5
|
||||
TOOLTEST tpbitsSignedLongLongWhole1.ddl -d /DS64BITS -M 1,63 packedbits.h5
|
||||
TOOLTEST tpbitsUnsignedLongLongWhole1.ddl -d /DU64BITS -M 1,63 packedbits.h5
|
||||
# Half sections
|
||||
$xCMD tpbitsSigned4.ddl -d /DS08BITS -M 0,4,4,4 packedbits.h5
|
||||
$xCMD tpbitsUnsigned4.ddl -d /DU08BITS -M 0,4,4,4 packedbits.h5
|
||||
$xCMD tpbitsSignedInt8.ddl -d /DS16BITS -M 0,8,8,8 packedbits.h5
|
||||
$xCMD tpbitsUnsignedInt8.ddl -d /DU16BITS -M 0,8,8,8 packedbits.h5
|
||||
$xCMD tpbitsSignedLong16.ddl -d /DS32BITS -M 0,16,16,16 packedbits.h5
|
||||
$xCMD tpbitsUnsignedLong16.ddl -d /DU32BITS -M 0,16,16,16 packedbits.h5
|
||||
$xCMD tpbitsSignedLongLong32.ddl -d /DS64BITS -M 0,32,32,32 packedbits.h5
|
||||
$xCMD tpbitsUnsignedLongLong32.ddl -d /DU64BITS -M 0,32,32,32 packedbits.h5
|
||||
TOOLTEST tpbitsSigned4.ddl -d /DS08BITS -M 0,4,4,4 packedbits.h5
|
||||
TOOLTEST tpbitsUnsigned4.ddl -d /DU08BITS -M 0,4,4,4 packedbits.h5
|
||||
TOOLTEST tpbitsSignedInt8.ddl -d /DS16BITS -M 0,8,8,8 packedbits.h5
|
||||
TOOLTEST tpbitsUnsignedInt8.ddl -d /DU16BITS -M 0,8,8,8 packedbits.h5
|
||||
TOOLTEST tpbitsSignedLong16.ddl -d /DS32BITS -M 0,16,16,16 packedbits.h5
|
||||
TOOLTEST tpbitsUnsignedLong16.ddl -d /DU32BITS -M 0,16,16,16 packedbits.h5
|
||||
TOOLTEST tpbitsSignedLongLong32.ddl -d /DS64BITS -M 0,32,32,32 packedbits.h5
|
||||
TOOLTEST tpbitsUnsignedLongLong32.ddl -d /DU64BITS -M 0,32,32,32 packedbits.h5
|
||||
# Quarter sections
|
||||
$xCMD tpbitsSigned2.ddl -d /DS08BITS -M 0,2,2,2,4,2,6,2 packedbits.h5
|
||||
$xCMD tpbitsUnsigned2.ddl -d /DU08BITS -M 0,2,2,2,4,2,6,2 packedbits.h5
|
||||
$xCMD tpbitsSignedInt4.ddl -d /DS16BITS -M 0,4,4,4,8,4,12,4 packedbits.h5
|
||||
$xCMD tpbitsUnsignedInt4.ddl -d /DU16BITS -M 0,4,4,4,8,4,12,4 packedbits.h5
|
||||
$xCMD tpbitsSignedLong8.ddl -d /DS32BITS -M 0,8,8,8,16,8,24,8 packedbits.h5
|
||||
$xCMD tpbitsUnsignedLong8.ddl -d /DU32BITS -M 0,8,8,8,16,8,24,8 packedbits.h5
|
||||
$xCMD tpbitsSignedLongLong16.ddl -d /DS64BITS -M 0,16,16,16,32,16,48,16 packedbits.h5
|
||||
$xCMD tpbitsUnsignedLongLong16.ddl -d /DU64BITS -M 0,16,16,16,32,16,48,16 packedbits.h5
|
||||
TOOLTEST tpbitsSigned2.ddl -d /DS08BITS -M 0,2,2,2,4,2,6,2 packedbits.h5
|
||||
TOOLTEST tpbitsUnsigned2.ddl -d /DU08BITS -M 0,2,2,2,4,2,6,2 packedbits.h5
|
||||
TOOLTEST tpbitsSignedInt4.ddl -d /DS16BITS -M 0,4,4,4,8,4,12,4 packedbits.h5
|
||||
TOOLTEST tpbitsUnsignedInt4.ddl -d /DU16BITS -M 0,4,4,4,8,4,12,4 packedbits.h5
|
||||
TOOLTEST tpbitsSignedLong8.ddl -d /DS32BITS -M 0,8,8,8,16,8,24,8 packedbits.h5
|
||||
TOOLTEST tpbitsUnsignedLong8.ddl -d /DU32BITS -M 0,8,8,8,16,8,24,8 packedbits.h5
|
||||
TOOLTEST tpbitsSignedLongLong16.ddl -d /DS64BITS -M 0,16,16,16,32,16,48,16 packedbits.h5
|
||||
TOOLTEST tpbitsUnsignedLongLong16.ddl -d /DU64BITS -M 0,16,16,16,32,16,48,16 packedbits.h5
|
||||
# Begin and End
|
||||
$xCMD tpbitsSigned.ddl -d /DS08BITS -M 0,2,2,6 packedbits.h5
|
||||
$xCMD tpbitsUnsigned.ddl -d /DU08BITS -M 0,2,2,6 packedbits.h5
|
||||
$xCMD tpbitsSignedInt.ddl -d /DS16BITS -M 0,2,10,6 packedbits.h5
|
||||
$xCMD tpbitsUnsignedInt.ddl -d /DU16BITS -M 0,2,10,6 packedbits.h5
|
||||
$xCMD tpbitsSignedLong.ddl -d /DS32BITS -M 0,2,26,6 packedbits.h5
|
||||
$xCMD tpbitsUnsignedLong.ddl -d /DU32BITS -M 0,2,26,6 packedbits.h5
|
||||
$xCMD tpbitsSignedLongLong.ddl -d /DS64BITS -M 0,2,58,6 packedbits.h5
|
||||
$xCMD tpbitsUnsignedLongLong.ddl -d /DU64BITS -M 0,2,58,6 packedbits.h5
|
||||
TOOLTEST tpbitsSigned.ddl -d /DS08BITS -M 0,2,2,6 packedbits.h5
|
||||
TOOLTEST tpbitsUnsigned.ddl -d /DU08BITS -M 0,2,2,6 packedbits.h5
|
||||
TOOLTEST tpbitsSignedInt.ddl -d /DS16BITS -M 0,2,10,6 packedbits.h5
|
||||
TOOLTEST tpbitsUnsignedInt.ddl -d /DU16BITS -M 0,2,10,6 packedbits.h5
|
||||
TOOLTEST tpbitsSignedLong.ddl -d /DS32BITS -M 0,2,26,6 packedbits.h5
|
||||
TOOLTEST tpbitsUnsignedLong.ddl -d /DU32BITS -M 0,2,26,6 packedbits.h5
|
||||
TOOLTEST tpbitsSignedLongLong.ddl -d /DS64BITS -M 0,2,58,6 packedbits.h5
|
||||
TOOLTEST tpbitsUnsignedLongLong.ddl -d /DU64BITS -M 0,2,58,6 packedbits.h5
|
||||
# Overlapped packed bits.
|
||||
$xCMD tpbitsOverlapped.ddl -d /DS08BITS -M 0,1,1,1,2,1,0,3 packedbits.h5
|
||||
TOOLTEST tpbitsOverlapped.ddl -d /DS08BITS -M 0,1,1,1,2,1,0,3 packedbits.h5
|
||||
# Maximum number of packed bits.
|
||||
$xCMD tpbitsMax.ddl -d /DS08BITS -M 0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1 packedbits.h5
|
||||
TOOLTEST tpbitsMax.ddl -d /DS08BITS -M 0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1 packedbits.h5
|
||||
# Compound type.
|
||||
$xCMD tpbitsCompound.ddl -d /dset1 -M 0,1,1,1 tcompound.h5
|
||||
TOOLTEST tpbitsCompound.ddl -d /dset1 -M 0,1,1,1 tcompound.h5
|
||||
# Array type.
|
||||
$xCMD tpbitsArray.ddl -d /Dataset1 -M 0,1,1,1 tarray1.h5
|
||||
TOOLTEST tpbitsArray.ddl -d /Dataset1 -M 0,1,1,1 tarray1.h5
|
||||
# Test Error handling.
|
||||
# Too many packed bits requested. Max is 8 for now.
|
||||
$xCMD tpbitsMaxExceeded.ddl -d /DS08BITS -M 0,1,0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1 packedbits.h5
|
||||
TOOLTEST tpbitsMaxExceeded.ddl -d /DS08BITS -M 0,1,0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1 packedbits.h5
|
||||
# Offset too large. Max is 7 (8-1) for now.
|
||||
$xCMD tpbitsOffsetExceeded.ddl -d /DS08BITS -M 64,1 packedbits.h5
|
||||
$xCMD tpbitsCharOffsetExceeded.ddl -d /DS08BITS -M 8,1 packedbits.h5
|
||||
$xCMD tpbitsIntOffsetExceeded.ddl -d /DS16BITS -M 16,1 packedbits.h5
|
||||
$xCMD tpbitsLongOffsetExceeded.ddl -d /DS32BITS -M 32,1 packedbits.h5
|
||||
TOOLTEST tpbitsOffsetExceeded.ddl -d /DS08BITS -M 64,1 packedbits.h5
|
||||
TOOLTEST tpbitsCharOffsetExceeded.ddl -d /DS08BITS -M 8,1 packedbits.h5
|
||||
TOOLTEST tpbitsIntOffsetExceeded.ddl -d /DS16BITS -M 16,1 packedbits.h5
|
||||
TOOLTEST tpbitsLongOffsetExceeded.ddl -d /DS32BITS -M 32,1 packedbits.h5
|
||||
# Bad offset, must not be negative.
|
||||
$xCMD tpbitsOffsetNegative.ddl -d /DS08BITS -M -1,1 packedbits.h5
|
||||
TOOLTEST tpbitsOffsetNegative.ddl -d /DS08BITS -M -1,1 packedbits.h5
|
||||
# Bad length, must not be positive.
|
||||
$xCMD tpbitsLengthPositive.ddl -d /DS08BITS -M 4,0 packedbits.h5
|
||||
TOOLTEST tpbitsLengthPositive.ddl -d /DS08BITS -M 4,0 packedbits.h5
|
||||
# Offset+Length is too large. Max is 8 for now.
|
||||
$xCMD tpbitsLengthExceeded.ddl -d /DS08BITS -M 37,28 packedbits.h5
|
||||
$xCMD tpbitsCharLengthExceeded.ddl -d /DS08BITS -M 2,7 packedbits.h5
|
||||
$xCMD tpbitsIntLengthExceeded.ddl -d /DS16BITS -M 10,7 packedbits.h5
|
||||
$xCMD tpbitsLongLengthExceeded.ddl -d /DS32BITS -M 26,7 packedbits.h5
|
||||
TOOLTEST tpbitsLengthExceeded.ddl -d /DS08BITS -M 37,28 packedbits.h5
|
||||
TOOLTEST tpbitsCharLengthExceeded.ddl -d /DS08BITS -M 2,7 packedbits.h5
|
||||
TOOLTEST tpbitsIntLengthExceeded.ddl -d /DS16BITS -M 10,7 packedbits.h5
|
||||
TOOLTEST tpbitsLongLengthExceeded.ddl -d /DS32BITS -M 26,7 packedbits.h5
|
||||
# Incomplete pair of packed bits request.
|
||||
$xCMD tpbitsIncomplete.ddl -d /DS08BITS -M 0,2,2,1,0,2,2, packedbits.h5
|
||||
TOOLTEST tpbitsIncomplete.ddl -d /DS08BITS -M 0,2,2,1,0,2,2, packedbits.h5
|
||||
|
||||
|
||||
# Report test results and exit
|
||||
|
@ -136,7 +136,7 @@ IF (BUILD_TESTING)
|
||||
# If using memchecker add tests without using scripts
|
||||
IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
|
||||
ADD_TEST (
|
||||
NAME H5IMPORT-H5DUMP-${testname}
|
||||
NAME H5IMPORT-H5DMP-${testname}
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
|
||||
-D "TEST_ARGS:STRING=${testfile}"
|
||||
@ -147,9 +147,9 @@ IF (BUILD_TESTING)
|
||||
-D "TEST_SKIP_COMPARE=TRUE"
|
||||
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
|
||||
)
|
||||
SET_TESTS_PROPERTIES (H5IMPORT-H5DUMP-${testname} PROPERTIES DEPENDS H5IMPORT-${testname})
|
||||
SET_TESTS_PROPERTIES (H5IMPORT-H5DMP-${testname} PROPERTIES DEPENDS H5IMPORT-${testname})
|
||||
ADD_TEST (
|
||||
NAME H5IMPORT-H5DUMP_CMP-${testname}
|
||||
NAME H5IMPORT-H5DMP_CMP-${testname}
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
|
||||
-D "TEST_ARGS:STRING=testfiles/${testfile}"
|
||||
@ -160,8 +160,8 @@ IF (BUILD_TESTING)
|
||||
-D "TEST_REFERENCE=${testfile}.new"
|
||||
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
|
||||
)
|
||||
SET_TESTS_PROPERTIES (H5IMPORT-H5DUMP_CMP-${testname} PROPERTIES DEPENDS H5IMPORT-H5DUMP-${testname})
|
||||
SET (last_test "H5IMPORT-H5DUMP_CMP-${testname}")
|
||||
SET_TESTS_PROPERTIES (H5IMPORT-H5DMP_CMP-${testname} PROPERTIES DEPENDS H5IMPORT-H5DMP-${testname})
|
||||
SET (last_test "H5IMPORT-H5DMP_CMP-${testname}")
|
||||
ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
|
||||
ENDMACRO (ADD_H5_TEST testname resultcode testfile vparam srcname dstname)
|
||||
|
||||
|
@ -119,7 +119,7 @@ IF (BUILD_TESTING)
|
||||
SET_TESTS_PROPERTIES (H5JAM-CHECKFILE-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
|
||||
ENDIF (NOT "${last_test}" STREQUAL "")
|
||||
ADD_TEST (
|
||||
NAME H5JAM-CHECKFILE-H5DUMP-${testname}
|
||||
NAME H5JAM-CHECKFILE-H5DMP-${testname}
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
|
||||
-D "TEST_ARGS:STRING=testfiles/${expected}"
|
||||
@ -130,9 +130,9 @@ IF (BUILD_TESTING)
|
||||
-D "TEST_SKIP_COMPARE=TRUE"
|
||||
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
|
||||
)
|
||||
SET_TESTS_PROPERTIES (H5JAM-CHECKFILE-H5DUMP-${testname} PROPERTIES DEPENDS H5JAM-CHECKFILE-${testname}-clear-objects)
|
||||
SET_TESTS_PROPERTIES (H5JAM-CHECKFILE-H5DMP-${testname} PROPERTIES DEPENDS H5JAM-CHECKFILE-${testname}-clear-objects)
|
||||
ADD_TEST (
|
||||
NAME H5JAM-CHECKFILE-H5DUMP_CMP-${testname}
|
||||
NAME H5JAM-CHECKFILE-H5DMP_CMP-${testname}
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
|
||||
-D "TEST_ARGS:STRING=${actual}"
|
||||
@ -143,8 +143,8 @@ IF (BUILD_TESTING)
|
||||
-D "TEST_REFERENCE=${expected}.new"
|
||||
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
|
||||
)
|
||||
SET_TESTS_PROPERTIES (H5JAM-CHECKFILE-H5DUMP_CMP-${testname} PROPERTIES DEPENDS H5JAM-CHECKFILE-H5DUMP-${testname})
|
||||
SET (last_test "H5JAM-CHECKFILE-H5DUMP_CMP-${testname}")
|
||||
SET_TESTS_PROPERTIES (H5JAM-CHECKFILE-H5DMP_CMP-${testname} PROPERTIES DEPENDS H5JAM-CHECKFILE-H5DMP-${testname})
|
||||
SET (last_test "H5JAM-CHECKFILE-H5DMP_CMP-${testname}")
|
||||
ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
|
||||
ENDMACRO(CHECKFILE testname expected actual)
|
||||
|
||||
|
@ -42,11 +42,9 @@ FILE *rawdatastream; /* should initialize to stdout but gcc moans about it
|
||||
int bin_output; /* binary output */
|
||||
int bin_form; /* binary form */
|
||||
int region_output; /* region output */
|
||||
#ifdef H5_HAVE_H5DUMP_PACKED_BITS
|
||||
int packed_bits_num; /* number of packed bits to display */
|
||||
int packed_data_offset; /* offset of packed bits to display */
|
||||
unsigned long long packed_data_mask; /* mask in which packed bits to display */
|
||||
#endif
|
||||
|
||||
static h5tool_format_t h5tools_dataformat = {
|
||||
0, /*raw */
|
||||
@ -4349,23 +4347,23 @@ hbool_t h5tools_is_zero(const void *_mem, size_t size)
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
hbool_t h5tools_is_obj_same(hid_t loc_id1, const char *name1,
|
||||
hid_t loc_id2, const char *name2)
|
||||
hid_t loc_id2, const char *name2)
|
||||
{
|
||||
H5O_info_t oinfo1, oinfo2;
|
||||
hbool_t ret_val = 0;
|
||||
|
||||
if ( name1 && strcmp(name1, "."))
|
||||
H5Oget_info_by_name(loc_id1, name1, &oinfo1, H5P_DEFAULT);
|
||||
H5Oget_info_by_name(loc_id1, name1, &oinfo1, H5P_DEFAULT);
|
||||
else
|
||||
H5Oget_info(loc_id1, &oinfo1);
|
||||
H5Oget_info(loc_id1, &oinfo1);
|
||||
|
||||
if ( name2 && strcmp(name2, "."))
|
||||
H5Oget_info_by_name(loc_id2, name2, &oinfo2, H5P_DEFAULT);
|
||||
H5Oget_info_by_name(loc_id2, name2, &oinfo2, H5P_DEFAULT);
|
||||
else
|
||||
H5Oget_info(loc_id2, &oinfo2);
|
||||
H5Oget_info(loc_id2, &oinfo2);
|
||||
|
||||
if (oinfo1.fileno == oinfo2.fileno && oinfo1.addr==oinfo2.addr)
|
||||
ret_val = 1;
|
||||
ret_val = 1;
|
||||
|
||||
return ret_val;
|
||||
}
|
||||
|
@ -530,12 +530,9 @@ struct subset_t {
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef H5_HAVE_H5DUMP_PACKED_BITS
|
||||
H5TOOLS_DLLVAR int packed_bits_num; /* number of packed bits to display */
|
||||
H5TOOLS_DLLVAR int packed_data_offset; /* offset of packed bits to display */
|
||||
H5TOOLS_DLLVAR unsigned long long packed_data_mask; /* mask in which packed bits to display */
|
||||
#endif
|
||||
|
||||
H5TOOLS_DLLVAR FILE *rawdatastream; /* output stream for raw data */
|
||||
H5TOOLS_DLLVAR int bin_output; /* binary output */
|
||||
H5TOOLS_DLLVAR int bin_form; /* binary form */
|
||||
|
@ -795,98 +795,78 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
|
||||
}
|
||||
else if (H5Tequal(type, H5T_NATIVE_INT)) {
|
||||
HDmemcpy(&tempint, vp, sizeof(int));
|
||||
#ifdef H5_HAVE_H5DUMP_PACKED_BITS
|
||||
if(packed_bits_num) {
|
||||
tempint = (tempint >> packed_data_offset) & packed_data_mask;
|
||||
}
|
||||
#endif
|
||||
h5tools_str_append(str, OPT(info->fmt_int, "%d"), tempint);
|
||||
}
|
||||
else if (H5Tequal(type, H5T_NATIVE_UINT)) {
|
||||
HDmemcpy(&tempuint, vp, sizeof(unsigned int));
|
||||
#ifdef H5_HAVE_H5DUMP_PACKED_BITS
|
||||
if(packed_bits_num) {
|
||||
tempuint = (tempuint >> packed_data_offset) & packed_data_mask;
|
||||
}
|
||||
#endif
|
||||
h5tools_str_append(str, OPT(info->fmt_uint, "%u"), tempuint);
|
||||
}
|
||||
else if (H5Tequal(type, H5T_NATIVE_SCHAR)) {
|
||||
char tempchar;
|
||||
HDmemcpy(&tempchar, cp_vp, sizeof(char));
|
||||
#ifdef H5_HAVE_H5DUMP_PACKED_BITS
|
||||
if(packed_bits_num) {
|
||||
tempchar = (tempchar >> packed_data_offset) & packed_data_mask;
|
||||
}
|
||||
#endif
|
||||
h5tools_str_append(str, OPT(info->fmt_schar, "%hhd"), tempchar);
|
||||
}
|
||||
else if (H5Tequal(type, H5T_NATIVE_UCHAR)) {
|
||||
unsigned char tempuchar;
|
||||
HDmemcpy(&tempuchar, ucp_vp, sizeof(unsigned char));
|
||||
#ifdef H5_HAVE_H5DUMP_PACKED_BITS
|
||||
if(packed_bits_num) {
|
||||
tempuchar = (tempuchar >> packed_data_offset) & packed_data_mask;
|
||||
}
|
||||
#endif
|
||||
h5tools_str_append(str, OPT(info->fmt_uchar, "%u"), tempuchar);
|
||||
}
|
||||
else if (H5Tequal(type, H5T_NATIVE_SHORT)) {
|
||||
short tempshort;
|
||||
|
||||
HDmemcpy(&tempshort, vp, sizeof(short));
|
||||
#ifdef H5_HAVE_H5DUMP_PACKED_BITS
|
||||
if(packed_bits_num) {
|
||||
tempshort = (tempshort >> packed_data_offset) & packed_data_mask;
|
||||
}
|
||||
#endif
|
||||
h5tools_str_append(str, OPT(info->fmt_short, "%d"), tempshort);
|
||||
}
|
||||
else if (H5Tequal(type, H5T_NATIVE_USHORT)) {
|
||||
unsigned short tempushort;
|
||||
|
||||
HDmemcpy(&tempushort, vp, sizeof(unsigned short));
|
||||
#ifdef H5_HAVE_H5DUMP_PACKED_BITS
|
||||
if(packed_bits_num) {
|
||||
tempushort = (tempushort >> packed_data_offset) & packed_data_mask;
|
||||
}
|
||||
#endif
|
||||
h5tools_str_append(str, OPT(info->fmt_ushort, "%u"), tempushort);
|
||||
}
|
||||
else if (H5Tequal(type, H5T_NATIVE_LONG)) {
|
||||
HDmemcpy(&templong, vp, sizeof(long));
|
||||
#ifdef H5_HAVE_H5DUMP_PACKED_BITS
|
||||
if(packed_bits_num) {
|
||||
templong = (templong >> packed_data_offset) & packed_data_mask;
|
||||
}
|
||||
#endif
|
||||
h5tools_str_append(str, OPT(info->fmt_long, "%ld"), templong);
|
||||
}
|
||||
else if (H5Tequal(type, H5T_NATIVE_ULONG)) {
|
||||
HDmemcpy(&tempulong, vp, sizeof(unsigned long));
|
||||
#ifdef H5_HAVE_H5DUMP_PACKED_BITS
|
||||
if(packed_bits_num) {
|
||||
tempulong = (tempulong >> packed_data_offset) & packed_data_mask;
|
||||
}
|
||||
#endif
|
||||
h5tools_str_append(str, OPT(info->fmt_ulong, "%lu"), tempulong);
|
||||
}
|
||||
else if (H5Tequal(type, H5T_NATIVE_LLONG)) {
|
||||
HDmemcpy(&templlong, vp, sizeof(long long));
|
||||
#ifdef H5_HAVE_H5DUMP_PACKED_BITS
|
||||
if(packed_bits_num) {
|
||||
templlong = (templlong >> packed_data_offset) & packed_data_mask;
|
||||
}
|
||||
#endif
|
||||
h5tools_str_append(str, OPT(info->fmt_llong, fmt_llong), templlong);
|
||||
}
|
||||
else if (H5Tequal(type, H5T_NATIVE_ULLONG)) {
|
||||
HDmemcpy(&tempullong, vp, sizeof(unsigned long long));
|
||||
#ifdef H5_HAVE_H5DUMP_PACKED_BITS
|
||||
if(packed_bits_num) {
|
||||
tempullong = (tempullong >> packed_data_offset) & packed_data_mask;
|
||||
}
|
||||
#endif
|
||||
h5tools_str_append(str, OPT(info->fmt_ullong, fmt_ullong), tempullong);
|
||||
}
|
||||
else if (H5Tequal(type, H5T_NATIVE_HSSIZE)) {
|
||||
|
@ -80,7 +80,7 @@ usage: h5dump [OPTIONS] file
|
||||
|
||||
1) Attribute foo of the group /bar_none in file quux.h5
|
||||
|
||||
h5dump -a /bar_none/foo quux.h5
|
||||
h5dump -a /bar_none/foo quux.h5
|
||||
|
||||
2) Selecting a subset from dataset /foo in file quux.h5
|
||||
|
||||
|
@ -80,7 +80,7 @@ usage: h5dump [OPTIONS] file
|
||||
|
||||
1) Attribute foo of the group /bar_none in file quux.h5
|
||||
|
||||
h5dump -a /bar_none/foo quux.h5
|
||||
h5dump -a /bar_none/foo quux.h5
|
||||
|
||||
2) Selecting a subset from dataset /foo in file quux.h5
|
||||
|
||||
|
@ -80,7 +80,7 @@ usage: h5dump [OPTIONS] file
|
||||
|
||||
1) Attribute foo of the group /bar_none in file quux.h5
|
||||
|
||||
h5dump -a /bar_none/foo quux.h5
|
||||
h5dump -a /bar_none/foo quux.h5
|
||||
|
||||
2) Selecting a subset from dataset /foo in file quux.h5
|
||||
|
||||
|
@ -80,7 +80,7 @@ usage: h5dump [OPTIONS] file
|
||||
|
||||
1) Attribute foo of the group /bar_none in file quux.h5
|
||||
|
||||
h5dump -a /bar_none/foo quux.h5
|
||||
h5dump -a /bar_none/foo quux.h5
|
||||
|
||||
2) Selecting a subset from dataset /foo in file quux.h5
|
||||
|
||||
|
@ -80,7 +80,7 @@ usage: h5dump [OPTIONS] file
|
||||
|
||||
1) Attribute foo of the group /bar_none in file quux.h5
|
||||
|
||||
h5dump -a /bar_none/foo quux.h5
|
||||
h5dump -a /bar_none/foo quux.h5
|
||||
|
||||
2) Selecting a subset from dataset /foo in file quux.h5
|
||||
|
||||
|
@ -80,7 +80,7 @@ usage: h5dump [OPTIONS] file
|
||||
|
||||
1) Attribute foo of the group /bar_none in file quux.h5
|
||||
|
||||
h5dump -a /bar_none/foo quux.h5
|
||||
h5dump -a /bar_none/foo quux.h5
|
||||
|
||||
2) Selecting a subset from dataset /foo in file quux.h5
|
||||
|
||||
|
@ -80,7 +80,7 @@ usage: h5dump [OPTIONS] file
|
||||
|
||||
1) Attribute foo of the group /bar_none in file quux.h5
|
||||
|
||||
h5dump -a /bar_none/foo quux.h5
|
||||
h5dump -a /bar_none/foo quux.h5
|
||||
|
||||
2) Selecting a subset from dataset /foo in file quux.h5
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user