diff options
author | Vailin Choi <vchoi@hdfgroup.org> | 2013-10-18 20:03:47 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@hdfgroup.org> | 2013-10-18 20:03:47 (GMT) |
commit | 9729a518b49a2217307c3c7ce9b33b064fc83147 (patch) | |
tree | 28b22bf7d1972b4a537bcec377778147c976420c /tools/h5repack/h5repack.sh.in | |
parent | 1bc858b1b889ae2d0eeca463646592d195db8c94 (diff) | |
download | hdf5-9729a518b49a2217307c3c7ce9b33b064fc83147.zip hdf5-9729a518b49a2217307c3c7ce9b33b064fc83147.tar.gz hdf5-9729a518b49a2217307c3c7ce9b33b064fc83147.tar.bz2 |
[svn-r24332] Bring revision #24330 from revise_chunks. h5committested.
Diffstat (limited to 'tools/h5repack/h5repack.sh.in')
-rw-r--r-- | tools/h5repack/h5repack.sh.in | 48 |
1 files changed, 44 insertions, 4 deletions
diff --git a/tools/h5repack/h5repack.sh.in b/tools/h5repack/h5repack.sh.in index 42b8ecb..583b6ef 100644 --- a/tools/h5repack/h5repack.sh.in +++ b/tools/h5repack/h5repack.sh.in @@ -117,11 +117,15 @@ $SRC_TOOLS_TESTFILES/tfamily00010.h5 " LIST_OTHER_TEST_FILES=" +$SRC_H5REPACK_TESTFILES/h5repack-help.txt $SRC_H5REPACK_TESTFILES/h5repack_ext.bin $SRC_H5REPACK_TESTFILES/ublock.bin $SRC_H5REPACK_TESTFILES/h5repack.info +$SRC_H5REPACK_TESTFILES/deflate_limit.h5repack_layout.h5.ddl $SRC_H5REPACK_TESTFILES/h5repack_layout.h5.ddl -$SRC_TOOLS_TESTFILES/h5repack_filters.h5.ddl +$SRC_H5REPACK_TESTFILES/h5repack_filters.h5.tst +$SRC_H5REPACK_TESTFILES/h5repack_layout.h5-plugin_test.ddl +$SRC_H5REPACK_TESTFILES/plugin_test.h5repack_layout.h5.tst " # @@ -436,7 +440,7 @@ TOOLTEST1() # TOOLTESTV() { - expect="$TESTDIR/$2.ddl" + expect="$TESTDIR/$2.tst" actual="$TESTDIR/`basename $2 .ddl`.out" actual_err="$TESTDIR/`basename $2 .ddl`.err" @@ -468,7 +472,7 @@ TOOLTESTV() echo " PASSED" else echo "*FAILED*" - echo " Expected result (*.ddl) differs from actual result (*.out)" + echo " Expected result (*.tst) differs from actual result (*.out)" nerrors="`expr $nerrors + 1`" test yes = "$verbose" && diff -c $expect $actual |sed 's/^/ /' fi @@ -484,7 +488,7 @@ TOOLTEST_DUMP() { infile=$TESTDIR/$2 outfile=$TESTDIR/out-$1.$2 - expect="$TESTDIR/$2.ddl" + expect="$TESTDIR/$1.$2.ddl" actual="$TESTDIR/out-$1.$2.out" actual_err="$TESTDIR/out-$1.$2.err" @@ -592,6 +596,40 @@ TOOLTEST_META() rm -f $outfile } +# ADD_HELP_TEST +TOOLTEST_HELP() { + + expect="$TESTDIR/$1" + actual="$TESTDIR/`basename $1 .txt`.out" + actual_err="$TESTDIR/`basename $1 .txt`.err" + shift + + # Run test. + TESTING $H5REPACK $@ + ( + cd $TESTDIR + $RUNSERIAL $H5REPACK_BIN "$@" + ) >$actual 2>$actual_err + cat $actual_err >> $actual + + if [ ! -f $expect ]; then + # Create the expect data file if it doesn't yet exist. + echo " CREATED" + cp $actual $expect-CREATED + elif cmp -s $expect $actual; then + echo " PASSED" + else + echo "*FAILED*" + echo " Expected output (*.txt) differs from actual output (*.out)" + nerrors="`expr $nerrors + 1`" + fi + + # Clean up output file + if test -z "$HDF5_NOCLEANUP"; then + rm -f $actual $actual_err + fi + +} # This is different from $srcdir/../../bin/output_filter.sh STDOUT_FILTER() { @@ -630,6 +668,8 @@ fi # prepare for test COPY_TESTFILES_TO_TESTDIR +TOOLTEST_HELP h5repack-help.txt -h + # copy files (these files have no filters) TOOLTEST fill h5repack_fill.h5 TOOLTEST objs h5repack_objs.h5 |