summaryrefslogtreecommitdiffstats
path: root/tools/h5dump/testh5dump.sh.in
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2010-08-09 17:15:06 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2010-08-09 17:15:06 (GMT)
commit02b5824f57c778aa91f4d78f72a615f2e62a3783 (patch)
tree3326933f473ae2c20a3e6b7c12cebd894877e3fc /tools/h5dump/testh5dump.sh.in
parenta586c760ee217c619fc97f0498c57506fb360a3e (diff)
downloadhdf5-02b5824f57c778aa91f4d78f72a615f2e62a3783.zip
hdf5-02b5824f57c778aa91f4d78f72a615f2e62a3783.tar.gz
hdf5-02b5824f57c778aa91f4d78f72a615f2e62a3783.tar.bz2
[svn-r19198] [BZ1953]implementation for the proposed changes suggested by the "h5dump_output_option" RFC. This required that the region reference code be duplicated and reduced to allow the do_bin_output() function to understand region references. The container type-id also needed to be propagated into the do_bin_output() function and functions referenced (render_bin_output*).
Existing tests tested the binary function, so only one test was added to test the region reference generated file. Tested: local linux
Diffstat (limited to 'tools/h5dump/testh5dump.sh.in')
-rw-r--r--tools/h5dump/testh5dump.sh.in40
1 files changed, 40 insertions, 0 deletions
diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in
index d18a6b0..d8fcf26 100644
--- a/tools/h5dump/testh5dump.sh.in
+++ b/tools/h5dump/testh5dump.sh.in
@@ -147,6 +147,44 @@ TOOLTEST1() {
}
+# same as TOOLTEST1 but compares generated file to Expected output
+# used for the binary tests that expect a full path in -o without -b
+TOOLTEST2() {
+
+ expect="$srcdir/../testfiles/`basename $1 .exp`.txt"
+ actual="../testfiles/`basename $1 .exp`.out"
+ actual_err="../testfiles/`basename $1 .exp`.err"
+ shift
+
+ # Run test.
+ TESTING $DUMPER $@
+ (
+
+ cd $srcdir/../testfiles
+ $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
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.txt)"
+ 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
+ fi
+
+}
+
# Print a "SKIP" message
SKIP() {
@@ -494,6 +532,8 @@ TOOLTEST tdataregR.ddl -R tdatareg.h5
TOOLTEST tattrreg.ddl tattrreg.h5
TOOLTEST tattrregR.ddl -R tattrreg.h5
+TOOLTEST2 tbinregR.exp -d /Dataset1 -s 0 -y -o $TESTDIR/tbinregR.txt tdatareg.h5
+
# tests for group creation order
# "1" tracked, "2" name, root tracked
TOOLTEST tordergr1.ddl --group=1 --sort_by=creation_order --sort_order=ascending tordergr.h5