diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2010-08-09 18:15:37 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2010-08-09 18:15:37 (GMT) |
commit | eee9ca47a186a06a8a2072d7dca2316918ca1103 (patch) | |
tree | fa89bfa2392d2877c2fc8b1864b547da3f91a35a /tools/h5dump/testh5dump.sh.in | |
parent | c1aa958992fb7eb73ef48a6e91f63ae2140cc422 (diff) | |
download | hdf5-eee9ca47a186a06a8a2072d7dca2316918ca1103.zip hdf5-eee9ca47a186a06a8a2072d7dca2316918ca1103.tar.gz hdf5-eee9ca47a186a06a8a2072d7dca2316918ca1103.tar.bz2 |
[svn-r19202] [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.in | 44 |
1 files changed, 41 insertions, 3 deletions
diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in index 82d09fc..78b7757 100644 --- a/tools/h5dump/testh5dump.sh.in +++ b/tools/h5dump/testh5dump.sh.in @@ -144,6 +144,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() { @@ -482,14 +520,14 @@ if test -z "$HDF5_NOCLEANUP"; then rm -f $TESTDIR/out3.h5 fi - - # test for dataset region references TOOLTEST tdatareg.ddl tdatareg.h5 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 @@ -504,7 +542,6 @@ TOOLTEST torderattr2.ddl -H --sort_by=name --sort_order=descending torderattr.h5 TOOLTEST torderattr3.ddl -H --sort_by=creation_order --sort_order=ascending torderattr.h5 TOOLTEST torderattr4.ddl -H --sort_by=creation_order --sort_order=descending torderattr.h5 - # tests for floating point user defined printf format TOOLTEST tfpformat.ddl -m %.7f tfpformat.h5 @@ -513,6 +550,7 @@ TOOLTEST textlinksrc.ddl textlinksrc.h5 TOOLTEST textlinkfar.ddl textlinkfar.h5 +# Report test results and exit if test $nerrors -eq 0 ; then echo "All $TESTNAME tests passed." exit $EXIT_SUCCESS |