From 2f8b5057c1613f02e3ba24aa2511734e5ea836bd Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 22 May 2012 15:34:34 -0500 Subject: [svn-r22390] Break out the packed bits tests into a new script. reconfigure on jam Tested: local linux --- MANIFEST | 1 + configure | 5 +- configure.in | 1 + tools/h5dump/Makefile.am | 2 +- tools/h5dump/Makefile.in | 12 +- tools/h5dump/testh5dump.sh.in | 224 ----------------- tools/h5dump/testh5dumppbits.sh.in | 495 +++++++++++++++++++++++++++++++++++++ tools/h5dump/testh5dumpxml.sh.in | 171 ++++++++++++- 8 files changed, 678 insertions(+), 233 deletions(-) create mode 100644 tools/h5dump/testh5dumppbits.sh.in diff --git a/MANIFEST b/MANIFEST index c098d4e..ea78fc3 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1119,6 +1119,7 @@ ./tools/h5dump/h5dump_xml.h ./tools/h5dump/h5dumpgentest.c ./tools/h5dump/testh5dump.sh.in +./tools/h5dump/testh5dumppbits.sh.in ./tools/h5dump/testh5dumpxml.sh.in ./tools/h5dump/binread.c diff --git a/configure b/configure index ea71496..984fcf3 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Id: configure.in 22356 2012-05-13 14:35:22Z hdftest . +# From configure.in Id: configure.in 22382 2012-05-20 14:36:03Z hdftest . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.68 for HDF5 1.9.119. # @@ -30001,7 +30001,7 @@ if test -n "$TESTPARALLEL"; then fi fi -ac_config_files="$ac_config_files src/libhdf5.settings Makefile src/Makefile test/Makefile test/testcheck_version.sh test/testerror.sh test/H5srcdir_str.h test/testlibinfo.sh test/testlinks_env.sh testpar/Makefile testpar/testph5.sh perform/Makefile tools/Makefile tools/h5dump/Makefile tools/h5dump/testh5dump.sh tools/h5dump/testh5dumpxml.sh tools/h5ls/testh5ls.sh tools/h5import/Makefile tools/h5diff/Makefile tools/h5jam/Makefile tools/h5jam/testh5jam.sh tools/h5repack/Makefile tools/h5repack/h5repack.sh tools/h5ls/Makefile tools/h5copy/Makefile tools/lib/Makefile tools/misc/Makefile tools/misc/h5cc tools/misc/testh5repart.sh tools/h5stat/testh5stat.sh tools/h5stat/Makefile examples/Makefile examples/run-c-ex.sh examples/testh5cc.sh c++/Makefile c++/src/Makefile c++/src/h5c++ c++/test/Makefile c++/test/H5srcdir_str.h c++/examples/Makefile c++/examples/run-c++-ex.sh c++/examples/testh5c++.sh fortran/Makefile fortran/src/h5fc fortran/src/Makefile fortran/test/Makefile fortran/testpar/Makefile fortran/examples/Makefile fortran/examples/run-fortran-ex.sh fortran/examples/testh5fc.sh hl/Makefile hl/src/Makefile hl/test/Makefile hl/test/H5srcdir_str.h hl/tools/Makefile hl/tools/gif2h5/Makefile hl/examples/Makefile hl/examples/run-hlc-ex.sh hl/c++/Makefile hl/c++/src/Makefile hl/c++/test/Makefile hl/c++/examples/Makefile hl/c++/examples/run-hlc++-ex.sh hl/fortran/Makefile hl/fortran/src/Makefile hl/fortran/test/Makefile hl/fortran/examples/Makefile hl/fortran/examples/run-hlfortran-ex.sh" +ac_config_files="$ac_config_files src/libhdf5.settings Makefile src/Makefile test/Makefile test/testcheck_version.sh test/testerror.sh test/H5srcdir_str.h test/testlibinfo.sh test/testlinks_env.sh testpar/Makefile testpar/testph5.sh perform/Makefile tools/Makefile tools/h5dump/Makefile tools/h5dump/testh5dump.sh tools/h5dump/testh5dumppbits.sh tools/h5dump/testh5dumpxml.sh tools/h5ls/testh5ls.sh tools/h5import/Makefile tools/h5diff/Makefile tools/h5jam/Makefile tools/h5jam/testh5jam.sh tools/h5repack/Makefile tools/h5repack/h5repack.sh tools/h5ls/Makefile tools/h5copy/Makefile tools/lib/Makefile tools/misc/Makefile tools/misc/h5cc tools/misc/testh5repart.sh tools/h5stat/testh5stat.sh tools/h5stat/Makefile examples/Makefile examples/run-c-ex.sh examples/testh5cc.sh c++/Makefile c++/src/Makefile c++/src/h5c++ c++/test/Makefile c++/test/H5srcdir_str.h c++/examples/Makefile c++/examples/run-c++-ex.sh c++/examples/testh5c++.sh fortran/Makefile fortran/src/h5fc fortran/src/Makefile fortran/test/Makefile fortran/testpar/Makefile fortran/examples/Makefile fortran/examples/run-fortran-ex.sh fortran/examples/testh5fc.sh hl/Makefile hl/src/Makefile hl/test/Makefile hl/test/H5srcdir_str.h hl/tools/Makefile hl/tools/gif2h5/Makefile hl/examples/Makefile hl/examples/run-hlc-ex.sh hl/c++/Makefile hl/c++/src/Makefile hl/c++/test/Makefile hl/c++/examples/Makefile hl/c++/examples/run-hlc++-ex.sh hl/fortran/Makefile hl/fortran/src/Makefile hl/fortran/test/Makefile hl/fortran/examples/Makefile hl/fortran/examples/run-hlfortran-ex.sh" cat >confcache <<\_ACEOF @@ -31277,6 +31277,7 @@ do "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;; "tools/h5dump/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5dump/Makefile" ;; "tools/h5dump/testh5dump.sh") CONFIG_FILES="$CONFIG_FILES tools/h5dump/testh5dump.sh" ;; + "tools/h5dump/testh5dumppbits.sh") CONFIG_FILES="$CONFIG_FILES tools/h5dump/testh5dumppbits.sh" ;; "tools/h5dump/testh5dumpxml.sh") CONFIG_FILES="$CONFIG_FILES tools/h5dump/testh5dumpxml.sh" ;; "tools/h5ls/testh5ls.sh") CONFIG_FILES="$CONFIG_FILES tools/h5ls/testh5ls.sh" ;; "tools/h5import/Makefile") CONFIG_FILES="$CONFIG_FILES tools/h5import/Makefile" ;; diff --git a/configure.in b/configure.in index 65ed544..dba6f30 100644 --- a/configure.in +++ b/configure.in @@ -4388,6 +4388,7 @@ AC_CONFIG_FILES([src/libhdf5.settings tools/Makefile tools/h5dump/Makefile tools/h5dump/testh5dump.sh + tools/h5dump/testh5dumppbits.sh tools/h5dump/testh5dumpxml.sh tools/h5ls/testh5ls.sh tools/h5import/Makefile diff --git a/tools/h5dump/Makefile.am b/tools/h5dump/Makefile.am index 97d81c2..38864f5 100644 --- a/tools/h5dump/Makefile.am +++ b/tools/h5dump/Makefile.am @@ -25,7 +25,7 @@ INCLUDES=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib # Test programs and scripts TEST_PROG=h5dumpgentest -TEST_SCRIPT=testh5dump.sh testh5dumpxml.sh +TEST_SCRIPT=testh5dump.sh testh5dumppbits.sh testh5dumpxml.sh check_PROGRAMS=$(TEST_PROG) binread check_SCRIPTS=$(TEST_SCRIPT) diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in index 9d46557..0c45a72 100644 --- a/tools/h5dump/Makefile.in +++ b/tools/h5dump/Makefile.in @@ -52,8 +52,8 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/testh5dump.sh.in $(srcdir)/testh5dumpxml.sh.in \ - $(top_srcdir)/config/commence.am \ + $(srcdir)/testh5dump.sh.in $(srcdir)/testh5dumppbits.sh.in \ + $(srcdir)/testh5dumpxml.sh.in $(top_srcdir)/config/commence.am \ $(top_srcdir)/config/conclude.am check_PROGRAMS = $(am__EXEEXT_1) binread$(EXEEXT) bin_PROGRAMS = h5dump$(EXEEXT) @@ -65,7 +65,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs CONFIG_HEADER = $(top_builddir)/src/H5config.h -CONFIG_CLEAN_FILES = testh5dump.sh testh5dumpxml.sh +CONFIG_CLEAN_FILES = testh5dump.sh testh5dumppbits.sh testh5dumpxml.sh CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" am__EXEEXT_1 = h5dumpgentest$(EXEEXT) @@ -412,7 +412,7 @@ INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/tools/lib # Test programs and scripts TEST_PROG = h5dumpgentest -TEST_SCRIPT = testh5dump.sh testh5dumpxml.sh +TEST_SCRIPT = testh5dump.sh testh5dumppbits.sh testh5dumpxml.sh check_SCRIPTS = $(TEST_SCRIPT) SCRIPT_DEPEND = h5dump$(EXEEXT) @@ -424,7 +424,7 @@ LDADD = $(LIBH5TOOLS) $(LIBHDF5) # Source files for the program h5dump_SOURCES = h5dump.c h5dump_ddl.c h5dump_xml.c -DISTCLEANFILES = testh5dump.sh +DISTCLEANFILES = testh5dump.sh testh5dumppbits.sh testh5dumpxml.sh # Automake needs to be taught how to build lib, progs, and tests targets. # These will be filled in automatically for the most part (e.g., @@ -477,6 +477,8 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): testh5dump.sh: $(top_builddir)/config.status $(srcdir)/testh5dump.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +testh5dumppbits.sh: $(top_builddir)/config.status $(srcdir)/testh5dumppbits.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ testh5dumpxml.sh: $(top_builddir)/config.status $(srcdir)/testh5dumpxml.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binPROGRAMS: $(bin_PROGRAMS) diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in index 25a30c5..5441e25 100644 --- a/tools/h5dump/testh5dump.sh.in +++ b/tools/h5dump/testh5dump.sh.in @@ -290,152 +290,9 @@ $SRC_H5DUMP_TESTFILES/tvlstr.ddl $SRC_H5DUMP_TESTFILES/tvms.ddl $SRC_H5DUMP_TESTFILES/h5dump-help.txt $SRC_H5DUMP_TESTFILES/out3.h5import -$SRC_H5DUMP_TESTFILES/tnofilename-with-packed-bits.ddl -$SRC_H5DUMP_TESTFILES/tpbitsArray.ddl -$SRC_H5DUMP_TESTFILES/tpbitsCompound.ddl -$SRC_H5DUMP_TESTFILES/tpbitsIncomplete.ddl -$SRC_H5DUMP_TESTFILES/tpbitsLengthExceeded.ddl -$SRC_H5DUMP_TESTFILES/tpbitsCharLengthExceeded.ddl -$SRC_H5DUMP_TESTFILES/tpbitsIntLengthExceeded.ddl -$SRC_H5DUMP_TESTFILES/tpbitsLongLengthExceeded.ddl -$SRC_H5DUMP_TESTFILES/tpbitsLengthPositive.ddl -$SRC_H5DUMP_TESTFILES/tpbitsMax.ddl -$SRC_H5DUMP_TESTFILES/tpbitsMaxExceeded.ddl -$SRC_H5DUMP_TESTFILES/tpbitsOffsetExceeded.ddl -$SRC_H5DUMP_TESTFILES/tpbitsCharOffsetExceeded.ddl -$SRC_H5DUMP_TESTFILES/tpbitsIntOffsetExceeded.ddl -$SRC_H5DUMP_TESTFILES/tpbitsLongOffsetExceeded.ddl -$SRC_H5DUMP_TESTFILES/tpbitsOffsetNegative.ddl -$SRC_H5DUMP_TESTFILES/tpbitsOverlapped.ddl -$SRC_H5DUMP_TESTFILES/tpbitsSigned.ddl -$SRC_H5DUMP_TESTFILES/tpbitsUnsigned.ddl -$SRC_H5DUMP_TESTFILES/tpbitsSignedInt.ddl -$SRC_H5DUMP_TESTFILES/tpbitsUnsignedInt.ddl -$SRC_H5DUMP_TESTFILES/tpbitsSignedLong.ddl -$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLong.ddl -$SRC_H5DUMP_TESTFILES/tpbitsSignedLongLong.ddl -$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLongLong.ddl -$SRC_H5DUMP_TESTFILES/tpbitsSignedWhole.ddl -$SRC_H5DUMP_TESTFILES/tpbitsUnsignedWhole.ddl -$SRC_H5DUMP_TESTFILES/tpbitsSignedIntWhole.ddl -$SRC_H5DUMP_TESTFILES/tpbitsUnsignedIntWhole.ddl -$SRC_H5DUMP_TESTFILES/tpbitsSignedLongWhole.ddl -$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLongWhole.ddl -$SRC_H5DUMP_TESTFILES/tpbitsSignedLongLongWhole.ddl -$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLongLongWhole.ddl -$SRC_H5DUMP_TESTFILES/tpbitsSignedLongLongWhole1.ddl -$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLongLongWhole1.ddl -$SRC_H5DUMP_TESTFILES/tpbitsSignedLongLongWhole63.ddl -$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLongLongWhole63.ddl -$SRC_H5DUMP_TESTFILES/tpbitsSigned4.ddl -$SRC_H5DUMP_TESTFILES/tpbitsUnsigned4.ddl -$SRC_H5DUMP_TESTFILES/tpbitsSignedInt8.ddl -$SRC_H5DUMP_TESTFILES/tpbitsUnsignedInt8.ddl -$SRC_H5DUMP_TESTFILES/tpbitsSignedLong16.ddl -$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLong16.ddl -$SRC_H5DUMP_TESTFILES/tpbitsSignedLongLong32.ddl -$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLongLong32.ddl -$SRC_H5DUMP_TESTFILES/tpbitsSigned2.ddl -$SRC_H5DUMP_TESTFILES/tpbitsUnsigned2.ddl -$SRC_H5DUMP_TESTFILES/tpbitsSignedInt4.ddl -$SRC_H5DUMP_TESTFILES/tpbitsUnsignedInt4.ddl -$SRC_H5DUMP_TESTFILES/tpbitsSignedLong8.ddl -$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLong8.ddl -$SRC_H5DUMP_TESTFILES/tpbitsSignedLongLong16.ddl -$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLongLong16.ddl $SRC_H5DUMP_TESTFILES/tbinregR.exp " -LIST_HDF5_TEST_FILES_XML=" -$SRC_H5DUMP_TESTFILES/tbitfields.h5 -$SRC_H5DUMP_TESTFILES/tcompound2.h5 -$SRC_H5DUMP_TESTFILES/tdset2.h5 -$SRC_H5DUMP_TESTFILES/tenum.h5 -$SRC_H5DUMP_TESTFILES/textlink.h5 -$SRC_H5DUMP_TESTFILES/tloop2.h5 -$SRC_H5DUMP_TESTFILES/tmany.h5 -$SRC_H5DUMP_TESTFILES/tname-amp.h5 -$SRC_H5DUMP_TESTFILES/tname-apos.h5 -$SRC_H5DUMP_TESTFILES/tname-gt.h5 -$SRC_H5DUMP_TESTFILES/tname-lt.h5 -$SRC_H5DUMP_TESTFILES/tname-quot.h5 -$SRC_H5DUMP_TESTFILES/tname-sp.h5 -$SRC_H5DUMP_TESTFILES/tnodata.h5 -$SRC_H5DUMP_TESTFILES/tobjref.h5 -$SRC_H5DUMP_TESTFILES/topaque.h5 -$SRC_H5DUMP_TESTFILES/tref.h5 -$SRC_H5DUMP_TESTFILES/tref-escapes.h5 -$SRC_H5DUMP_TESTFILES/tref-escapes-at.h5 -$SRC_H5DUMP_TESTFILES/tstring.h5 -$SRC_H5DUMP_TESTFILES/tstring-at.h5 -" - -LIST_OTHER_TEST_FILES_XML=" -$SRC_H5DUMP_TESTFILES/tall.h5.xml -$SRC_H5DUMP_TESTFILES/tall-2A.h5.xml -$SRC_H5DUMP_TESTFILES/tarray1.h5.xml -$SRC_H5DUMP_TESTFILES/tarray2.h5.xml -$SRC_H5DUMP_TESTFILES/tarray3.h5.xml -$SRC_H5DUMP_TESTFILES/tarray6.h5.xml -$SRC_H5DUMP_TESTFILES/tarray7.h5.xml -$SRC_H5DUMP_TESTFILES/tattr.h5.xml -$SRC_H5DUMP_TESTFILES/tbitfields.h5.xml -$SRC_H5DUMP_TESTFILES/tcompound_complex.h5.xml -$SRC_H5DUMP_TESTFILES/tcompound.h5.xml -$SRC_H5DUMP_TESTFILES/tcompound2.h5.xml -$SRC_H5DUMP_TESTFILES/tdatareg.h5.xml -$SRC_H5DUMP_TESTFILES/tdset.h5.xml -$SRC_H5DUMP_TESTFILES/tdset2.h5.xml -$SRC_H5DUMP_TESTFILES/tempty.h5.xml -$SRC_H5DUMP_TESTFILES/tempty-dtd.h5.xml -$SRC_H5DUMP_TESTFILES/tempty-dtd-2.h5.xml -$SRC_H5DUMP_TESTFILES/tempty-dtd-uri.h5.xml -$SRC_H5DUMP_TESTFILES/tempty-nons.h5.xml -$SRC_H5DUMP_TESTFILES/tempty-nons-2.h5.xml -$SRC_H5DUMP_TESTFILES/tempty-nons-uri.h5.xml -$SRC_H5DUMP_TESTFILES/tempty-ns.h5.xml -$SRC_H5DUMP_TESTFILES/tempty-ns-2.h5.xml -$SRC_H5DUMP_TESTFILES/tenum.h5.xml -$SRC_H5DUMP_TESTFILES/textlink.h5.xml -$SRC_H5DUMP_TESTFILES/tfpformat.h5.xml -$SRC_H5DUMP_TESTFILES/tgroup.h5.xml -$SRC_H5DUMP_TESTFILES/thlink.h5.xml -$SRC_H5DUMP_TESTFILES/tloop.h5.xml -$SRC_H5DUMP_TESTFILES/tloop2.h5.xml -$SRC_H5DUMP_TESTFILES/tmany.h5.xml -$SRC_H5DUMP_TESTFILES/tname-amp.h5.xml -$SRC_H5DUMP_TESTFILES/tname-apos.h5.xml -$SRC_H5DUMP_TESTFILES/tnamed_dtype_attr.h5.xml -$SRC_H5DUMP_TESTFILES/tname-gt.h5.xml -$SRC_H5DUMP_TESTFILES/tname-lt.h5.xml -$SRC_H5DUMP_TESTFILES/tname-quot.h5.xml -$SRC_H5DUMP_TESTFILES/tname-sp.h5.xml -$SRC_H5DUMP_TESTFILES/tnestedcomp.h5.xml -$SRC_H5DUMP_TESTFILES/tnodata.h5.xml -$SRC_H5DUMP_TESTFILES/tobjref.h5.xml -$SRC_H5DUMP_TESTFILES/topaque.h5.xml -$SRC_H5DUMP_TESTFILES/torderattr1.h5.xml -$SRC_H5DUMP_TESTFILES/torderattr2.h5.xml -$SRC_H5DUMP_TESTFILES/torderattr3.h5.xml -$SRC_H5DUMP_TESTFILES/torderattr4.h5.xml -$SRC_H5DUMP_TESTFILES/tref.h5.xml -$SRC_H5DUMP_TESTFILES/tref-escapes.h5.xml -$SRC_H5DUMP_TESTFILES/tref-escapes-at.h5.xml -$SRC_H5DUMP_TESTFILES/tsaf.h5.xml -$SRC_H5DUMP_TESTFILES/tslink.h5.xml -$SRC_H5DUMP_TESTFILES/tstr.h5.xml -$SRC_H5DUMP_TESTFILES/tstr2.h5.xml -$SRC_H5DUMP_TESTFILES/tstring.h5.xml -$SRC_H5DUMP_TESTFILES/tstring-at.h5.xml -$SRC_H5DUMP_TESTFILES/tudlink.h5.xml -$SRC_H5DUMP_TESTFILES/tvldtypes1.h5.xml -$SRC_H5DUMP_TESTFILES/tvldtypes2.h5.xml -$SRC_H5DUMP_TESTFILES/tvldtypes3.h5.xml -$SRC_H5DUMP_TESTFILES/tvldtypes4.h5.xml -$SRC_H5DUMP_TESTFILES/tvldtypes5.h5.xml -$SRC_H5DUMP_TESTFILES/tvlstr.h5.xml -" - # # copy test files and expected output files from source dirs to test dir # @@ -1042,87 +899,6 @@ TOOLTEST3 filter_fail.ddl --enable-error-stack filter_fail.h5 # test for -o -y for dataset with attributes TOOLTEST tall-6.ddl --enable-error-stack -y -o data -d /g1/g1.1/dset1.1.1 tall.h5 -####### test for dataset packed bits ###### - -# test failure handling -# Missing file name -TOOLTEST tnofilename-with-packed-bits.ddl --enable-error-stack -# Limits: -# Maximum number of packed bits is 8 (for now). -# Maximum integer size is 64 (for now). -# Maximun Offset is 63 (Maximum size - 1). -# Maximum Offset+Length is 64 (Maximum size). -# Tests: -# Normal operation on both signed and unsigned int datasets. -# Sanity check -# Their rawdata output should be the same. -TOOLTEST tpbitsSignedWhole.ddl --enable-error-stack -d /DS08BITS -M 0,8 packedbits.h5 -TOOLTEST tpbitsUnsignedWhole.ddl --enable-error-stack -d /DU08BITS -M 0,8 packedbits.h5 -TOOLTEST tpbitsSignedIntWhole.ddl --enable-error-stack -d /DS16BITS -M 0,16 packedbits.h5 -TOOLTEST tpbitsUnsignedIntWhole.ddl --enable-error-stack -d /DU16BITS -M 0,16 packedbits.h5 -TOOLTEST tpbitsSignedLongWhole.ddl --enable-error-stack -d /DS32BITS -M 0,32 packedbits.h5 -TOOLTEST tpbitsUnsignedLongWhole.ddl --enable-error-stack -d /DU32BITS -M 0,32 packedbits.h5 -TOOLTEST tpbitsSignedLongLongWhole.ddl --enable-error-stack -d /DS64BITS -M 0,64 packedbits.h5 -TOOLTEST tpbitsUnsignedLongLongWhole.ddl --enable-error-stack -d /DU64BITS -M 0,64 packedbits.h5 -TOOLTEST tpbitsSignedLongLongWhole63.ddl --enable-error-stack -d /DS64BITS -M 0,63 packedbits.h5 -TOOLTEST tpbitsUnsignedLongLongWhole63.ddl --enable-error-stack -d /DU64BITS -M 0,63 packedbits.h5 -TOOLTEST tpbitsSignedLongLongWhole1.ddl --enable-error-stack -d /DS64BITS -M 1,63 packedbits.h5 -TOOLTEST tpbitsUnsignedLongLongWhole1.ddl --enable-error-stack -d /DU64BITS -M 1,63 packedbits.h5 -# Half sections -TOOLTEST tpbitsSigned4.ddl --enable-error-stack -d /DS08BITS -M 0,4,4,4 packedbits.h5 -TOOLTEST tpbitsUnsigned4.ddl --enable-error-stack -d /DU08BITS -M 0,4,4,4 packedbits.h5 -TOOLTEST tpbitsSignedInt8.ddl --enable-error-stack -d /DS16BITS -M 0,8,8,8 packedbits.h5 -TOOLTEST tpbitsUnsignedInt8.ddl --enable-error-stack -d /DU16BITS -M 0,8,8,8 packedbits.h5 -TOOLTEST tpbitsSignedLong16.ddl --enable-error-stack -d /DS32BITS -M 0,16,16,16 packedbits.h5 -TOOLTEST tpbitsUnsignedLong16.ddl --enable-error-stack -d /DU32BITS -M 0,16,16,16 packedbits.h5 -TOOLTEST tpbitsSignedLongLong32.ddl --enable-error-stack -d /DS64BITS -M 0,32,32,32 packedbits.h5 -TOOLTEST tpbitsUnsignedLongLong32.ddl --enable-error-stack -d /DU64BITS -M 0,32,32,32 packedbits.h5 -# Quarter sections -TOOLTEST tpbitsSigned2.ddl --enable-error-stack -d /DS08BITS -M 0,2,2,2,4,2,6,2 packedbits.h5 -TOOLTEST tpbitsUnsigned2.ddl --enable-error-stack -d /DU08BITS -M 0,2,2,2,4,2,6,2 packedbits.h5 -TOOLTEST tpbitsSignedInt4.ddl --enable-error-stack -d /DS16BITS -M 0,4,4,4,8,4,12,4 packedbits.h5 -TOOLTEST tpbitsUnsignedInt4.ddl --enable-error-stack -d /DU16BITS -M 0,4,4,4,8,4,12,4 packedbits.h5 -TOOLTEST tpbitsSignedLong8.ddl --enable-error-stack -d /DS32BITS -M 0,8,8,8,16,8,24,8 packedbits.h5 -TOOLTEST tpbitsUnsignedLong8.ddl --enable-error-stack -d /DU32BITS -M 0,8,8,8,16,8,24,8 packedbits.h5 -TOOLTEST tpbitsSignedLongLong16.ddl --enable-error-stack -d /DS64BITS -M 0,16,16,16,32,16,48,16 packedbits.h5 -TOOLTEST tpbitsUnsignedLongLong16.ddl --enable-error-stack -d /DU64BITS -M 0,16,16,16,32,16,48,16 packedbits.h5 -# Begin and End -TOOLTEST tpbitsSigned.ddl --enable-error-stack -d /DS08BITS -M 0,2,2,6 packedbits.h5 -TOOLTEST tpbitsUnsigned.ddl --enable-error-stack -d /DU08BITS -M 0,2,2,6 packedbits.h5 -TOOLTEST tpbitsSignedInt.ddl --enable-error-stack -d /DS16BITS -M 0,2,10,6 packedbits.h5 -TOOLTEST tpbitsUnsignedInt.ddl --enable-error-stack -d /DU16BITS -M 0,2,10,6 packedbits.h5 -TOOLTEST tpbitsSignedLong.ddl --enable-error-stack -d /DS32BITS -M 0,2,26,6 packedbits.h5 -TOOLTEST tpbitsUnsignedLong.ddl --enable-error-stack -d /DU32BITS -M 0,2,26,6 packedbits.h5 -TOOLTEST tpbitsSignedLongLong.ddl --enable-error-stack -d /DS64BITS -M 0,2,58,6 packedbits.h5 -TOOLTEST tpbitsUnsignedLongLong.ddl --enable-error-stack -d /DU64BITS -M 0,2,58,6 packedbits.h5 -# Overlapped packed bits. -TOOLTEST tpbitsOverlapped.ddl --enable-error-stack -d /DS08BITS -M 0,1,1,1,2,1,0,3 packedbits.h5 -# Maximum number of packed bits. -TOOLTEST tpbitsMax.ddl --enable-error-stack -d /DS08BITS -M 0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1 packedbits.h5 -# Compound type. -TOOLTEST tpbitsCompound.ddl --enable-error-stack -d /dset1 -M 0,1,1,1 tcompound.h5 -# Array type. -TOOLTEST tpbitsArray.ddl --enable-error-stack -d /Dataset1 -M 0,1,1,1 tarray1.h5 -# Test Error handling. -# Too many packed bits requested. Max is 8 for now. -TOOLTEST tpbitsMaxExceeded.ddl --enable-error-stack -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. -TOOLTEST tpbitsOffsetExceeded.ddl --enable-error-stack -d /DS08BITS -M 64,1 packedbits.h5 -TOOLTEST tpbitsCharOffsetExceeded.ddl --enable-error-stack -d /DS08BITS -M 8,1 packedbits.h5 -TOOLTEST tpbitsIntOffsetExceeded.ddl --enable-error-stack -d /DS16BITS -M 16,1 packedbits.h5 -TOOLTEST tpbitsLongOffsetExceeded.ddl --enable-error-stack -d /DS32BITS -M 32,1 packedbits.h5 -# Bad offset, must not be negative. -TOOLTEST tpbitsOffsetNegative.ddl --enable-error-stack -d /DS08BITS -M -1,1 packedbits.h5 -# Bad length, must not be positive. -TOOLTEST tpbitsLengthPositive.ddl --enable-error-stack -d /DS08BITS -M 4,0 packedbits.h5 -# Offset+Length is too large. Max is 8 for now. -TOOLTEST tpbitsLengthExceeded.ddl --enable-error-stack -d /DS08BITS -M 37,28 packedbits.h5 -TOOLTEST tpbitsCharLengthExceeded.ddl --enable-error-stack -d /DS08BITS -M 2,7 packedbits.h5 -TOOLTEST tpbitsIntLengthExceeded.ddl --enable-error-stack -d /DS16BITS -M 10,7 packedbits.h5 -TOOLTEST tpbitsLongLengthExceeded.ddl --enable-error-stack -d /DS32BITS -M 26,7 packedbits.h5 -# Incomplete pair of packed bits request. -TOOLTEST tpbitsIncomplete.ddl --enable-error-stack -d /DS08BITS -M 0,2,2,1,0,2,2, packedbits.h5 - # Report test results and exit if test $nerrors -eq 0 ; then diff --git a/tools/h5dump/testh5dumppbits.sh.in b/tools/h5dump/testh5dumppbits.sh.in new file mode 100644 index 0000000..393fcc1 --- /dev/null +++ b/tools/h5dump/testh5dumppbits.sh.in @@ -0,0 +1,495 @@ +#! /bin/sh +# +# Copyright by The HDF Group. +# Copyright by the Board of Trustees of the University of Illinois. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the files COPYING and Copyright.html. COPYING can be found at the root +# of the source code distribution tree; Copyright.html can be found at the +# root level of an installed copy of the electronic HDF5 document set and +# is linked from the top-level documents page. It can also be found at +# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have +# access to either file, you may request a copy from help@hdfgroup.org. +# +# Tests for the h5dump tool with packed bits type files + +# Determine which filters are available +USE_FILTER_SZIP="@USE_FILTER_SZIP@" +USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@" +USE_FILTER_SHUFFLE="@USE_FILTER_SHUFFLE@" +USE_FILTER_FLETCHER32="@USE_FILTER_FLETCHER32@" +USE_FILTER_NBIT="@USE_FILTER_NBIT@" +USE_FILTER_SCALEOFFSET="@USE_FILTER_SCALEOFFSET@" + +TESTNAME=h5dump +EXIT_SUCCESS=0 +EXIT_FAILURE=1 + +DUMPER=h5dump # The tool name +DUMPER_BIN=`pwd`/$DUMPER # The path of the tool binary + +H5DIFF=../h5diff/h5diff # The h5diff tool name +H5DIFF_BIN=`pwd`/$H5DIFF # The path of the h5diff tool binary + +H5IMPORT=../h5import/h5import # The h5import tool name +H5IMPORT_BIN=`pwd`/$H5IMPORT # The path of the h5import tool binary + + +CMP='cmp -s' +DIFF='diff -c' +CP='cp' + +nerrors=0 +verbose=yes + +# The build (current) directory might be different than the source directory. +if test -z "$srcdir"; then + srcdir=. +fi +# source dirs +SRC_TOOLS="$srcdir/../" + +SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles" +# testfiles source dirs for tools +SRC_H5LS_TESTFILES="$SRC_TOOLS_TESTFILES" +SRC_H5DUMP_TESTFILES="$SRC_TOOLS_TESTFILES" +SRC_H5DIFF_TESTFILES="$SRC_TOOLS/h5diff/testfiles" +SRC_H5COPY_TESTFILES="$SRC_TOOLS/h5copy/testfiles" +SRC_H5REPACK_TESTFILES="$SRC_TOOLS/h5repack/testfiles" +SRC_H5JAM_TESTFILES="$SRC_TOOLS/h5jam/testfiles" +SRC_H5STAT_TESTFILES="$SRC_TOOLS/h5stat/testfiles" +SRC_H5IMPORT_TESTFILES="$SRC_TOOLS/h5import/testfiles" + +TESTDIR=./testfiles +test -d $TESTDIR || mkdir $TESTDIR + +###################################################################### +# test files +# -------------------------------------------------------------------- +# All the test files copy from source directory to test directory +# NOTE: Keep this framework to add/remove test files. +# Any test files from other tools can be used in this framework. +# This list are also used for checking exist. +# Comment '#' without space can be used. +# -------------------------------------------------------------------- +LIST_HDF5_TEST_FILES=" +$SRC_H5DUMP_TESTFILES/packedbits.h5 +" + +LIST_OTHER_TEST_FILES=" +$SRC_H5DUMP_TESTFILES/tnofilename-with-packed-bits.ddl +$SRC_H5DUMP_TESTFILES/tpbitsArray.ddl +$SRC_H5DUMP_TESTFILES/tpbitsCompound.ddl +$SRC_H5DUMP_TESTFILES/tpbitsIncomplete.ddl +$SRC_H5DUMP_TESTFILES/tpbitsLengthExceeded.ddl +$SRC_H5DUMP_TESTFILES/tpbitsCharLengthExceeded.ddl +$SRC_H5DUMP_TESTFILES/tpbitsIntLengthExceeded.ddl +$SRC_H5DUMP_TESTFILES/tpbitsLongLengthExceeded.ddl +$SRC_H5DUMP_TESTFILES/tpbitsLengthPositive.ddl +$SRC_H5DUMP_TESTFILES/tpbitsMax.ddl +$SRC_H5DUMP_TESTFILES/tpbitsMaxExceeded.ddl +$SRC_H5DUMP_TESTFILES/tpbitsOffsetExceeded.ddl +$SRC_H5DUMP_TESTFILES/tpbitsCharOffsetExceeded.ddl +$SRC_H5DUMP_TESTFILES/tpbitsIntOffsetExceeded.ddl +$SRC_H5DUMP_TESTFILES/tpbitsLongOffsetExceeded.ddl +$SRC_H5DUMP_TESTFILES/tpbitsOffsetNegative.ddl +$SRC_H5DUMP_TESTFILES/tpbitsOverlapped.ddl +$SRC_H5DUMP_TESTFILES/tpbitsSigned.ddl +$SRC_H5DUMP_TESTFILES/tpbitsUnsigned.ddl +$SRC_H5DUMP_TESTFILES/tpbitsSignedInt.ddl +$SRC_H5DUMP_TESTFILES/tpbitsUnsignedInt.ddl +$SRC_H5DUMP_TESTFILES/tpbitsSignedLong.ddl +$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLong.ddl +$SRC_H5DUMP_TESTFILES/tpbitsSignedLongLong.ddl +$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLongLong.ddl +$SRC_H5DUMP_TESTFILES/tpbitsSignedWhole.ddl +$SRC_H5DUMP_TESTFILES/tpbitsUnsignedWhole.ddl +$SRC_H5DUMP_TESTFILES/tpbitsSignedIntWhole.ddl +$SRC_H5DUMP_TESTFILES/tpbitsUnsignedIntWhole.ddl +$SRC_H5DUMP_TESTFILES/tpbitsSignedLongWhole.ddl +$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLongWhole.ddl +$SRC_H5DUMP_TESTFILES/tpbitsSignedLongLongWhole.ddl +$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLongLongWhole.ddl +$SRC_H5DUMP_TESTFILES/tpbitsSignedLongLongWhole1.ddl +$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLongLongWhole1.ddl +$SRC_H5DUMP_TESTFILES/tpbitsSignedLongLongWhole63.ddl +$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLongLongWhole63.ddl +$SRC_H5DUMP_TESTFILES/tpbitsSigned4.ddl +$SRC_H5DUMP_TESTFILES/tpbitsUnsigned4.ddl +$SRC_H5DUMP_TESTFILES/tpbitsSignedInt8.ddl +$SRC_H5DUMP_TESTFILES/tpbitsUnsignedInt8.ddl +$SRC_H5DUMP_TESTFILES/tpbitsSignedLong16.ddl +$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLong16.ddl +$SRC_H5DUMP_TESTFILES/tpbitsSignedLongLong32.ddl +$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLongLong32.ddl +$SRC_H5DUMP_TESTFILES/tpbitsSigned2.ddl +$SRC_H5DUMP_TESTFILES/tpbitsUnsigned2.ddl +$SRC_H5DUMP_TESTFILES/tpbitsSignedInt4.ddl +$SRC_H5DUMP_TESTFILES/tpbitsUnsignedInt4.ddl +$SRC_H5DUMP_TESTFILES/tpbitsSignedLong8.ddl +$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLong8.ddl +$SRC_H5DUMP_TESTFILES/tpbitsSignedLongLong16.ddl +$SRC_H5DUMP_TESTFILES/tpbitsUnsignedLongLong16.ddl +" + +# +# copy test files and expected output files from source dirs to test dir +# +COPY_TESTFILES="$LIST_HDF5_TEST_FILES $LIST_OTHER_TEST_FILES $LIST_HDF5_TEST_FILES_XML $LIST_OTHER_TEST_FILES_XML" + +COPY_TESTFILES_TO_TESTDIR() +{ + # copy test files. Used -f to make sure get a new copy + for tstfile in $COPY_TESTFILES + do + # ignore '#' comment + echo $tstfile | tr -d ' ' | grep '^#' > /dev/null + RET=$? + if [ $RET -eq 1 ]; then + if [ -a $tstfile ]; then + $CP -f $tstfile $TESTDIR + else + echo "Error: FAILED to copy $tstfile" + echo " $tstfile doesn't exist!" + exit $EXIT_FAILURE + fi + fi + done +} + + +# Print a line-line message left justified in a field of 70 characters +# beginning with the word "Testing". +# +TESTING() { + SPACES=" " + echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' +} + +# Source in the output filter function definitions. +. $srcdir/../../bin/output_filter.sh + +# Run a test and print PASS or *FAIL*. If a test fails then increment +# the `nerrors' global variable and (if $verbose is set) display the +# difference between the actual output and the expected output. The +# expected output is given as the first argument to this function and +# the actual output file is calculated by replacing the `.ddl' with +# `.out'. The actual output is not removed if $HDF5_NOCLEANUP has a +# non-zero value. +# +TOOLTEST() { + expect="$TESTDIR/$1" + actual="$TESTDIR/`basename $1 .ddl`.out" + actual_err="$TESTDIR/`basename $1 .ddl`.err" + actual_sav=${actual}-sav + actual_err_sav=${actual_err}-sav + shift + + # Run test. + TESTING $DUMPER $@ + ( + cd $TESTDIR + $RUNSERIAL $DUMPER_BIN "$@" + ) >$actual 2>$actual_err + + # save actual and actual_err in case they are needed later. + cp $actual $actual_sav + STDOUT_FILTER $actual + cp $actual_err $actual_err_sav + STDERR_FILTER $actual_err + cat $actual_err >> $actual + + if [ ! -f $expect ]; then + # Create the expect file if it doesn't yet exist. + echo " CREATED" + cp $actual $expect + elif $CMP $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 $expect $actual |sed 's/^/ /' + fi + + # Clean up output file + if test -z "$HDF5_NOCLEANUP"; then + rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext + fi + +} + + +# same as TOOLTEST1 but compares generated file to expected output +# and compares the generated data file to the expected data file +# used for the binary tests that expect a full path in -o without -b +TOOLTEST2() { + + expectdata="$TESTDIR/$1" + expect="$TESTDIR/`basename $1 .exp`.ddl" + actualdata="$TESTDIR/`basename $1 .exp`.txt" + actual="$TESTDIR/`basename $1 .exp`.out" + actual_err="$TESTDIR/`basename $1 .exp`.err" + shift + + # Run test. + TESTING $DUMPER $@ + ( + cd $TESTDIR + $RUNSERIAL $DUMPER_BIN "$@" + ) >$actual 2>$actual_err + cat $actual_err >> $actual + + if [ ! -f $expect ]; then + # Create the expect file if it doesn't yet exist. + echo " CREATED" + cp $actual $expect + elif $CMP $expect $actual; then + if [ ! -f $expectdata ]; then + # Create the expect data file if it doesn't yet exist. + echo " CREATED" + cp $actualdata $expectdata + elif $CMP $expectdata $actualdata; then + echo " PASSED" + else + echo "*FAILED*" + echo " Expected datafile (*.exp) differs from actual datafile (*.txt)" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /' + fi + else + echo "*FAILED*" + echo " Expected result (*.ddl) differs from actual result (*.out)" + 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 $actualdata $actual_err + fi + +} + +# same as TOOLTEST but filters error stack outp +# Extract file name, line number, version and thread IDs because they may be different +TOOLTEST3() { + + expect="$TESTDIR/$1" + actual="$TESTDIR/`basename $1 .ddl`.out" + actual_err="$TESTDIR/`basename $1 .ddl`.err" + actual_ext="$TESTDIR/`basename $1 .ddl`.ext" + actual_sav=${actual}-sav + actual_err_sav=${actual_err}-sav + shift + + # Run test. + TESTING $DUMPER $@ + ( + cd $TESTDIR + $RUNSERIAL $DUMPER_BIN "$@" + ) >$actual 2>$actual_err + + # save actual and actual_err in case they are needed later. + cp $actual $actual_sav + STDOUT_FILTER $actual + cp $actual_err $actual_err_sav + STDERR_FILTER $actual_err + + # Extract file name, line number, version and thread IDs because they may be different + sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ + -e 's/line [0-9]*/line (number)/' \ + -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ + -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ + -e 's/H5Eget_auto[1-2]*/H5Eget_auto(1 or 2)/' \ + -e 's/H5Eset_auto[1-2]*/H5Eset_auto(1 or 2)/' \ + $actual_err > $actual_ext + cat $actual_ext >> $actual + + if [ ! -f $expect ]; then + # Create the expect file if it doesn't yet exist. + echo " CREATED" + cp $actual $expect + elif $CMP $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 $expect $actual |sed 's/^/ /' + fi + + # Clean up output file + if test -z "$HDF5_NOCLEANUP"; then + rm -f $actual $actual_err $actual_sav $actual_err_sav + fi + +} + +# Print a "SKIP" message +SKIP() { + TESTING $DUMPER $@ + echo " -SKIP-" +} + +# Print a line-line message left justified in a field of 70 characters +# +PRINT_H5DIFF() { + SPACES=" " + echo " Running h5diff $* $SPACES" | cut -c1-70 | tr -d '\012' +} + + +# Call the h5diff tool +# +DIFFTEST() +{ + PRINT_H5DIFF $@ + ( + cd $TESTDIR + $RUNSERIAL $H5DIFF_BIN "$@" -q + ) + RET=$? + if [ $RET != 0 ] ; then + echo "*FAILED*" + nerrors="`expr $nerrors + 1`" + else + echo " PASSED" + fi + +} + +# Print a line-line message left justified in a field of 70 characters +# beginning with the word "Verifying". +# +PRINT_H5IMPORT() { + SPACES=" " + echo " Running h5import $* $SPACES" | cut -c1-70 | tr -d '\012' +} + +# Call the h5import tool +# +IMPORTTEST() +{ + # remove the output hdf5 file if it exists + hdf5_file="$TESTDIR/$5" + if [ -f $hdf5_file ]; then + rm -f $hdf5_file + fi + + PRINT_H5IMPORT $@ + ( + cd $TESTDIR + $RUNSERIAL $H5IMPORT_BIN "$@" + ) + RET=$? + if [ $RET != 0 ] ; then + echo "*FAILED*" + nerrors="`expr $nerrors + 1`" + else + echo " PASSED" + fi + +} + + +############################################################################## +############################################################################## +### T H E T E S T S ### +############################################################################## +############################################################################## +# prepare for test +COPY_TESTFILES_TO_TESTDIR + +####### test for dataset packed bits ###### + +# test failure handling +# Missing file name +TOOLTEST tnofilename-with-packed-bits.ddl --enable-error-stack +# Limits: +# Maximum number of packed bits is 8 (for now). +# Maximum integer size is 64 (for now). +# Maximun Offset is 63 (Maximum size - 1). +# Maximum Offset+Length is 64 (Maximum size). +# Tests: +# Normal operation on both signed and unsigned int datasets. +# Sanity check +# Their rawdata output should be the same. +TOOLTEST tpbitsSignedWhole.ddl --enable-error-stack -d /DS08BITS -M 0,8 packedbits.h5 +TOOLTEST tpbitsUnsignedWhole.ddl --enable-error-stack -d /DU08BITS -M 0,8 packedbits.h5 +TOOLTEST tpbitsSignedIntWhole.ddl --enable-error-stack -d /DS16BITS -M 0,16 packedbits.h5 +TOOLTEST tpbitsUnsignedIntWhole.ddl --enable-error-stack -d /DU16BITS -M 0,16 packedbits.h5 +TOOLTEST tpbitsSignedLongWhole.ddl --enable-error-stack -d /DS32BITS -M 0,32 packedbits.h5 +TOOLTEST tpbitsUnsignedLongWhole.ddl --enable-error-stack -d /DU32BITS -M 0,32 packedbits.h5 +TOOLTEST tpbitsSignedLongLongWhole.ddl --enable-error-stack -d /DS64BITS -M 0,64 packedbits.h5 +TOOLTEST tpbitsUnsignedLongLongWhole.ddl --enable-error-stack -d /DU64BITS -M 0,64 packedbits.h5 +TOOLTEST tpbitsSignedLongLongWhole63.ddl --enable-error-stack -d /DS64BITS -M 0,63 packedbits.h5 +TOOLTEST tpbitsUnsignedLongLongWhole63.ddl --enable-error-stack -d /DU64BITS -M 0,63 packedbits.h5 +TOOLTEST tpbitsSignedLongLongWhole1.ddl --enable-error-stack -d /DS64BITS -M 1,63 packedbits.h5 +TOOLTEST tpbitsUnsignedLongLongWhole1.ddl --enable-error-stack -d /DU64BITS -M 1,63 packedbits.h5 +# Half sections +TOOLTEST tpbitsSigned4.ddl --enable-error-stack -d /DS08BITS -M 0,4,4,4 packedbits.h5 +TOOLTEST tpbitsUnsigned4.ddl --enable-error-stack -d /DU08BITS -M 0,4,4,4 packedbits.h5 +TOOLTEST tpbitsSignedInt8.ddl --enable-error-stack -d /DS16BITS -M 0,8,8,8 packedbits.h5 +TOOLTEST tpbitsUnsignedInt8.ddl --enable-error-stack -d /DU16BITS -M 0,8,8,8 packedbits.h5 +TOOLTEST tpbitsSignedLong16.ddl --enable-error-stack -d /DS32BITS -M 0,16,16,16 packedbits.h5 +TOOLTEST tpbitsUnsignedLong16.ddl --enable-error-stack -d /DU32BITS -M 0,16,16,16 packedbits.h5 +TOOLTEST tpbitsSignedLongLong32.ddl --enable-error-stack -d /DS64BITS -M 0,32,32,32 packedbits.h5 +TOOLTEST tpbitsUnsignedLongLong32.ddl --enable-error-stack -d /DU64BITS -M 0,32,32,32 packedbits.h5 +# Quarter sections +TOOLTEST tpbitsSigned2.ddl --enable-error-stack -d /DS08BITS -M 0,2,2,2,4,2,6,2 packedbits.h5 +TOOLTEST tpbitsUnsigned2.ddl --enable-error-stack -d /DU08BITS -M 0,2,2,2,4,2,6,2 packedbits.h5 +TOOLTEST tpbitsSignedInt4.ddl --enable-error-stack -d /DS16BITS -M 0,4,4,4,8,4,12,4 packedbits.h5 +TOOLTEST tpbitsUnsignedInt4.ddl --enable-error-stack -d /DU16BITS -M 0,4,4,4,8,4,12,4 packedbits.h5 +TOOLTEST tpbitsSignedLong8.ddl --enable-error-stack -d /DS32BITS -M 0,8,8,8,16,8,24,8 packedbits.h5 +TOOLTEST tpbitsUnsignedLong8.ddl --enable-error-stack -d /DU32BITS -M 0,8,8,8,16,8,24,8 packedbits.h5 +TOOLTEST tpbitsSignedLongLong16.ddl --enable-error-stack -d /DS64BITS -M 0,16,16,16,32,16,48,16 packedbits.h5 +TOOLTEST tpbitsUnsignedLongLong16.ddl --enable-error-stack -d /DU64BITS -M 0,16,16,16,32,16,48,16 packedbits.h5 +# Begin and End +TOOLTEST tpbitsSigned.ddl --enable-error-stack -d /DS08BITS -M 0,2,2,6 packedbits.h5 +TOOLTEST tpbitsUnsigned.ddl --enable-error-stack -d /DU08BITS -M 0,2,2,6 packedbits.h5 +TOOLTEST tpbitsSignedInt.ddl --enable-error-stack -d /DS16BITS -M 0,2,10,6 packedbits.h5 +TOOLTEST tpbitsUnsignedInt.ddl --enable-error-stack -d /DU16BITS -M 0,2,10,6 packedbits.h5 +TOOLTEST tpbitsSignedLong.ddl --enable-error-stack -d /DS32BITS -M 0,2,26,6 packedbits.h5 +TOOLTEST tpbitsUnsignedLong.ddl --enable-error-stack -d /DU32BITS -M 0,2,26,6 packedbits.h5 +TOOLTEST tpbitsSignedLongLong.ddl --enable-error-stack -d /DS64BITS -M 0,2,58,6 packedbits.h5 +TOOLTEST tpbitsUnsignedLongLong.ddl --enable-error-stack -d /DU64BITS -M 0,2,58,6 packedbits.h5 +# Overlapped packed bits. +TOOLTEST tpbitsOverlapped.ddl --enable-error-stack -d /DS08BITS -M 0,1,1,1,2,1,0,3 packedbits.h5 +# Maximum number of packed bits. +TOOLTEST tpbitsMax.ddl --enable-error-stack -d /DS08BITS -M 0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1 packedbits.h5 +# Compound type. +TOOLTEST tpbitsCompound.ddl --enable-error-stack -d /dset1 -M 0,1,1,1 tcompound.h5 +# Array type. +TOOLTEST tpbitsArray.ddl --enable-error-stack -d /Dataset1 -M 0,1,1,1 tarray1.h5 +# Test Error handling. +# Too many packed bits requested. Max is 8 for now. +TOOLTEST tpbitsMaxExceeded.ddl --enable-error-stack -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. +TOOLTEST tpbitsOffsetExceeded.ddl --enable-error-stack -d /DS08BITS -M 64,1 packedbits.h5 +TOOLTEST tpbitsCharOffsetExceeded.ddl --enable-error-stack -d /DS08BITS -M 8,1 packedbits.h5 +TOOLTEST tpbitsIntOffsetExceeded.ddl --enable-error-stack -d /DS16BITS -M 16,1 packedbits.h5 +TOOLTEST tpbitsLongOffsetExceeded.ddl --enable-error-stack -d /DS32BITS -M 32,1 packedbits.h5 +# Bad offset, must not be negative. +TOOLTEST tpbitsOffsetNegative.ddl --enable-error-stack -d /DS08BITS -M -1,1 packedbits.h5 +# Bad length, must not be positive. +TOOLTEST tpbitsLengthPositive.ddl --enable-error-stack -d /DS08BITS -M 4,0 packedbits.h5 +# Offset+Length is too large. Max is 8 for now. +TOOLTEST tpbitsLengthExceeded.ddl --enable-error-stack -d /DS08BITS -M 37,28 packedbits.h5 +TOOLTEST tpbitsCharLengthExceeded.ddl --enable-error-stack -d /DS08BITS -M 2,7 packedbits.h5 +TOOLTEST tpbitsIntLengthExceeded.ddl --enable-error-stack -d /DS16BITS -M 10,7 packedbits.h5 +TOOLTEST tpbitsLongLengthExceeded.ddl --enable-error-stack -d /DS32BITS -M 26,7 packedbits.h5 +# Incomplete pair of packed bits request. +TOOLTEST tpbitsIncomplete.ddl --enable-error-stack -d /DS08BITS -M 0,2,2,1,0,2,2, packedbits.h5 + + +# Report test results and exit +if test $nerrors -eq 0 ; then + echo "All $TESTNAME tests passed." + exit $EXIT_SUCCESS +else + echo "$TESTNAME tests failed with $nerrors errors." + exit $EXIT_FAILURE +fi diff --git a/tools/h5dump/testh5dumpxml.sh.in b/tools/h5dump/testh5dumpxml.sh.in index 1bbf232..4e6081b 100644 --- a/tools/h5dump/testh5dumpxml.sh.in +++ b/tools/h5dump/testh5dumpxml.sh.in @@ -26,6 +26,7 @@ DUMPER_BIN=`pwd`/$DUMPER # The path of the tool binary CMP='cmp -s' DIFF='diff -c' +CP='cp' nerrors=0 verbose=yes @@ -34,8 +35,176 @@ verbose=yes if test -z "$srcdir"; then srcdir=. fi +# source dirs +SRC_TOOLS="$srcdir/../" -test -d ../testfiles || mkdir ../testfiles +SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles" +# testfiles source dirs for tools +SRC_H5LS_TESTFILES="$SRC_TOOLS_TESTFILES" +SRC_H5DUMP_TESTFILES="$SRC_TOOLS_TESTFILES" +SRC_H5DIFF_TESTFILES="$SRC_TOOLS/h5diff/testfiles" +SRC_H5COPY_TESTFILES="$SRC_TOOLS/h5copy/testfiles" +SRC_H5REPACK_TESTFILES="$SRC_TOOLS/h5repack/testfiles" +SRC_H5JAM_TESTFILES="$SRC_TOOLS/h5jam/testfiles" +SRC_H5STAT_TESTFILES="$SRC_TOOLS/h5stat/testfiles" +SRC_H5IMPORT_TESTFILES="$SRC_TOOLS/h5import/testfiles" + +TESTDIR=./testfiles +test -d $TESTDIR || mkdir $TESTDIR + +###################################################################### +# test files +# -------------------------------------------------------------------- +# All the test files copy from source directory to test directory +# NOTE: Keep this framework to add/remove test files. +# Any test files from other tools can be used in this framework. +# This list are also used for checking exist. +# Comment '#' without space can be used. +# -------------------------------------------------------------------- +LIST_HDF5_TEST_FILES_XML=" +$SRC_H5DUMP_TESTFILES/tall.h5 +$SRC_H5DUMP_TESTFILES/tarray1.h5 +$SRC_H5DUMP_TESTFILES/tarray2.h5 +$SRC_H5DUMP_TESTFILES/tarray3.h5 +$SRC_H5DUMP_TESTFILES/tarray6.h5 +$SRC_H5DUMP_TESTFILES/tarray7.h5 +$SRC_H5DUMP_TESTFILES/tattr.h5 +$SRC_H5DUMP_TESTFILES/tbitfields.h5 +$SRC_H5DUMP_TESTFILES/tcompound.h5 +$SRC_H5DUMP_TESTFILES/tcompound2.h5 +$SRC_H5DUMP_TESTFILES/tcompound_complex.h5 +$SRC_H5DUMP_TESTFILES/tdatareg.h5 +$SRC_H5DUMP_TESTFILES/tdset.h5 +$SRC_H5DUMP_TESTFILES/tdset2.h5 +$SRC_H5DUMP_TESTFILES/tempty.h5 +$SRC_H5DUMP_TESTFILES/tenum.h5 +$SRC_H5DUMP_TESTFILES/textlink.h5 +$SRC_H5DUMP_TESTFILES/tfpformat.h5 +$SRC_H5DUMP_TESTFILES/tgroup.h5 +$SRC_H5DUMP_TESTFILES/thlink.h5 +$SRC_H5DUMP_TESTFILES/tloop.h5 +$SRC_H5DUMP_TESTFILES/tloop2.h5 +$SRC_H5DUMP_TESTFILES/tmany.h5 +$SRC_H5DUMP_TESTFILES/tname-amp.h5 +$SRC_H5DUMP_TESTFILES/tname-apos.h5 +$SRC_H5DUMP_TESTFILES/tname-gt.h5 +$SRC_H5DUMP_TESTFILES/tname-lt.h5 +$SRC_H5DUMP_TESTFILES/tname-quot.h5 +$SRC_H5DUMP_TESTFILES/tname-sp.h5 +$SRC_H5DUMP_TESTFILES/tnamed_dtype_attr.h5 +$SRC_H5DUMP_TESTFILES/tnestedcomp.h5 +$SRC_H5DUMP_TESTFILES/tnodata.h5 +$SRC_H5DUMP_TESTFILES/tobjref.h5 +$SRC_H5DUMP_TESTFILES/topaque.h5 +$SRC_H5DUMP_TESTFILES/torderattr.h5 +$SRC_H5DUMP_TESTFILES/tref.h5 +$SRC_H5DUMP_TESTFILES/tref-escapes.h5 +$SRC_H5DUMP_TESTFILES/tref-escapes-at.h5 +$SRC_H5DUMP_TESTFILES/tsaf.h5 +$SRC_H5DUMP_TESTFILES/tslink.h5 +$SRC_H5DUMP_TESTFILES/tstring.h5 +$SRC_H5DUMP_TESTFILES/tstring-at.h5 +$SRC_H5DUMP_TESTFILES/tstr.h5 +$SRC_H5DUMP_TESTFILES/tstr2.h5 +$SRC_H5DUMP_TESTFILES/tudlink.h5 +$SRC_H5DUMP_TESTFILES/tvldtypes1.h5 +$SRC_H5DUMP_TESTFILES/tvldtypes2.h5 +$SRC_H5DUMP_TESTFILES/tvldtypes3.h5 +$SRC_H5DUMP_TESTFILES/tvldtypes4.h5 +$SRC_H5DUMP_TESTFILES/tvldtypes5.h5 +$SRC_H5DUMP_TESTFILES/tvlstr.h5 +" + +LIST_OTHER_TEST_FILES_XML=" +$SRC_H5DUMP_TESTFILES/tall.h5.xml +$SRC_H5DUMP_TESTFILES/tall-2A.h5.xml +$SRC_H5DUMP_TESTFILES/tarray1.h5.xml +$SRC_H5DUMP_TESTFILES/tarray2.h5.xml +$SRC_H5DUMP_TESTFILES/tarray3.h5.xml +$SRC_H5DUMP_TESTFILES/tarray6.h5.xml +$SRC_H5DUMP_TESTFILES/tarray7.h5.xml +$SRC_H5DUMP_TESTFILES/tattr.h5.xml +$SRC_H5DUMP_TESTFILES/tbitfields.h5.xml +$SRC_H5DUMP_TESTFILES/tcompound_complex.h5.xml +$SRC_H5DUMP_TESTFILES/tcompound.h5.xml +$SRC_H5DUMP_TESTFILES/tcompound2.h5.xml +$SRC_H5DUMP_TESTFILES/tdatareg.h5.xml +$SRC_H5DUMP_TESTFILES/tdset.h5.xml +$SRC_H5DUMP_TESTFILES/tdset2.h5.xml +$SRC_H5DUMP_TESTFILES/tempty.h5.xml +$SRC_H5DUMP_TESTFILES/tempty-dtd.h5.xml +$SRC_H5DUMP_TESTFILES/tempty-dtd-2.h5.xml +$SRC_H5DUMP_TESTFILES/tempty-dtd-uri.h5.xml +$SRC_H5DUMP_TESTFILES/tempty-nons.h5.xml +$SRC_H5DUMP_TESTFILES/tempty-nons-2.h5.xml +$SRC_H5DUMP_TESTFILES/tempty-nons-uri.h5.xml +$SRC_H5DUMP_TESTFILES/tempty-ns.h5.xml +$SRC_H5DUMP_TESTFILES/tempty-ns-2.h5.xml +$SRC_H5DUMP_TESTFILES/tenum.h5.xml +$SRC_H5DUMP_TESTFILES/textlink.h5.xml +$SRC_H5DUMP_TESTFILES/tfpformat.h5.xml +$SRC_H5DUMP_TESTFILES/tgroup.h5.xml +$SRC_H5DUMP_TESTFILES/thlink.h5.xml +$SRC_H5DUMP_TESTFILES/tloop.h5.xml +$SRC_H5DUMP_TESTFILES/tloop2.h5.xml +$SRC_H5DUMP_TESTFILES/tmany.h5.xml +$SRC_H5DUMP_TESTFILES/tname-amp.h5.xml +$SRC_H5DUMP_TESTFILES/tname-apos.h5.xml +$SRC_H5DUMP_TESTFILES/tnamed_dtype_attr.h5.xml +$SRC_H5DUMP_TESTFILES/tname-gt.h5.xml +$SRC_H5DUMP_TESTFILES/tname-lt.h5.xml +$SRC_H5DUMP_TESTFILES/tname-quot.h5.xml +$SRC_H5DUMP_TESTFILES/tname-sp.h5.xml +$SRC_H5DUMP_TESTFILES/tnestedcomp.h5.xml +$SRC_H5DUMP_TESTFILES/tnodata.h5.xml +$SRC_H5DUMP_TESTFILES/tobjref.h5.xml +$SRC_H5DUMP_TESTFILES/topaque.h5.xml +$SRC_H5DUMP_TESTFILES/torderattr1.h5.xml +$SRC_H5DUMP_TESTFILES/torderattr2.h5.xml +$SRC_H5DUMP_TESTFILES/torderattr3.h5.xml +$SRC_H5DUMP_TESTFILES/torderattr4.h5.xml +$SRC_H5DUMP_TESTFILES/tref.h5.xml +$SRC_H5DUMP_TESTFILES/tref-escapes.h5.xml +$SRC_H5DUMP_TESTFILES/tref-escapes-at.h5.xml +$SRC_H5DUMP_TESTFILES/tsaf.h5.xml +$SRC_H5DUMP_TESTFILES/tslink.h5.xml +$SRC_H5DUMP_TESTFILES/tstr.h5.xml +$SRC_H5DUMP_TESTFILES/tstr2.h5.xml +$SRC_H5DUMP_TESTFILES/tstring.h5.xml +$SRC_H5DUMP_TESTFILES/tstring-at.h5.xml +$SRC_H5DUMP_TESTFILES/tudlink.h5.xml +$SRC_H5DUMP_TESTFILES/tvldtypes1.h5.xml +$SRC_H5DUMP_TESTFILES/tvldtypes2.h5.xml +$SRC_H5DUMP_TESTFILES/tvldtypes3.h5.xml +$SRC_H5DUMP_TESTFILES/tvldtypes4.h5.xml +$SRC_H5DUMP_TESTFILES/tvldtypes5.h5.xml +$SRC_H5DUMP_TESTFILES/tvlstr.h5.xml +" + +# +# copy test files and expected output files from source dirs to test dir +# +COPY_TESTFILES="$LIST_HDF5_TEST_FILES_XML $LIST_OTHER_TEST_FILES_XML" + +COPY_TESTFILES_TO_TESTDIR() +{ + # copy test files. Used -f to make sure get a new copy + for tstfile in $COPY_TESTFILES + do + # ignore '#' comment + echo $tstfile | tr -d ' ' | grep '^#' > /dev/null + RET=$? + if [ $RET -eq 1 ]; then + if [ -a $tstfile ]; then + $CP -f $tstfile $TESTDIR + else + echo "Error: FAILED to copy $tstfile" + echo " $tstfile doesn't exist!" + exit $EXIT_FAILURE + fi + fi + done +} # Print a line-line message left justified in a field of 70 characters # beginning with the word "Testing". -- cgit v0.12 From b904ca7ec369149f858495860795fd7afcba8670 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 22 May 2012 16:36:45 -0500 Subject: [svn-r22391] HDFFV-7999: h5dump did not display H5T_DSET_UTF8. Changed if/else block to switch like in h5ls, and distinguished between ERROR and UNKNOWN. Reviewed by JKM Tested: local linux --- MANIFEST | 2 ++ tools/h5dump/CMakeLists.txt | 7 ++++ tools/h5dump/h5dumpgentest.c | 50 +++++++++++++++++++++++++++++ tools/h5dump/testh5dump.sh.in | 5 +++ tools/lib/h5tools_dump.c | 73 +++++++++++++++++++++++++++++++++++------- tools/testfiles/charsets.ddl | 27 ++++++++++++++++ tools/testfiles/charsets.h5 | Bin 0 -> 8288 bytes 7 files changed, 152 insertions(+), 12 deletions(-) create mode 100644 tools/testfiles/charsets.ddl create mode 100644 tools/testfiles/charsets.h5 diff --git a/MANIFEST b/MANIFEST index ea78fc3..2fc3949 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1280,6 +1280,8 @@ ./tools/h5stat/testfiles/h5stat_tsohm.h5 # h5dump test files +./tools/testfiles/charsets.h5 +./tools/testfiles/charsets.ddl ./tools/testfiles/family_file00000.h5 ./tools/testfiles/family_file00001.h5 ./tools/testfiles/family_file00002.h5 diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt index a6e452d..ad19ba4 100644 --- a/tools/h5dump/CMakeLists.txt +++ b/tools/h5dump/CMakeLists.txt @@ -43,6 +43,7 @@ IF (BUILD_TESTING) # Copy all the HDF5 files from the test directory into the source directory # -------------------------------------------------------------------- SET (HDF5_REFERENCE_FILES + charsets.ddl file_space.ddl filter_fail.ddl packedbits.ddl @@ -239,6 +240,7 @@ IF (BUILD_TESTING) tvlstr.h5.xml ) SET (HDF5_REFERENCE_TEST_FILES + charsets.h5 file_space.h5 filter_fail.h5 packedbits.h5 @@ -676,6 +678,8 @@ IF (BUILD_TESTING) COMMAND ${CMAKE_COMMAND} -E remove h5dump-help.out + charsets.out + charsets.out.err file_space.out file_space.out.err filter_fail.out @@ -1060,6 +1064,9 @@ IF (BUILD_TESTING) # test printing characters in ASCII instead of decimal ADD_H5_TEST (tchar1 0 --enable-error-stack -r tchar.h5) + # test datatypes in ASCII and UTF8 + ADD_H5_TEST (charsets 0 --enable-error-stack charsets.h5) + # rev. 2004 # tests for super block ADD_H5_TEST (tboot1 0 --enable-error-stack -H -B -d dset tfcontents1.h5) diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c index b28f3de..4fab379 100644 --- a/tools/h5dump/h5dumpgentest.c +++ b/tools/h5dump/h5dumpgentest.c @@ -97,6 +97,7 @@ #define FILE65 "file_space.h5" #define FILE66 "packedbits.h5" #define FILE67 "zerodim.h5" +#define FILE68 "charsets.h5" @@ -7132,6 +7133,54 @@ gent_packedbits(void) } /*------------------------------------------------------------------------- + * Function: gent_charsets + * + * Purpose: Generate a file to be used in the character set test + * Contains: + * 1) a ascii datatype + * 2) a utf8 datatype + * + *------------------------------------------------------------------------- + */ +static void +gent_charsets(void) +{ + hid_t fid, did, sid; + herr_t status; + hsize_t dim[] = {1}; /* Dataspace dimensions */ + typedef struct CharSetInfo { + const char *ascii_p_; + const char *utf8_p_; + } CharSetInfo; + + sid = H5Screate_simple( 1, dim, NULL ); + fid = H5Fcreate( FILE68, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT ); + + hid_t charset_dtid = H5Tcreate( H5T_COMPOUND, sizeof( CharSetInfo ) ); + + hid_t ascii_dtid = H5Tcreate( H5T_STRING, H5T_VARIABLE ); + status = H5Tset_cset( ascii_dtid, H5T_CSET_ASCII ); + H5Tinsert( charset_dtid, "ascii", HOFFSET(CharSetInfo, ascii_p_ ), ascii_dtid ); + + hid_t utf8_dtid = H5Tcreate( H5T_STRING, H5T_VARIABLE ); + status = H5Tset_cset( utf8_dtid, H5T_CSET_UTF8 ); + H5Tinsert( charset_dtid, "utf8", HOFFSET( CharSetInfo, utf8_p_ ), utf8_dtid ); + + did = H5Dcreate2( fid, "CharSets", charset_dtid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT ); + + const char * writeData[] = { "ascii", "utf8", }; + status = H5Dwrite( did, charset_dtid, H5S_ALL, H5S_ALL, H5P_DEFAULT, writeData ); + + H5Tclose( charset_dtid ); + H5Tclose( ascii_dtid ); + H5Tclose( utf8_dtid ); + H5Sclose( sid ); + H5Dclose( did ); + H5Fclose( fid ); +} + + +/*------------------------------------------------------------------------- * Function: main * *------------------------------------------------------------------------- @@ -7207,6 +7256,7 @@ int main(void) gent_extlinks(); gent_fs_strategy_threshold(); gent_packedbits(); + gent_charsets(); return 0; } diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in index 5441e25..016b4f1 100644 --- a/tools/h5dump/testh5dump.sh.in +++ b/tools/h5dump/testh5dump.sh.in @@ -75,6 +75,7 @@ test -d $TESTDIR || mkdir $TESTDIR # Comment '#' without space can be used. # -------------------------------------------------------------------- LIST_HDF5_TEST_FILES=" +$SRC_H5DUMP_TESTFILES/charsets.h5 $SRC_H5DUMP_TESTFILES/file_space.h5 $SRC_H5DUMP_TESTFILES/filter_fail.h5 $SRC_H5DUMP_TESTFILES/packedbits.h5 @@ -161,6 +162,7 @@ $SRC_H5DUMP_TESTFILES/tvms.h5 " LIST_OTHER_TEST_FILES=" +$SRC_H5DUMP_TESTFILES/charsets.ddl $SRC_H5DUMP_TESTFILES/file_space.ddl $SRC_H5DUMP_TESTFILES/filter_fail.ddl $SRC_H5DUMP_TESTFILES/packedbits.ddl @@ -691,6 +693,9 @@ TOOLTEST tno-subset.ddl --no-compact-subset -d "AHFINDERDIRECT::ah_centroid_t[0] # test printing characters in ASCII instead of decimal TOOLTEST tchar1.ddl --enable-error-stack -r tchar.h5 +# test datatypes in ASCII and UTF8 +TOOLTEST charsets.ddl --enable-error-stack charsets.h5 + # rev. 2004 # tests for super block diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 194e85e..20c1c8f 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -2119,14 +2119,38 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ h5tools_str_reset(buffer); h5tools_str_append(buffer, "%s ", STRPAD); - if (str_pad == H5T_STR_NULLTERM) - h5tools_str_append(buffer, "H5T_STR_NULLTERM;"); - else if (str_pad == H5T_STR_NULLPAD) - h5tools_str_append(buffer, "H5T_STR_NULLPAD;"); - else if (str_pad == H5T_STR_SPACEPAD) - h5tools_str_append(buffer, "H5T_STR_SPACEPAD;"); - else - h5tools_str_append(buffer, "H5T_STR_ERROR;"); + switch (str_pad) { + case H5T_STR_NULLTERM: + h5tools_str_append(buffer, "H5T_STR_NULLTERM;"); + break; + case H5T_STR_NULLPAD: + h5tools_str_append(buffer, "H5T_STR_NULLPAD;"); + break; + case H5T_STR_SPACEPAD: + h5tools_str_append(buffer, "H5T_STR_SPACEPAD;"); + break; + case H5T_STR_RESERVED_3: + case H5T_STR_RESERVED_4: + case H5T_STR_RESERVED_5: + case H5T_STR_RESERVED_6: + case H5T_STR_RESERVED_7: + case H5T_STR_RESERVED_8: + case H5T_STR_RESERVED_9: + case H5T_STR_RESERVED_10: + case H5T_STR_RESERVED_11: + case H5T_STR_RESERVED_12: + case H5T_STR_RESERVED_13: + case H5T_STR_RESERVED_14: + case H5T_STR_RESERVED_15: + h5tools_str_append(buffer, "H5T_STR_UNKNOWN;"); + break; + case H5T_STR_ERROR: + h5tools_str_append(buffer, "H5T_STR_ERROR;"); + break; + default: + h5tools_str_append(buffer, "ERROR;"); + break; + } h5tools_render_element(stream, info, ctx, buffer, &curr_pos, ncols, 0, 0); ctx->need_prefix = TRUE; @@ -2136,10 +2160,35 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ h5tools_str_append(buffer, "%s ", CSET); - if (cset == H5T_CSET_ASCII) - h5tools_str_append(buffer, "H5T_CSET_ASCII;"); - else - h5tools_str_append(buffer, "unknown_cset;"); + switch (cset) { + case H5T_CSET_ASCII: + h5tools_str_append(buffer, "H5T_CSET_ASCII;"); + break; + case H5T_CSET_UTF8: + h5tools_str_append(buffer, "H5T_CSET_UTF8;"); + break; + case H5T_CSET_RESERVED_2: + case H5T_CSET_RESERVED_3: + case H5T_CSET_RESERVED_4: + case H5T_CSET_RESERVED_5: + case H5T_CSET_RESERVED_6: + case H5T_CSET_RESERVED_7: + case H5T_CSET_RESERVED_8: + case H5T_CSET_RESERVED_9: + case H5T_CSET_RESERVED_10: + case H5T_CSET_RESERVED_11: + case H5T_CSET_RESERVED_12: + case H5T_CSET_RESERVED_13: + case H5T_CSET_RESERVED_14: + case H5T_CSET_RESERVED_15: + h5tools_str_append(buffer, "H5T_CSET_UNKNOWN;"); + case H5T_CSET_ERROR: + h5tools_str_append(buffer, "H5T_CSET_ERROR;"); + break; + default: + h5tools_str_append(buffer, "ERROR;"); + break; + } h5tools_render_element(stream, info, ctx, buffer, &curr_pos, ncols, 0, 0); ctx->need_prefix = TRUE; diff --git a/tools/testfiles/charsets.ddl b/tools/testfiles/charsets.ddl new file mode 100644 index 0000000..c2301fb --- /dev/null +++ b/tools/testfiles/charsets.ddl @@ -0,0 +1,27 @@ +HDF5 "charsets.h5" { +GROUP "/" { + DATASET "CharSets" { + DATATYPE H5T_COMPOUND { + H5T_STRING { + STRSIZE H5T_VARIABLE; + STRPAD H5T_STR_NULLTERM; + CSET H5T_CSET_ASCII; + CTYPE H5T_C_S1; + } "ascii"; + H5T_STRING { + STRSIZE H5T_VARIABLE; + STRPAD H5T_STR_NULLTERM; + CSET H5T_CSET_UTF8; + CTYPE H5T_C_S1; + } "utf8"; + } + DATASPACE SIMPLE { ( 1 ) / ( 1 ) } + DATA { + (0): { + "ascii", + "utf8" + } + } + } +} +} diff --git a/tools/testfiles/charsets.h5 b/tools/testfiles/charsets.h5 new file mode 100644 index 0000000..2b9e735 Binary files /dev/null and b/tools/testfiles/charsets.h5 differ -- cgit v0.12 From 24810fd2165dba146c570d583b3c7c3939be0880 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 22 May 2012 23:47:31 -0500 Subject: [svn-r22392] Added test for h5tcreate_f with H5T_STRING_F option. Cleaned-up formating and comments for h5tcreate_f. Tested: jam (gnu compiler) --- fortran/src/H5Tff.f90 | 57 +++++++++++++++++++++++++-------------------------- fortran/test/tH5T.f90 | 45 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+), 29 deletions(-) diff --git a/fortran/src/H5Tff.f90 b/fortran/src/H5Tff.f90 index f5369d0..fd857a8 100644 --- a/fortran/src/H5Tff.f90 +++ b/fortran/src/H5Tff.f90 @@ -2050,17 +2050,19 @@ CONTAINS ! h5tcreate_f ! ! PURPOSE -! Creates a new dataype +! Creates a new datatype. ! ! INPUTS -! class - datatype class, possible values are: -! H5T_COMPOUND_F -! H5T_ENUM_F -! H5T_OPAQUE_F -! size - datattype size +! class - Datatype class can be one of: +! H5T_COMPOUND_F +! H5T_ENUM_F +! H5T_OPAQUE_F +! H5T_STRING_F +! +! size - Size of the datatype. ! OUTPUTS -! type_id - datatype identifier -! hdferr - Returns 0 if successful and -1 if fails +! type_id - Datatype identifier. +! hdferr - Returns 0 if successful and -1 if fails ! ! AUTHOR ! Elena Pourmal @@ -2072,29 +2074,26 @@ CONTAINS ! port). March 7, 2001 ! SOURCE SUBROUTINE h5tcreate_f(class, size, type_id, hdferr) - IMPLICIT NONE - INTEGER, INTENT(IN) :: class ! Datatype class can be one of - ! H5T_COMPOUND_F - ! H5T_ENUM_F - ! H5T_OPAQUE_F - INTEGER(SIZE_T), INTENT(IN) :: size ! Size of the datatype - INTEGER(HID_T), INTENT(OUT) :: type_id ! Datatype identifier - INTEGER, INTENT(OUT) :: hdferr ! Error code + IMPLICIT NONE + INTEGER , INTENT(IN) :: class + INTEGER(SIZE_T), INTENT(IN) :: size + INTEGER(HID_T) , INTENT(OUT) :: type_id + INTEGER , INTENT(OUT) :: hdferr !***** - INTERFACE - INTEGER FUNCTION h5tcreate_c(class, size, type_id) - USE H5GLOBAL - !DEC$IF DEFINED(HDF5F90_WINDOWS) - !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCREATE_C'::h5tcreate_c - !DEC$ENDIF - INTEGER, INTENT(IN) :: class - INTEGER(SIZE_T), INTENT(IN) :: size - INTEGER(HID_T), INTENT(OUT) :: type_id - END FUNCTION h5tcreate_c - END INTERFACE + INTERFACE + INTEGER FUNCTION h5tcreate_c(class, size, type_id) + USE H5GLOBAL + !DEC$IF DEFINED(HDF5F90_WINDOWS) + !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCREATE_C'::h5tcreate_c + !DEC$ENDIF + INTEGER, INTENT(IN) :: class + INTEGER(SIZE_T), INTENT(IN) :: size + INTEGER(HID_T), INTENT(OUT) :: type_id + END FUNCTION h5tcreate_c + END INTERFACE - hdferr = h5tcreate_c(class, size, type_id) - END SUBROUTINE h5tcreate_f + hdferr = h5tcreate_c(class, size, type_id) + END SUBROUTINE h5tcreate_f ! !****s* H5T/h5tinsert_f diff --git a/fortran/test/tH5T.f90 b/fortran/test/tH5T.f90 index 6af1ba6..9605c45 100644 --- a/fortran/test/tH5T.f90 +++ b/fortran/test/tH5T.f90 @@ -108,6 +108,51 @@ INTEGER(HID_T) :: decoded_sid1 INTEGER(HID_T) :: decoded_tid1 + INTEGER(HID_T) :: fixed_str1, fixed_str2 + LOGICAL :: are_equal + INTEGER(SIZE_T), PARAMETER :: str_size = 10 + INTEGER(SIZE_T) :: query_size + + ! Test h5tcreate_f with H5T_STRING_F option: + ! Create fixed-length string in two ways and make sure they are the same + + CALL h5tcopy_f(H5T_FORTRAN_S1, fixed_str1, error) + CALL check("h5tcopy_f", error, total_error) + CALL h5tset_size_f(fixed_str1, str_size, error) + CALL check("h5tset_size_f", error, total_error) + CALL h5tset_strpad_f(fixed_str1, H5T_STR_NULLTERM_F, error) + CALL check("h5tset_strpad_f", error, total_error) + + CALL h5tcreate_f(H5T_STRING_F, str_size, fixed_str2, error) + CALL check("h5tcreate_f", error, total_error) + CALL h5tset_strpad_f(fixed_str2, H5T_STR_NULLTERM_F, error) + CALL check("h5tset_strpad_f", error, total_error) + + CALL h5tequal_f(fixed_str1, fixed_str2, are_equal, error) + IF(.NOT.are_equal)THEN + CALL check("h5tcreate_f", -1, total_error) + ENDIF + + CALL h5tget_size_f(fixed_str1, query_size, error) + CALL check("h5tget_size_f", error, total_error) + + IF(query_size.NE.str_size)THEN + CALL check("h5tget_size_f", -1, total_error) + ENDIF + + CALL h5tget_size_f(fixed_str2, query_size, error) + CALL check("h5tget_size_f", error, total_error) + + IF(query_size.NE.str_size)THEN + CALL check("h5tget_size_f", -1, total_error) + ENDIF + + CALL h5tclose_f(fixed_str1,error) + CALL check("h5tclose_f", error, total_error) + + CALL h5tclose_f(fixed_str2,error) + CALL check("h5tclose_f", error, total_error) + data_dims(1) = dimsize ! ! Initialize data buffer. -- cgit v0.12 From 955b84369e870d14b922d97d3725a8b11778152d Mon Sep 17 00:00:00 2001 From: Raymond Lu Date: Wed, 23 May 2012 09:42:43 -0500 Subject: [svn-r22393] I forgot to close a few datatypes in test_str_create. I fixed them in this commit. Tested on jam - very simple change. --- test/dtypes.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/dtypes.c b/test/dtypes.c index 23a7bac..3db9bf8 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -3964,6 +3964,9 @@ test_str_create(void) if((query_size = H5Tget_size(fixed_str2)) == 0) goto error; if(query_size != str_size) goto error; + if(H5Tclose(fixed_str1) < 0) goto error; + if(H5Tclose(fixed_str2) < 0) goto error; + /* Create variable-length string in two ways and make sure they are the same */ if((vlen_str1 = mkstr((size_t)H5T_VARIABLE, H5T_STR_NULLTERM)) < 0) goto error; @@ -3978,6 +3981,8 @@ test_str_create(void) if((is_vl_str = H5Tis_variable_str(vlen_str2)) < 0) goto error; if(!is_vl_str) goto error; + if(H5Tclose(vlen_str1) < 0) goto error; + if(H5Tclose(vlen_str2) < 0) goto error; PASSED(); return 0; -- cgit v0.12 From 01553cb8f7dca506522b4349043348cccecc318e Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 23 May 2012 13:15:08 -0500 Subject: [svn-r22396] Correct missing clean filenames in h5dump make Sync 518/trunk version and cpack info --- CMakeLists.txt | 21 ++++++--------------- tools/h5dump/Makefile.am | 2 +- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b9c2a2..02da1a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -194,7 +194,11 @@ SET (HDF5_PACKAGE_NAME "HDF5") SET (HDF5_PACKAGE_VERSION "${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}") SET (HDF5_PACKAGE_VERSION_MAJOR "${H5_VERS_MAJOR}.${H5_VERS_MINOR}") SET (HDF5_PACKAGE_VERSION_MINOR "${H5_VERS_RELEASE}") -SET (HDF5_PACKAGE_VERSION_STRING "${HDF5_PACKAGE_VERSION}") +IF (NOT "${H5_VERS_SUBRELEASE}" STREQUAL "") + SET (HDF5_PACKAGE_VERSION_STRING "${HDF5_PACKAGE_VERSION}-${H5_VERS_SUBRELEASE}") +ELSE (NOT "${H5_VERS_SUBRELEASE}" STREQUAL "") + SET (HDF5_PACKAGE_VERSION_STRING "${HDF5_PACKAGE_VERSION}") +ENDIF (NOT "${H5_VERS_SUBRELEASE}" STREQUAL "") SET (HDF5_PACKAGE_SOVERSION "${H5_SOVERS_MAJOR}.${H5_SOVERS_MINOR}.${H5_SOVERS_RELEASE}") SET (HDF5_PACKAGE_STRING "${HDF5_PACKAGE_NAME} ${HDF5_PACKAGE_VERSION_STRING}") SET (HDF5_PACKAGE_TARNAME "hdf5") @@ -439,19 +443,6 @@ IF (CMAKE_COMPILER_IS_GNUCXX) ENDIF (CMAKE_COMPILER_IS_GNUCXX) #----------------------------------------------------------------------------- -# Use gcc visibility flag. -#----------------------------------------------------------------------------- -OPTION (HDF5_ENABLE_VISIBILITY "Enable gcc4 visibility=hidden for Libraries and Programs" OFF) -IF (HDF5_ENABLE_VISIBILITY) - IF (CMAKE_COMPILER_IS_GNUCC) - SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden") - ENDIF (CMAKE_COMPILER_IS_GNUCC) - IF (CMAKE_COMPILER_IS_GNUCXX) - SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden") - ENDIF (CMAKE_COMPILER_IS_GNUCXX) -ENDIF (HDF5_ENABLE_VISIBILITY) - -#----------------------------------------------------------------------------- # All libs/tests/examples need the main include directories #----------------------------------------------------------------------------- INCLUDE_DIRECTORIES (${HDF5_BINARY_DIR} ${HDF5_SRC_DIR}) @@ -561,7 +552,7 @@ IF (HDF5_ENABLE_Z_LIB_SUPPORT) SET (H5_HAVE_LIBZ 1) MESSAGE (STATUS "Filter ZLIB is built") ELSE (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") - MESSAGE (FATAL " ZLib is Required for ZLib support in HDF5") + MESSAGE (FATAL_ERROR " ZLib is Required for ZLib support in HDF5") ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") ENDIF (ZLIB_FOUND) ELSE (NOT H5_ZLIB_HEADER) diff --git a/tools/h5dump/Makefile.am b/tools/h5dump/Makefile.am index 38864f5..f80d12e 100644 --- a/tools/h5dump/Makefile.am +++ b/tools/h5dump/Makefile.am @@ -46,6 +46,6 @@ h5dump_SOURCES=h5dump.c h5dump_ddl.c h5dump_xml.c # Temporary files. *.h5 are generated by h5dumpgentest. They should # copied to the testfiles/ directory if update is required. CHECK_CLEANFILES+=*.h5 *.bin -DISTCLEANFILES=testh5dump.sh +DISTCLEANFILES=testh5dump.sh testh5dumppbits.sh testh5dumpxml.sh include $(top_srcdir)/config/conclude.am -- cgit v0.12 From 336a7430689b067d2ad4632988d534812a08c8de Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 24 May 2012 16:50:06 -0500 Subject: [svn-r22405] HDFFV-8018: add INSTALL commands for packaging the pdb files for windows when configured with RelWithDebInfo Tested: local linux and Windows --- c++/src/CMakeLists.txt | 3 +++ config/cmake/HDFLibMacros.cmake | 18 +++++++++--------- config/cmake/HDFMacros.cmake | 31 +++++++++++++++++++++++++++++++ fortran/src/CMakeLists.txt | 4 ++++ hl/c++/src/CMakeLists.txt | 3 +++ hl/fortran/src/CMakeLists.txt | 4 ++++ hl/src/CMakeLists.txt | 3 +++ src/CMakeLists.txt | 3 +++ tools/h5copy/CMakeLists.txt | 3 +++ tools/h5diff/CMakeLists.txt | 6 ++++++ tools/h5dump/CMakeLists.txt | 3 +++ tools/h5import/CMakeLists.txt | 3 +++ tools/h5jam/CMakeLists.txt | 3 +++ tools/h5ls/CMakeLists.txt | 3 +++ tools/h5repack/CMakeLists.txt | 3 +++ tools/h5stat/CMakeLists.txt | 3 +++ tools/lib/CMakeLists.txt | 16 ++++++++++++++++ tools/misc/CMakeLists.txt | 5 +++++ 18 files changed, 108 insertions(+), 9 deletions(-) diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt index d2bc71a..375bd4a 100644 --- a/c++/src/CMakeLists.txt +++ b/c++/src/CMakeLists.txt @@ -103,6 +103,9 @@ INSTALL ( # Add Target(s) to CMake Install for import into other projects #----------------------------------------------------------------------------- IF (HDF5_EXPORTED_TARGETS) + + INSTALL_TARGET_PDB (${HDF5_CPP_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} cpplibraries) + INSTALL ( TARGETS ${HDF5_CPP_LIB_TARGET} diff --git a/config/cmake/HDFLibMacros.cmake b/config/cmake/HDFLibMacros.cmake index b9c1fbb..7b54c95 100644 --- a/config/cmake/HDFLibMacros.cmake +++ b/config/cmake/HDFLibMacros.cmake @@ -59,8 +59,8 @@ MACRO (EXTERNAL_JPEG_LIBRARY compress_type libtype jpeg_pic) ) ELSE (MINGW) SET_TARGET_PROPERTIES(jpeg PROPERTIES - IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${BLDTYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${JPEG_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}" - IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${BLDTYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${JPEG_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}" + IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${JPEG_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}" + IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${JPEG_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}" ) ENDIF (MINGW) ELSE (WIN32) @@ -80,7 +80,7 @@ MACRO (EXTERNAL_JPEG_LIBRARY compress_type libtype jpeg_pic) ELSE (${libtype} MATCHES "SHARED") IF (WIN32 AND NOT MINGW) SET_TARGET_PROPERTIES(jpeg PROPERTIES - IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${BLDTYPE}/lib${JPEG_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}" + IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/lib${JPEG_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}" IMPORTED_LINK_INTERFACE_LANGUAGES "C" ) ELSE (WIN32 AND NOT MINGW) @@ -173,8 +173,8 @@ MACRO (EXTERNAL_SZIP_LIBRARY compress_type libtype encoding) ) ELSE (MINGW) SET_TARGET_PROPERTIES(szip PROPERTIES - IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${BLDTYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${SZIP_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}" - IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${BLDTYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${SZIP_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}" + IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${SZIP_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}" + IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${SZIP_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}" ) ENDIF (MINGW) ELSE (WIN32) @@ -194,7 +194,7 @@ MACRO (EXTERNAL_SZIP_LIBRARY compress_type libtype encoding) ELSE (${libtype} MATCHES "SHARED") IF (WIN32 AND NOT MINGW) SET_TARGET_PROPERTIES(szip PROPERTIES - IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${BLDTYPE}/lib${SZIP_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}" + IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/lib${SZIP_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}" IMPORTED_LINK_INTERFACE_LANGUAGES "C" ) ELSE (WIN32 AND NOT MINGW) @@ -289,8 +289,8 @@ MACRO (EXTERNAL_ZLIB_LIBRARY compress_type libtype) ) ELSE (MINGW) SET_TARGET_PROPERTIES(zlib PROPERTIES - IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${BLDTYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}" - IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${BLDTYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}" + IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}" + IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}" ) ENDIF (MINGW) ELSE (WIN32) @@ -310,7 +310,7 @@ MACRO (EXTERNAL_ZLIB_LIBRARY compress_type libtype) ELSE (${libtype} MATCHES "SHARED") IF (WIN32 AND NOT MINGW) SET_TARGET_PROPERTIES(zlib PROPERTIES - IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${BLDTYPE}/lib${ZLIB_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}" + IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/lib${ZLIB_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}" IMPORTED_LINK_INTERFACE_LANGUAGES "C" ) ELSE (WIN32 AND NOT MINGW) diff --git a/config/cmake/HDFMacros.cmake b/config/cmake/HDFMacros.cmake index 0d3ab5f..568b3ff 100644 --- a/config/cmake/HDFMacros.cmake +++ b/config/cmake/HDFMacros.cmake @@ -43,6 +43,37 @@ MACRO (TARGET_NAMING target libtype) ENDMACRO (TARGET_NAMING) #------------------------------------------------------------------------------- +MACRO (INSTALL_TARGET_PDB target targetdestination targetcomponent) + IF (WIN32 AND MSVC) + GET_TARGET_PROPERTY (target_name ${target} RELWITHDEBINFO_OUTPUT_NAME) + INSTALL ( + FILES + ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${target_name}.pdb + DESTINATION + ${targetdestination} + CONFIGURATIONS RelWithDebInfo + COMPONENT ${targetcomponent} + ) + ENDIF (WIN32 AND MSVC) +ENDMACRO (INSTALL_TARGET_PDB) + +#------------------------------------------------------------------------------- +MACRO (INSTALL_PROGRAM_PDB target targetdestination targetcomponent) + IF (WIN32 AND MSVC) + GET_TARGET_PROPERTY (target_name ${target} RELWITHDEBINFO_OUTPUT_NAME) + GET_TARGET_PROPERTY (target_prefix h5dump PREFIX) + INSTALL ( + FILES + ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${target_prefix}${target_name}.pdb + DESTINATION + ${targetdestination} + CONFIGURATIONS RelWithDebInfo + COMPONENT ${targetcomponent} + ) + ENDIF (WIN32 AND MSVC) +ENDMACRO (INSTALL_PROGRAM_PDB) + +#------------------------------------------------------------------------------- MACRO (HDF_SET_LIB_OPTIONS libtarget libname libtype) # message (STATUS "${libname} libtype: ${libtype}") IF (${libtype} MATCHES "SHARED") diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index cecbfb6..c0fea8c 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -270,6 +270,10 @@ ENDIF (WIN32 AND NOT CYGWIN) # Add Target(s) to CMake Install for import into other projects #----------------------------------------------------------------------------- IF (HDF5_EXPORTED_TARGETS) + + INSTALL_TARGET_PDB (${HDF5_F90_C_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} fortlibraries) + INSTALL_TARGET_PDB (${HDF5_F90_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} fortlibraries) + INSTALL ( TARGETS ${HDF5_F90_C_LIB_TARGET} diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt index ad5454d..e0ca0e9 100644 --- a/hl/c++/src/CMakeLists.txt +++ b/hl/c++/src/CMakeLists.txt @@ -36,6 +36,9 @@ INSTALL ( # Add Target(s) to CMake Install for import into other projects #----------------------------------------------------------------------------- IF (HDF5_EXPORTED_TARGETS) + + INSTALL_TARGET_PDB (${HDF5_HL_CPP_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} hlcpplibraries) + INSTALL ( TARGETS ${HDF5_HL_CPP_LIB_TARGET} diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index f01c7f8..b6f6d08 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -95,6 +95,10 @@ ENDIF (WIN32 AND NOT CYGWIN) # Add Target(s) to CMake Install for import into other projects #----------------------------------------------------------------------------- IF (HDF5_EXPORTED_TARGETS) + + INSTALL_TARGET_PDB (${HDF5_HL_F90_C_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} hlfortlibraries) + INSTALL_TARGET_PDB (${HDF5_HL_F90_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} hlfortlibraries) + INSTALL ( TARGETS ${HDF5_HL_F90_C_LIB_TARGET} diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt index f144b94..2df2c23 100644 --- a/hl/src/CMakeLists.txt +++ b/hl/src/CMakeLists.txt @@ -55,6 +55,9 @@ INSTALL ( # Add Target(s) to CMake Install for import into other projects #----------------------------------------------------------------------------- IF (HDF5_EXPORTED_TARGETS) + + INSTALL_TARGET_PDB (${HDF5_HL_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} hllibraries) + INSTALL ( TARGETS ${HDF5_HL_LIB_TARGET} diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 33fe11b..de9c50c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -832,6 +832,9 @@ ENDIF (NOT HDF5_INSTALL_NO_DEVELOPMENT) # Add Target(s) to CMake Install for import into other projects #----------------------------------------------------------------------------- IF (HDF5_EXPORTED_TARGETS) + + INSTALL_TARGET_PDB (${HDF5_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} libraries) + INSTALL ( TARGETS ${HDF5_LIB_TARGET} diff --git a/tools/h5copy/CMakeLists.txt b/tools/h5copy/CMakeLists.txt index f9e7c12..b56f8c7 100644 --- a/tools/h5copy/CMakeLists.txt +++ b/tools/h5copy/CMakeLists.txt @@ -374,6 +374,9 @@ ENDIF (BUILD_TESTING) #----------------------------------------------------------------------------- # Rules for Installation of tools using make Install target #----------------------------------------------------------------------------- + +INSTALL_PROGRAM_PDB (h5copy ${HDF5_INSTALL_BIN_DIR}/tools toolsapplications) + INSTALL ( TARGETS h5copy diff --git a/tools/h5diff/CMakeLists.txt b/tools/h5diff/CMakeLists.txt index 4ac4477..4f46541 100644 --- a/tools/h5diff/CMakeLists.txt +++ b/tools/h5diff/CMakeLists.txt @@ -1451,6 +1451,9 @@ ENDIF (BUILD_TESTING) #----------------------------------------------------------------------------- # Rules for Installation of tools using make Install target #----------------------------------------------------------------------------- + +INSTALL_PROGRAM_PDB (h5diff ${HDF5_INSTALL_BIN_DIR}/tools toolsapplications) + INSTALL ( TARGETS h5diff @@ -1461,6 +1464,9 @@ INSTALL ( ) IF (H5_HAVE_PARALLEL) + + INSTALL_PROGRAM_PDB (ph5diff ${HDF5_INSTALL_BIN_DIR}/tools toolsapplications) + INSTALL ( TARGETS ph5diff diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt index ad19ba4..0976bc3 100644 --- a/tools/h5dump/CMakeLists.txt +++ b/tools/h5dump/CMakeLists.txt @@ -1757,6 +1757,9 @@ ENDIF (BUILD_TESTING) #----------------------------------------------------------------------------- # Rules for Installation of tools using make Install target #----------------------------------------------------------------------------- + +INSTALL_PROGRAM_PDB (h5dump ${HDF5_INSTALL_BIN_DIR}/tools toolsapplications) + INSTALL ( TARGETS h5dump diff --git a/tools/h5import/CMakeLists.txt b/tools/h5import/CMakeLists.txt index 76dcf26..f5dabef 100644 --- a/tools/h5import/CMakeLists.txt +++ b/tools/h5import/CMakeLists.txt @@ -261,6 +261,9 @@ ENDIF (BUILD_TESTING) #----------------------------------------------------------------------------- # Rules for Installation of tools using make Install target #----------------------------------------------------------------------------- + +INSTALL_PROGRAM_PDB (h5import ${HDF5_INSTALL_BIN_DIR}/tools toolsapplications) + INSTALL ( TARGETS h5import diff --git a/tools/h5jam/CMakeLists.txt b/tools/h5jam/CMakeLists.txt index a03d139..4d81d72 100644 --- a/tools/h5jam/CMakeLists.txt +++ b/tools/h5jam/CMakeLists.txt @@ -534,6 +534,9 @@ ENDIF (BUILD_TESTING) #----------------------------------------------------------------------------- # Rules for Installation of tools using make Install target #----------------------------------------------------------------------------- + +INSTALL_PROGRAM_PDB (h5jam ${HDF5_INSTALL_BIN_DIR}/tools toolsapplications) + INSTALL ( TARGETS h5jam h5unjam diff --git a/tools/h5ls/CMakeLists.txt b/tools/h5ls/CMakeLists.txt index 0dec21c..4c21eee 100644 --- a/tools/h5ls/CMakeLists.txt +++ b/tools/h5ls/CMakeLists.txt @@ -433,6 +433,9 @@ ENDIF (BUILD_TESTING) #----------------------------------------------------------------------------- # Rules for Installation of tools using make Install target #----------------------------------------------------------------------------- + +INSTALL_PROGRAM_PDB (h5ls ${HDF5_INSTALL_BIN_DIR}/tools toolsapplications) + INSTALL ( TARGETS h5ls diff --git a/tools/h5repack/CMakeLists.txt b/tools/h5repack/CMakeLists.txt index 98d5c5a..b182332 100644 --- a/tools/h5repack/CMakeLists.txt +++ b/tools/h5repack/CMakeLists.txt @@ -898,6 +898,9 @@ ENDIF (BUILD_TESTING) #----------------------------------------------------------------------------- # Rules for Installation of tools using make Install target #----------------------------------------------------------------------------- + +INSTALL_PROGRAM_PDB (h5repack ${HDF5_INSTALL_BIN_DIR}/tools toolsapplications) + INSTALL ( TARGETS h5repack diff --git a/tools/h5stat/CMakeLists.txt b/tools/h5stat/CMakeLists.txt index 8c621c9..a9c5d11 100644 --- a/tools/h5stat/CMakeLists.txt +++ b/tools/h5stat/CMakeLists.txt @@ -196,6 +196,9 @@ ENDIF (BUILD_TESTING) #----------------------------------------------------------------------------- # Rules for Installation of tools using make Install target #----------------------------------------------------------------------------- + +INSTALL_PROGRAM_PDB (h5stat ${HDF5_INSTALL_BIN_DIR}/tools toolsapplications) + INSTALL ( TARGETS h5stat diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt index 837a14e..2367911 100644 --- a/tools/lib/CMakeLists.txt +++ b/tools/lib/CMakeLists.txt @@ -75,10 +75,26 @@ IF (APPLE) ENDIF (HDF5_BUILD_WITH_INSTALL_NAME) ENDIF (APPLE) +IF (MSVC) + GET_TARGET_PROPERTY (target_name ${HDF5_TOOLS_LIB_TARGET} RELWITHDEBINFO_OUTPUT_NAME) + MESSAGE (STATUS "target_name is ${target_name} with config ${CMAKE_BUILD_TYPE}") + INSTALL ( + FILES + ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${target_name}.pdb + DESTINATION + ${HDF5_INSTALL_LIB_DIR} + CONFIGURATIONS RelWithDebInfo + COMPONENT toolslibraries + ) + ENDIF (MSVC) + #----------------------------------------------------------------------------- # Add Target(s) to CMake Install for import into other projects #----------------------------------------------------------------------------- IF (HDF5_EXPORTED_TARGETS) + + INSTALL_TARGET_PDB (${HDF5_TOOLS_LIB_TARGET} ${HDF5_INSTALL_LIB_DIR} toolslibraries) + INSTALL ( TARGETS ${HDF5_TOOLS_LIB_TARGET} diff --git a/tools/misc/CMakeLists.txt b/tools/misc/CMakeLists.txt index 72930c9..b634b47 100644 --- a/tools/misc/CMakeLists.txt +++ b/tools/misc/CMakeLists.txt @@ -311,6 +311,11 @@ ENDIF (BUILD_TESTING) #----------------------------------------------------------------------------- # Rules for Installation of tools using make Install target #----------------------------------------------------------------------------- + +INSTALL_PROGRAM_PDB (h5debug ${HDF5_INSTALL_BIN_DIR}/tools toolsapplications) +INSTALL_PROGRAM_PDB (h5repart ${HDF5_INSTALL_BIN_DIR}/tools toolsapplications) +INSTALL_PROGRAM_PDB (h5mkgrp ${HDF5_INSTALL_BIN_DIR}/tools toolsapplications) + INSTALL ( TARGETS h5debug h5repart h5mkgrp -- cgit v0.12 From d54152f057ef40e17715f1a43ab6895fa3edc389 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 25 May 2012 08:36:04 -0500 Subject: [svn-r22406] do not need warnings from utility program. --- config/cmake/CTestCustom.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/config/cmake/CTestCustom.cmake b/config/cmake/CTestCustom.cmake index e708a00..7958f22 100755 --- a/config/cmake/CTestCustom.cmake +++ b/config/cmake/CTestCustom.cmake @@ -13,6 +13,7 @@ SET (CTEST_CUSTOM_WARNING_EXCEPTION "SZIP.src.*:[ \t]*warning" "POSIX name for this item is deprecated" "disabling jobserver mode" + "config.cmake.xlatefile.c" ) SET (CTEST_CUSTOM_MEMCHECK_IGNORE -- cgit v0.12 From d7bfa3617fefb3d1e0262d8940d687bfa9717667 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 25 May 2012 12:36:01 -0500 Subject: [svn-r22410] reduce compiler warnings reported by CDash for non-critical issues --- config/cmake/CTestCustom.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/cmake/CTestCustom.cmake b/config/cmake/CTestCustom.cmake index 7958f22..b54bedc 100755 --- a/config/cmake/CTestCustom.cmake +++ b/config/cmake/CTestCustom.cmake @@ -5,15 +5,15 @@ SET (CTEST_CUSTOM_WARNING_EXCEPTION "H5detect.c.[0-9]+.[ \t]*:[ \t]*warning C4090:" "H5detect.c.[0-9]+.[ \t]*:[ \t]*warning:[ \t]*passing argument" "H5detect.c[0-9 \t:]*warning:[ \t]*passing argument" - "H5detect.c[0-9 \t:]*note:[ \t]*expected .void .. but argument is of type .volatile" - "include/string.h[0-9 \t:]*note:[ \t]*expected .void .. but argument is of type .volatile" - "note:[ \t]*expected .void .. but argument is of type .volatile" + "note.*expected.*void.*but argument is of type.*volatile" "H5Tconv.c[0-9 \t:]*warning:[ \t]*comparison is always false due to limited range of data type" "H5Ztrans.c.[0-9]+.[ \t]*:[ \t]*warning C4244" "SZIP.src.*:[ \t]*warning" "POSIX name for this item is deprecated" "disabling jobserver mode" "config.cmake.xlatefile.c" + "warning.*implicit declaration of function" +# "fpp:[ \t]*warning:[ \t]*cannot remove H5_DEBUG_API - not a predefined macro" ) SET (CTEST_CUSTOM_MEMCHECK_IGNORE -- cgit v0.12 From eb5b8163f93e4694ae834bac6f002f6ef895ffe8 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 25 May 2012 12:39:07 -0500 Subject: [svn-r22411] reduce compiler warnings by removing unreferenced variables and adding cast Tested: local linux --- CMakeLists.txt | 2 +- examples/h5_attribute.c | 1 - hl/test/test_lite.c | 1 - test/vfd.c | 3 +-- tools/h5dump/h5dump_ddl.c | 7 +++++-- tools/h5dump/h5dump_xml.c | 3 +-- tools/h5jam/h5jam.c | 4 ++-- tools/h5ls/h5ls.c | 16 +++------------- tools/lib/h5tools.c | 9 +++++---- tools/lib/h5tools_dump.c | 13 ++++++------- 10 files changed, 24 insertions(+), 35 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 02da1a3..08ad6ab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -368,7 +368,7 @@ IF (CMAKE_BUILD_TYPE MATCHES Debug) ADD_DEFINITIONS (-Wall) ENDIF (NOT WIN32) ELSE (CMAKE_BUILD_TYPE MATCHES Debug) - ADD_DEFINITIONS (-UH5_DEBUG_API -DNDEBUG) + ADD_DEFINITIONS (-DNDEBUG) OPTION (HDF5_ENABLE_TRACE "Enable API tracing capability" OFF) IF (HDF5_ENABLE_TRACE) ADD_DEFINITIONS (-DH5_DEBUG_API ) diff --git a/examples/h5_attribute.c b/examples/h5_attribute.c index 646b395..0ea0153 100644 --- a/examples/h5_attribute.c +++ b/examples/h5_attribute.c @@ -66,7 +66,6 @@ main (void) unsigned i, j; /* Counters */ char string_out[80]; /* Buffer to read string attribute back */ int point_out; /* Buffer to read scalar attribute back */ - int num_attr; /* Number of attributes */ /* * Data initialization. diff --git a/hl/test/test_lite.c b/hl/test/test_lite.c index eb00cd7..3fface8 100644 --- a/hl/test/test_lite.c +++ b/hl/test/test_lite.c @@ -1816,7 +1816,6 @@ static int test_valid_path(void) herr_t status; FILE *fp = NULL; htri_t path_valid; - char path[10]; const char *data_string_in = "test"; TESTING("H5LTpath_valid"); diff --git a/test/vfd.c b/test/vfd.c index f6e9f06..ca354d9 100644 --- a/test/vfd.c +++ b/test/vfd.c @@ -1148,11 +1148,10 @@ test_multi_compat(void) { hid_t file=(-1), fapl, fapl2=(-1), dset=(-1), space=(-1); hid_t access_fapl = -1; - char filename[1024], newname[1024], tmp[1024]; + char newname[1024]; char filename_s[1024], newname_s[1024]; char filename_r[1024], newname_r[1024]; int *fhandle2=NULL, *fhandle=NULL; - hsize_t file_size; H5FD_mem_t mt, memb_map[H5FD_MEM_NTYPES]; hid_t memb_fapl[H5FD_MEM_NTYPES]; haddr_t memb_addr[H5FD_MEM_NTYPES]; diff --git a/tools/h5dump/h5dump_ddl.c b/tools/h5dump/h5dump_ddl.c index b8deaf9..22d2a2b 100644 --- a/tools/h5dump/h5dump_ddl.c +++ b/tools/h5dump/h5dump_ddl.c @@ -1488,15 +1488,18 @@ handle_datasets(hid_t fid, const char *dset, void *data, int pe, const char *dis if(sset) { unsigned int i; + unsigned int ndims; hid_t sid = H5Dget_space(dsetid); - int ndims = H5Sget_simple_extent_ndims(sid); + int ndims_res = H5Sget_simple_extent_ndims(sid); H5Sclose(sid); - if(ndims < 0) { + if(ndims_res < 0) { error_msg("H5Sget_simple_extent_ndims failed\n"); h5tools_setstatus(EXIT_FAILURE); return; } + else + ndims = ndims_res; if(!sset->start.data || !sset->stride.data || !sset->count.data || !sset->block.data) { /* they didn't specify a ``stride'' or ``block''. default to 1 in all diff --git a/tools/h5dump/h5dump_xml.c b/tools/h5dump/h5dump_xml.c index 0c48216..1a29659 100644 --- a/tools/h5dump/h5dump_xml.c +++ b/tools/h5dump/h5dump_xml.c @@ -1781,7 +1781,6 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t UNUSED * sset, int UNU hsize_t nelmts = 1; int ndims; int i; - int depth; int status = -1; int stdindent = COL; /* should be 3 */ void *buf = NULL; @@ -2950,7 +2949,7 @@ xml_print_refs(hid_t did, int source) string_dataformat.do_escape = display_escape; outputformat = &string_dataformat; - for (i = 0; i < ssiz; i++) { + for (i = 0; i < (hsize_t)ssiz; i++) { const char *path = lookup_ref_path(*refbuf); ctx.indent_level++; diff --git a/tools/h5jam/h5jam.c b/tools/h5jam/h5jam.c index 981eead..52eb0aa 100644 --- a/tools/h5jam/h5jam.c +++ b/tools/h5jam/h5jam.c @@ -310,7 +310,7 @@ main (int argc, const char *argv[]) leave (EXIT_FAILURE); } - fsize = sbuf.st_size; + fsize = (off_t)sbuf.st_size; h5fid = HDopen(input_file, O_RDONLY, 0); if(h5fid < 0) { @@ -455,7 +455,7 @@ copy_some_to_file (int infid, int outfid, hsize_t startin, hsize_t startout, exit (EXIT_FAILURE); } - howmuch = sbuf.st_size; + howmuch = (ssize_t)sbuf.st_size; } else howmuch = limit; diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c index 2171682..0fc0531 100644 --- a/tools/h5ls/h5ls.c +++ b/tools/h5ls/h5ls.c @@ -1436,13 +1436,13 @@ dump_dataset_values(hid_t dset) info = &outputformat; ctx.indent_level = 2; - ctx.cur_column = curr_pos; + ctx.cur_column = (size_t)curr_pos; /* Print all the values. */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, " Data:\n"); h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos, info->line_ncols, 0, 0); ctx.need_prefix = TRUE; - ctx.cur_column = curr_pos; + ctx.cur_column = (size_t)curr_pos; if (h5tools_dump_dset(rawoutstream, info, &ctx, dset, -1, NULL) < 0) { h5tools_str_reset(&buffer); h5tools_str_append(&buffer, " Unable to print data."); @@ -1619,7 +1619,7 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t UNUSED *ainfo, if(H5Aread(attr, p_type, buf) >= 0) { ctx.need_prefix = TRUE; ctx.indent_level = 2; - ctx.cur_column = curr_pos; + ctx.cur_column = (size_t)curr_pos; h5tools_dump_mem(rawoutstream, info, &ctx, attr, p_type, space, buf); } @@ -1672,11 +1672,9 @@ dataset_list1(hid_t dset) H5S_class_t space_type; /* type of dataspace */ int i; hsize_t curr_pos = 0; /* total data element position */ - h5tool_link_info_t lnk_info; h5tools_str_t buffer; /* string into which to render */ h5tools_context_t ctx; /* print context */ h5tool_format_t *info = &ls_dataformat; - h5tool_format_t outputformat; HDmemset(&ctx, 0, sizeof(ctx)); HDmemset(&buffer, 0, sizeof(h5tools_str_t)); @@ -1753,7 +1751,6 @@ dataset_list2(hid_t dset, const char UNUSED *name) h5tools_str_t buffer; /* string into which to render */ h5tools_context_t ctx; /* print context */ h5tool_format_t *info = &ls_dataformat; - h5tool_format_t outputformat; HDmemset(&ctx, 0, sizeof(ctx)); HDmemset(&buffer, 0, sizeof(h5tools_str_t)); @@ -1921,7 +1918,6 @@ datatype_list2(hid_t type, const char UNUSED *name) h5tools_str_t buffer; /* string into which to render */ h5tools_context_t ctx; /* print context */ h5tool_format_t *info = &ls_dataformat; - h5tool_format_t outputformat; HDmemset(&ctx, 0, sizeof(ctx)); HDmemset(&buffer, 0, sizeof(h5tools_str_t)); @@ -1962,7 +1958,6 @@ list_obj(const char *name, const H5O_info_t *oinfo, const char *first_seen, void h5tools_str_t buffer; /* string into which to render */ h5tools_context_t ctx; /* print context */ h5tool_format_t *info = &ls_dataformat; - h5tool_format_t outputformat; HDmemset(&ctx, 0, sizeof(ctx)); HDmemset(&buffer, 0, sizeof(h5tools_str_t)); @@ -2121,7 +2116,6 @@ list_lnk(const char *name, const H5L_info_t *linfo, void *_iter) h5tools_str_t buffer; /* string into which to render */ h5tools_context_t ctx; /* print context */ h5tool_format_t *info = &ls_dataformat; - h5tool_format_t outputformat; HDmemset(&ctx, 0, sizeof(ctx)); HDmemset(&buffer, 0, sizeof(h5tools_str_t)); @@ -2309,11 +2303,9 @@ visit_obj(hid_t file, const char *oname, iter_t *iter) int retval = 0; H5O_info_t oi; /* Information for object */ hsize_t curr_pos = 0; /* total data element position */ - h5tool_link_info_t lnk_info; h5tools_str_t buffer; /* string into which to render */ h5tools_context_t ctx; /* print context */ h5tool_format_t *info = &ls_dataformat; - h5tool_format_t outputformat; HDmemset(&ctx, 0, sizeof(ctx)); HDmemset(&buffer, 0, sizeof(h5tools_str_t)); @@ -2820,11 +2812,9 @@ main(int argc, const char *argv[]) /* Check the type of link given */ if(H5Lget_info(file, oname, &li, H5P_DEFAULT) < 0) { hsize_t curr_pos = 0; /* total data element position */ - h5tool_link_info_t lnk_info; h5tools_str_t buffer; /* string into which to render */ h5tools_context_t ctx; /* print context */ h5tool_format_t *info = &ls_dataformat; - h5tool_format_t outputformat; HDmemset(&ctx, 0, sizeof(ctx)); HDmemset(&buffer, 0, sizeof(h5tools_str_t)); diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index 17639bc..24aa81a 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -1051,6 +1051,7 @@ void init_acc_pos(h5tools_context_t *ctx, hsize_t *dims) { int i; + unsigned j; HDassert(ctx->ndims); @@ -1058,8 +1059,8 @@ init_acc_pos(h5tools_context_t *ctx, hsize_t *dims) for (i = (ctx->ndims - 2); i >= 0; i--) { ctx->acc[i] = ctx->acc[i + 1] * dims[i + 1]; } - for (i = 0; i < ctx->ndims; i++) - ctx->pos[i] = 0; + for (j = 0; j < ctx->ndims; j++) + ctx->pos[j] = 0; } /*------------------------------------------------------------------------- @@ -1525,7 +1526,7 @@ render_bin_output_region_data_blocks(hid_t region_id, FILE *stream, if((type_size = H5Tget_size(type_id)) == 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_size failed"); - if((region_buf = HDmalloc(type_size * numelem)) == NULL) + if((region_buf = HDmalloc(type_size * (size_t)numelem)) == NULL) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Could not allocate region buffer"); /* Select (x , x , ..., x ) x (y , y , ..., y ) hyperslab for reading memory dataset */ @@ -1670,7 +1671,7 @@ render_bin_output_region_data_points(hid_t region_space, hid_t region_id, if((type_size = H5Tget_size(type_id)) == 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_size failed"); - if((region_buf = HDmalloc(type_size * npoints)) == NULL) + if((region_buf = HDmalloc(type_size * (size_t)npoints)) == NULL) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for region"); /* Allocate space for the dimension array */ diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 20c1c8f..619a413 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -261,7 +261,7 @@ h5tools_dump_simple_data(FILE *stream, const h5tool_format_t *info, hid_t contai h5tools_context_t *ctx/*in,out*/, unsigned flags, hsize_t nelmts, hid_t type, void *_mem) { - HERR_INIT(int, SUCCEED) + int ret_value = 0; /*no need to LEAVE() on ERROR: HERR_INIT(int, SUCCEED) */ unsigned char *mem = (unsigned char*) _mem; hsize_t i; /*element counter */ size_t size; /*size of each datum */ @@ -390,7 +390,6 @@ h5tools_dump_simple_data(FILE *stream, const h5tool_format_t *info, hid_t contai h5tools_str_close(&buffer); }/* else bin */ -CATCH return ret_value; } @@ -430,7 +429,7 @@ h5tools_print_region_data_blocks(hid_t region_id, hsize_t numelem; hsize_t numindex; size_t jndx; - int indx; + unsigned indx; int type_size; int ret_value = SUCCEED; hid_t mem_space = -1; @@ -466,7 +465,7 @@ h5tools_print_region_data_blocks(hid_t region_id, if((type_size = H5Tget_size(type_id)) == 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_size failed"); - if((region_buf = HDmalloc(type_size * numelem)) == NULL) + if((region_buf = HDmalloc(type_size * (size_t)numelem)) == NULL) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Could not allocate region buffer"); /* Select (x , x , ..., x ) x (y , y , ..., y ) hyperslab for reading memory dataset */ @@ -781,7 +780,7 @@ h5tools_print_region_data_points(hid_t region_space, hid_t region_id, hsize_t curr_pos = 0; hsize_t total_size[H5S_MAX_RANK]; size_t jndx; - int indx; + unsigned indx; int type_size; int ret_value = SUCCEED; unsigned int region_flags; /* buffer extent flags */ @@ -808,7 +807,7 @@ h5tools_print_region_data_points(hid_t region_space, hid_t region_id, if((type_size = H5Tget_size(type_id)) == 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_size failed"); - if((region_buf = HDmalloc(type_size * npoints)) == NULL) + if((region_buf = HDmalloc(type_size * (size_t)npoints)) == NULL) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for region"); curr_pos = 0; @@ -1668,7 +1667,7 @@ h5tools_dump_simple_mem(FILE *stream, const h5tool_format_t *info, h5tools_conte hid_t type, hid_t space, void *mem) { HERR_INIT(herr_t, SUCCEED) - int i; /*counters */ + unsigned i; /*counters */ hsize_t nelmts; /*total selected elmts */ ctx->ndims = H5Sget_simple_extent_ndims(space); -- cgit v0.12 From 80955cf2247cf0dcf05664db7cbaf0af1f61a23f Mon Sep 17 00:00:00 2001 From: HDF Tester Date: Sun, 27 May 2012 09:34:59 -0500 Subject: [svn-r22413] Snapshot version 1.9 release 119 --- README.txt | 2 +- c++/src/Makefile.in | 2 +- config/lt_vers.am | 2 +- configure | 24 ++++++++++++------------ configure.in | 2 +- fortran/src/Makefile.in | 2 +- hl/c++/src/Makefile.in | 2 +- hl/fortran/src/Makefile.in | 2 +- hl/src/Makefile.in | 2 +- release_docs/RELEASE.txt | 2 +- src/H5public.h | 4 ++-- src/Makefile.in | 2 +- vms/src/h5pubconf.h | 6 +++--- windows/src/H5pubconf.h | 6 +++--- 14 files changed, 30 insertions(+), 30 deletions(-) diff --git a/README.txt b/README.txt index 837fda3..a3b4179 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.119 currently under development +HDF5 version 1.9.120 currently under development Please refer to the release_docs/INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index 60d0140..65486da 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -431,7 +431,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 109 +LT_VERS_REVISION = 110 LT_VERS_AGE = 0 # Include src directory diff --git a/config/lt_vers.am b/config/lt_vers.am index 2f415fc..45dfb0e 100644 --- a/config/lt_vers.am +++ b/config/lt_vers.am @@ -17,7 +17,7 @@ # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 109 +LT_VERS_REVISION = 110 LT_VERS_AGE = 0 ## If the API changes *at all*, increment LT_VERS_INTERFACE and diff --git a/configure b/configure index 984fcf3..db9383f 100755 --- a/configure +++ b/configure @@ -1,7 +1,7 @@ #! /bin/sh -# From configure.in Id: configure.in 22382 2012-05-20 14:36:03Z hdftest . +# From configure.in Id: configure.in 22390 2012-05-22 20:34:34Z byrn . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for HDF5 1.9.119. +# Generated by GNU Autoconf 2.68 for HDF5 1.9.120. # # Report bugs to . # @@ -571,8 +571,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='HDF5' PACKAGE_TARNAME='hdf5' -PACKAGE_VERSION='1.9.119' -PACKAGE_STRING='HDF5 1.9.119' +PACKAGE_VERSION='1.9.120' +PACKAGE_STRING='HDF5 1.9.120' PACKAGE_BUGREPORT='help@hdfgroup.org' PACKAGE_URL='' @@ -1463,7 +1463,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures HDF5 1.9.119 to adapt to many kinds of systems. +\`configure' configures HDF5 1.9.120 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1533,7 +1533,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of HDF5 1.9.119:";; + short | recursive ) echo "Configuration of HDF5 1.9.120:";; esac cat <<\_ACEOF @@ -1726,7 +1726,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -HDF5 configure 1.9.119 +HDF5 configure 1.9.120 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -2815,7 +2815,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by HDF5 $as_me 1.9.119, which was +It was created by HDF5 $as_me 1.9.120, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -3636,7 +3636,7 @@ fi # Define the identity of the package. PACKAGE='hdf5' - VERSION='1.9.119' + VERSION='1.9.120' cat >>confdefs.h <<_ACEOF @@ -30595,7 +30595,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by HDF5 $as_me 1.9.119, which was +This file was extended by HDF5 $as_me 1.9.120, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -30661,7 +30661,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -HDF5 config.status 1.9.119 +HDF5 config.status 1.9.120 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" @@ -33456,7 +33456,7 @@ Usage: $0 [OPTIONS] Report bugs to ." lt_cl_version="\ -HDF5 config.lt 1.9.119 +HDF5 config.lt 1.9.120 configured by $0, generated by GNU Autoconf 2.68. Copyright (C) 2010 Free Software Foundation, Inc. diff --git a/configure.in b/configure.in index dba6f30..de6416a 100644 --- a/configure.in +++ b/configure.in @@ -26,7 +26,7 @@ dnl dnl NOTE: Don't forget to change the version number here when we do a dnl release!!! dnl -AC_INIT([HDF5], [1.9.119], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.9.120], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AM_CONFIG_HEADER([src/H5config.h]) diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index f1a8077..db2eb81 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -478,7 +478,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 109 +LT_VERS_REVISION = 110 LT_VERS_AGE = 0 # Include src directory in both Fortran and C flags (C compiler is used diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index ed2ea4e..e739758 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -421,7 +421,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 109 +LT_VERS_REVISION = 110 LT_VERS_AGE = 0 # Include src directory diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index 5e435a2..0b4a74f 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -436,7 +436,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 109 +LT_VERS_REVISION = 110 LT_VERS_AGE = 0 INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/hl/src -I$(top_builddir)/hl/src \ -I$(top_srcdir)/fortran/src -I$(top_builddir)/fortran/src diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index 4396a50..b4eeee0 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -420,7 +420,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 109 +LT_VERS_REVISION = 110 LT_VERS_AGE = 0 # This library is our main target. diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index c0eb5dc..1fec8f8 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.119 currently under development +HDF5 version 1.9.120 currently under development ================================================================================ diff --git a/src/H5public.h b/src/H5public.h index d000650..c514a4f 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -75,10 +75,10 @@ extern "C" { /* Version numbers */ #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 9 /* For minor interface/format changes */ -#define H5_VERS_RELEASE 119 /* For tweaks, bug-fixes, or development */ +#define H5_VERS_RELEASE 120 /* For tweaks, bug-fixes, or development */ #define H5_VERS_SUBRELEASE "" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.9.119" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.9.120" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) diff --git a/src/Makefile.in b/src/Makefile.in index b4d0465..a422176 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -484,7 +484,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 109 +LT_VERS_REVISION = 110 LT_VERS_AGE = 0 H5detect_CFLAGS = -g $(AM_CFLAGS) diff --git a/vms/src/h5pubconf.h b/vms/src/h5pubconf.h index 2204937..65f980b 100644 --- a/vms/src/h5pubconf.h +++ b/vms/src/h5pubconf.h @@ -502,7 +502,7 @@ #define H5_PACKAGE_NAME "HDF5" /* Define to the full name and version of this package. */ -#define H5_PACKAGE_STRING "HDF5 1.9.119" +#define H5_PACKAGE_STRING "HDF5 1.9.120" /* Define to the one symbol short name of this package. */ #define H5_PACKAGE_TARNAME "hdf5" @@ -511,7 +511,7 @@ #define H5_PACKAGE_URL "" /* Define to the version of this package. */ -#define H5_PACKAGE_VERSION "1.9.119" +#define H5_PACKAGE_VERSION "1.9.120" /* Width for printf() for type `long long' or `__int64', use `ll' */ #define H5_PRINTF_LL_WIDTH "ll" @@ -674,7 +674,7 @@ /* #undef H5_USING_MEMCHECKER */ /* Version number of package */ -#define H5_VERSION "1.9.119" +#define H5_VERSION "1.9.120" /* Define if vsnprintf() returns the correct value for formatted strings that don't fit into size allowed */ diff --git a/windows/src/H5pubconf.h b/windows/src/H5pubconf.h index 8b2ee0f..a7cba8d 100644 --- a/windows/src/H5pubconf.h +++ b/windows/src/H5pubconf.h @@ -527,7 +527,7 @@ #define H5_PACKAGE_NAME "HDF5" /* Define to the full name and version of this package. */ -#define H5_PACKAGE_STRING "HDF5 1.9.119" +#define H5_PACKAGE_STRING "HDF5 1.9.120" /* Define to the one symbol short name of this package. */ #define H5_PACKAGE_TARNAME "hdf5" @@ -536,7 +536,7 @@ #define H5_PACKAGE_URL "" /* Define to the version of this package. */ -#define H5_PACKAGE_VERSION "1.9.119" +#define H5_PACKAGE_VERSION "1.9.120" /* Width for printf() for type `long long' or `__int64', use `ll' */ #define H5_PRINTF_LL_WIDTH "I64" @@ -707,7 +707,7 @@ /* #undef H5_USING_MEMCHECKER */ /* Version number of package */ -#define H5_VERSION "1.9.119" +#define H5_VERSION "1.9.120" /* Define if vsnprintf() returns the correct value for formatted strings that don't fit into size allowed */ -- cgit v0.12 From bf24ca674154bd6200d268e39cf3a13cea5d8dde Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 29 May 2012 09:24:01 -0500 Subject: [svn-r22415] Windows needs monolithic set for CPack (CMake 2.8.6) --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 08ad6ab..fbb8e98 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -942,6 +942,7 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES) ENDIF (EXISTS "${HDF5_SOURCE_DIR}/release_docs") SET (CPACK_PACKAGE_RELOCATABLE TRUE) IF (WIN32) + SET (CPACK_MONOLITHIC_INSTALL ON) SET (CPACK_NSIS_CONTACT "help@hdfgroup.org") SET (CPACK_NSIS_MODIFY_PATH ON) SET (CPACK_NSIS_PACKAGE_NAME "HDF5 ${HDF5_PACKAGE_VERSION}") -- cgit v0.12 From ed84ad426b86ded29b74b45ef02ec4685d05df6b Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 29 May 2012 09:31:09 -0500 Subject: [svn-r22416] Missing ${TEST_FOLDER} path component in test script --- config/cmake/runTest.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/cmake/runTest.cmake b/config/cmake/runTest.cmake index 34fac1f..139819f 100644 --- a/config/cmake/runTest.cmake +++ b/config/cmake/runTest.cmake @@ -51,7 +51,7 @@ IF (ERROR_APPEND) ENDIF (ERROR_APPEND) IF (TEST_APPEND) - FILE (APPEND ${TEST_OUTPUT} "${TEST_APPEND} ${TEST_RESULT}\n") + FILE (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_APPEND} ${TEST_RESULT}\n") ENDIF (TEST_APPEND) # if the return value is !=${TEST_EXPECT} bail out -- cgit v0.12