summaryrefslogtreecommitdiffstats
path: root/tools/h5dump
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2015-04-22 22:31:12 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2015-04-22 22:31:12 (GMT)
commite0e28a7aae2fabf3ae9d03a1bd5809176935466a (patch)
treea6b840f4c13522aecdd504d16ee5a265e2abad27 /tools/h5dump
parent65b3bc2a937337239ceede5e39261c6b2ba4dc69 (diff)
downloadhdf5-e0e28a7aae2fabf3ae9d03a1bd5809176935466a.zip
hdf5-e0e28a7aae2fabf3ae9d03a1bd5809176935466a.tar.gz
hdf5-e0e28a7aae2fabf3ae9d03a1bd5809176935466a.tar.bz2
[svn-r26894] Bring revisions #26459 - #26785 from trunk to revise_chunks.
h5committested.
Diffstat (limited to 'tools/h5dump')
-rw-r--r--tools/h5dump/CMakeLists.txt6
-rw-r--r--tools/h5dump/CMakeTests.cmake20
-rw-r--r--tools/h5dump/CMakeTestsXML.cmake8
-rw-r--r--tools/h5dump/Makefile.in5
-rw-r--r--tools/h5dump/binread.c66
-rw-r--r--tools/h5dump/testh5dump.sh.in17
-rw-r--r--tools/h5dump/testh5dumpxml.sh.in12
7 files changed, 52 insertions, 82 deletions
diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt
index 4559ae3..7658c04 100644
--- a/tools/h5dump/CMakeLists.txt
+++ b/tools/h5dump/CMakeLists.txt
@@ -15,7 +15,7 @@ add_executable (h5dump
${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump_xml.c
)
TARGET_NAMING (h5dump ${LIB_TYPE})
-TARGET_C_PROPERTIES (h5dump " " " ")
+TARGET_C_PROPERTIES (h5dump ${LIB_TYPE} " " " ")
target_link_libraries (h5dump ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5dump PROPERTIES FOLDER tools)
@@ -27,8 +27,8 @@ if (BUILD_TESTING)
# --------------------------------------------------------------------
if (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
add_executable (h5dumpgentest ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dumpgentest.c)
- TARGET_NAMING (h5dumpgentest ${LIB_TYPE})
- TARGET_C_PROPERTIES (h5dumpgentest " " " ")
+ TARGET_NAMING (h5dumpgentest STATIC)
+ TARGET_C_PROPERTIES (h5dumpgentest STATIC " " " ")
target_link_libraries (h5dumpgentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (h5dumpgentest PROPERTIES FOLDER generator/tools)
diff --git a/tools/h5dump/CMakeTests.cmake b/tools/h5dump/CMakeTests.cmake
index afb482e..00ec760 100644
--- a/tools/h5dump/CMakeTests.cmake
+++ b/tools/h5dump/CMakeTests.cmake
@@ -1340,30 +1340,14 @@
set (USE_FILTER_SZIP "true")
endif (H5_HAVE_FILTER_SZIP)
- if (H5_HAVE_FILTER_SHUFFLE)
- set (USE_FILTER_SHUFFLE "true")
- endif (H5_HAVE_FILTER_SHUFFLE)
-
- if (H5_HAVE_FILTER_FLETCHER32)
- set (USE_FILTER_FLETCHER32 "true")
- endif (H5_HAVE_FILTER_FLETCHER32)
-
- if (H5_HAVE_FILTER_NBIT)
- set (USE_FILTER_NBIT "true")
- endif (H5_HAVE_FILTER_NBIT)
-
- if (H5_HAVE_FILTER_SCALEOFFSET)
- set (USE_FILTER_SCALEOFFSET "true")
- endif (H5_HAVE_FILTER_SCALEOFFSET)
-
- if (USE_FILTER_DEFLATE AND USE_FILTER_SHUFFLE AND USE_FILTER_FLETCHER32 AND USE_FILTER_NBIT AND USE_FILTER_SCALEOFFSET)
+ if (USE_FILTER_DEFLATE)
# data read internal filters
ADD_H5_TEST (treadintfilter 0 --enable-error-stack -d deflate -d shuffle -d fletcher32 -d nbit -d scaleoffset tfilters.h5)
if (HDF5_ENABLE_SZIP_SUPPORT)
# data read all filters
ADD_H5_TEST (treadfilter 0 --enable-error-stack -d all -d szip tfilters.h5)
endif (HDF5_ENABLE_SZIP_SUPPORT)
- endif (USE_FILTER_DEFLATE AND USE_FILTER_SHUFFLE AND USE_FILTER_FLETCHER32 AND USE_FILTER_NBIT AND USE_FILTER_SCALEOFFSET)
+ endif (USE_FILTER_DEFLATE)
# test for displaying objects with very long names
ADD_H5_TEST (tlonglinks 0 --enable-error-stack tlonglinks.h5)
diff --git a/tools/h5dump/CMakeTestsXML.cmake b/tools/h5dump/CMakeTestsXML.cmake
index a939d78..0a667c4 100644
--- a/tools/h5dump/CMakeTestsXML.cmake
+++ b/tools/h5dump/CMakeTestsXML.cmake
@@ -411,14 +411,6 @@
ADD_XML_H5_TEST (tempty-dtd.h5 0 --use-dtd tempty.h5)
ADD_XML_H5_TEST (tempty-dtd-2.h5 0 -u tempty.h5)
- # The lone colon here confuses some systems (Cray X1). Skip
- # it if configure detects that this is a problem.
- set (TESTTYPE "TEST")
- if (NOT ${H5_LONE_COLON})
- set (TESTTYPE "SKIP")
- endif (NOT ${H5_LONE_COLON})
- ADD_XML_SKIP_H5_TEST (tempty-nons.h5 0 ${TESTTYPE} -X : tempty.h5)
-
ADD_XML_H5_TEST (tempty-nons-2.h5 0 --xml-ns=: tempty.h5)
## Some of these combinations are syntactically correct but
diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in
index aee2a6c..7371adf 100644
--- a/tools/h5dump/Makefile.in
+++ b/tools/h5dump/Makefile.in
@@ -420,7 +420,6 @@ AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@ @H5_LDFLAGS@
AM_MAKEFLAGS = @AM_MAKEFLAGS@
AR = @AR@
-AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@@ -452,7 +451,6 @@ DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
-DYNAMIC_DIRS = @DYNAMIC_DIRS@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
@@ -476,11 +474,9 @@ GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
-H5_CXX_SHARED = @H5_CXX_SHARED@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
H5_LDFLAGS = @H5_LDFLAGS@
-H5_LONE_COLON = @H5_LONE_COLON@
H5_VERSION = @H5_VERSION@
HADDR_T = @HADDR_T@
HAVE_DMALLOC = @HAVE_DMALLOC@
@@ -543,7 +539,6 @@ R_INTEGER = @R_INTEGER@
R_LARGE = @R_LARGE@
SEARCH = @SEARCH@
SED = @SED@
-SETX = @SETX@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIZE_T = @SIZE_T@
diff --git a/tools/h5dump/binread.c b/tools/h5dump/binread.c
index 5abb9af..74db92c 100644
--- a/tools/h5dump/binread.c
+++ b/tools/h5dump/binread.c
@@ -49,8 +49,7 @@
static void
usage (void)
{
- fprintf(stderr, "\
- usage: binread FILE_NAME\n");
+ fprintf(stderr, "usage: binread FILE_NAME\n");
}
/*-------------------------------------------------------------------------
@@ -64,38 +63,35 @@ usage (void)
int
main (int argc, const char *argv[])
{
- FILE *stream;
- int numread;
- TYPE buf[NELMTS];
- size_t i, nelmts = NELMTS;
- char *fname=NULL;
-
- if (argc != 2)
- {
- usage();
- exit(1);
- }
-
- fname = strdup(argv[1]);
-
- if( (stream = fopen(fname, "rb" )) != NULL )
- {
- numread = fread( buf, sizeof( TYPE ), nelmts, stream );
- printf( "Number of items read = %d\n", numread );
-
- for (i = 0; i < nelmts; i++)
- {
- printf(FORMAT,buf[i]);
- }
- printf("\n");
-
- fclose( stream );
- }
- else
- printf( "File %s could not be opened\n",fname );
-
- free(fname);
-
- return 0;
+ FILE *stream;
+ size_t numread;
+ TYPE buf[NELMTS];
+ size_t i, nelmts = NELMTS;
+ char *fname=NULL;
+
+ if (argc != 2) {
+ usage();
+ exit(1);
+ }
+
+ fname = strdup(argv[1]);
+
+ if((stream = fopen(fname, "rb")) != NULL) {
+ numread = fread(buf, sizeof( TYPE ), nelmts, stream);
+ printf("Number of items read = %llu\n", (unsigned long long)numread);
+
+ for (i = 0; i < nelmts; i++) {
+ printf(FORMAT,buf[i]);
+ }
+ printf("\n");
+
+ fclose(stream);
+ }
+ else
+ printf("File %s could not be opened\n", fname);
+
+ free(fname);
+
+ return 0;
}
diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in
index 36f12a0..95f8091 100644
--- a/tools/h5dump/testh5dump.sh.in
+++ b/tools/h5dump/testh5dump.sh.in
@@ -436,8 +436,21 @@ TESTING() {
# 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.
+# If $1 == ignorecase then do caseless CMP and DIFF.
# ADD_H5_TEST
TOOLTEST() {
+ # check if caseless compare and diff requested
+ if [ "$1" = ignorecase ]; then
+ caseless="-i"
+ # replace cmp with diff which runs much longer.
+ xCMP="$DIFF -i"
+ shift
+ else
+ caseless=""
+ # stick with faster cmp if ignorecase is not requested.
+ xCMP="$CMP"
+ fi
+
expect="$TESTDIR/$1"
actual="$TESTDIR/`basename $1 .ddl`.out"
actual_err="$TESTDIR/`basename $1 .ddl`.err"
@@ -463,13 +476,13 @@ TOOLTEST() {
# Create the expect file if it doesn't yet exist.
echo " CREATED"
cp $actual $expect
- elif $CMP $expect $actual; then
+ elif $xCMP $expect $actual > /dev/null 2>&1 ; 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/^/ /'
+ test yes = "$verbose" && $DIFF $caseless $expect $actual |sed 's/^/ /'
fi
# Clean up output file
diff --git a/tools/h5dump/testh5dumpxml.sh.in b/tools/h5dump/testh5dumpxml.sh.in
index 4dad9cd..1efde85 100644
--- a/tools/h5dump/testh5dumpxml.sh.in
+++ b/tools/h5dump/testh5dumpxml.sh.in
@@ -21,8 +21,6 @@ TESTNAME=h5dumpxml
EXIT_SUCCESS=0
EXIT_FAILURE=1
-H5_LONE_COLON="@H5_LONE_COLON@"
-
DUMPER=h5dump # The tool name
DUMPER_BIN=`pwd`/$DUMPER # The path of the tool binary
@@ -356,15 +354,7 @@ TOOLTEST tnamed_dtype_attr.h5.xml --xml tnamed_dtype_attr.h5
TOOLTEST tempty-dtd.h5.xml --xml --use-dtd tempty.h5
TOOLTEST tempty-dtd-2.h5.xml --xml -u tempty.h5
-
-# The lone colon here confuses some systems (Cray X1). Skip
-# it if configure detects that this is a problem.
-if test "X$H5_LONE_COLON" != "Xno"; then
- TOOLTEST tempty-nons.h5.xml --xml -X ":" tempty.h5
-else
- SKIP tempty-nons.h5.xml --xml -X ":" tempty.h5
-fi
-
+TOOLTEST tempty-nons.h5.xml --xml -X ":" tempty.h5
TOOLTEST tempty-nons-2.h5.xml --xml --xml-ns=":" tempty.h5
## Some of these combinations are syntactically correct but