diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2009-02-26 21:25:57 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2009-02-26 21:25:57 (GMT) |
commit | 086c205ca4c6d5aa4b696f76148dc15b0c34a715 (patch) | |
tree | 81269bcc2176b1de4bc85664c3ccc4fd5b31e2cf /tools/h5ls | |
parent | 39c794d2c43a519ab35fe8bb78d193b519dcda8a (diff) | |
download | hdf5-086c205ca4c6d5aa4b696f76148dc15b0c34a715.zip hdf5-086c205ca4c6d5aa4b696f76148dc15b0c34a715.tar.gz hdf5-086c205ca4c6d5aa4b696f76148dc15b0c34a715.tar.bz2 |
[svn-r16519] merge 16518 from trunk
have 2 expected outputs for 2 h5ls runs depending if run on a big or little endian machine. Configure.in was modified to export a variable carrying endianess information to testh5ls.sh. This script then compares the current run with 2 expected outputs, one for a big-endian machine (linew was used to generate the output), other for little endian (jam was used to generate the output)
the way h5ls prints types, it starts searching for NATIVE types first. One solution would be h5ls not to detect these native types, using for example the same print datatype function that h5dump does, that would make the output look the same on all platforms ("32-bit little-endian integer" would be printed instead). Drawback, this "native" information would not be available. Other solution is to have not one but 2 expected outputs and make the shell script detect the endianess and compare with one output or other
tested: jam, linew
Diffstat (limited to 'tools/h5ls')
-rw-r--r-- | tools/h5ls/Makefile.am | 2 | ||||
-rw-r--r-- | tools/h5ls/Makefile.in | 9 | ||||
-rw-r--r--[-rwxr-xr-x] | tools/h5ls/testh5ls.sh.in (renamed from tools/h5ls/testh5ls.sh) | 16 |
3 files changed, 21 insertions, 6 deletions
diff --git a/tools/h5ls/Makefile.am b/tools/h5ls/Makefile.am index c2222a1..439ef07 100644 --- a/tools/h5ls/Makefile.am +++ b/tools/h5ls/Makefile.am @@ -24,7 +24,7 @@ include $(top_srcdir)/config/commence.am INCLUDES=-I$(top_srcdir)/src -I$(top_srcdir)/tools/lib # Test programs and scripts -TEST_SCRIPT=$(srcdir)/testh5ls.sh +TEST_SCRIPT=testh5ls.sh check_SCRIPTS=$(TEST_SCRIPT) SCRIPT_DEPEND=h5ls$(EXEEXT) diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in index f4fc5e8..771bd20 100644 --- a/tools/h5ls/Makefile.in +++ b/tools/h5ls/Makefile.in @@ -50,7 +50,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/config/commence.am \ + $(srcdir)/testh5ls.sh.in $(top_srcdir)/config/commence.am \ $(top_srcdir)/config/conclude.am bin_PROGRAMS = h5ls$(EXEEXT) TESTS = $(check_SCRIPTS) @@ -61,7 +61,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 = +CONFIG_CLEAN_FILES = testh5ls.sh am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) @@ -234,6 +234,7 @@ USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@ USE_FILTER_SZIP = @USE_FILTER_SZIP@ USINGMEMCHECKER = @USINGMEMCHECKER@ VERSION = @VERSION@ +WORDS_BIGENDIAN = @WORDS_BIGENDIAN@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -338,7 +339,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/tools/lib # Test programs and scripts -TEST_SCRIPT = $(srcdir)/testh5ls.sh +TEST_SCRIPT = testh5ls.sh check_SCRIPTS = $(TEST_SCRIPT) SCRIPT_DEPEND = h5ls$(EXEEXT) @@ -393,6 +394,8 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +testh5ls.sh: $(top_builddir)/config.status $(srcdir)/testh5ls.sh.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" diff --git a/tools/h5ls/testh5ls.sh b/tools/h5ls/testh5ls.sh.in index 8194bfb..ddb09b5 100755..100644 --- a/tools/h5ls/testh5ls.sh +++ b/tools/h5ls/testh5ls.sh.in @@ -22,6 +22,8 @@ CMP='cmp -s' DIFF='diff -c' NLINES=20 # Max. lines of output to display if test fails +WORDS_BIGENDIAN="@WORDS_BIGENDIAN@" + nerrors=0 verbose=yes @@ -174,10 +176,20 @@ TOOLTEST tattr2.ls 0 -w80 -v -S tattr2.h5 TOOLTEST nosuchfile.ls 0 nosuchfile.h5 # test for variable length data types in verbose mode -TOOLTEST tvldtypes2.ls 0 -v tvldtypes1.h5 +if test $WORDS_BIGENDIAN != "yes"; then + TOOLTEST tvldtypes2le.ls 0 -v tvldtypes1.h5 +else + TOOLTEST tvldtypes2be.ls 0 -v tvldtypes1.h5 +fi + # test for dataset region references data types in verbose mode -TOOLTEST tdatareg.ls 0 -v tdatareg.h5 +if test $WORDS_BIGENDIAN != "yes"; then + TOOLTEST tdataregle.ls 0 -v tdatareg.h5 +else + TOOLTEST tdataregbe.ls 0 -v tdatareg.h5 +fi + if test $nerrors -eq 0 ; then echo "All h5ls tests passed." |