diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2013-04-01 20:42:58 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2013-04-01 20:42:58 (GMT) |
commit | 95332ad1770877b3b4558eb91a2dae4a0dd5aab1 (patch) | |
tree | ced08b53e3c6474b4a6656d4c3399f1d96b4b40d /tools/h5dump/testh5dump.sh.in | |
parent | 91bcf7432e992d58741fe1925bb93bf32feb3358 (diff) | |
download | hdf5-95332ad1770877b3b4558eb91a2dae4a0dd5aab1.zip hdf5-95332ad1770877b3b4558eb91a2dae4a0dd5aab1.tar.gz hdf5-95332ad1770877b3b4558eb91a2dae4a0dd5aab1.tar.bz2 |
[svn-r23510] I merged the changes for DESY project from the trunk (r23496) into this 1.8 DESY branch.
Tested with h5committest (duck failed with CMake because I don't know how to change test/CMakeLists.txt. I'll wait for Allen to do it).
Diffstat (limited to 'tools/h5dump/testh5dump.sh.in')
-rw-r--r-- | tools/h5dump/testh5dump.sh.in | 69 |
1 files changed, 68 insertions, 1 deletions
diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in index 0456827..612f4ec 100644 --- a/tools/h5dump/testh5dump.sh.in +++ b/tools/h5dump/testh5dump.sh.in @@ -38,6 +38,9 @@ DIRNAME='dirname' LS='ls' AWK='awk' +# Skip plugin module to test missing filter +ENVCMD="env HDF5_PLUGIN_PRELOAD=::" + nerrors=0 verbose=yes @@ -719,6 +722,70 @@ TOOLTEST4() { } +# same as TOOLTEST4 but disables plugin filter loading +# silences extra error output on some platforms +# ADD_H5ERR_MASK_TEST +TOOLTEST5() { + + expect="$TESTDIR/$1" + expect_err="$TESTDIR/`basename $1 .ddl`.err" + actual="$TESTDIR/`basename $1 .ddl`.out" + actual_err="$TESTDIR/`basename $1 .ddl`.oerr" + actual_ext="$TESTDIR/`basename $1 .ddl`.ext" + actual_sav=${actual}-sav + actual_err_sav=${actual_err}-sav + shift + + # Run test. + TESTING $DUMPER $@ + ( + cd $TESTDIR + $ENVCMD $RUNSERIAL $DUMPER_BIN "$@" + ) >$actual 2>$actual_err + + # save actual and actual_err in case they are needed later. + cp $actual $actual_sav + STDOUT_FILTER $actual + cp $actual_err $actual_err_sav + STDERR_FILTER $actual_err + + # Extract file name, line number, version and thread IDs because they may be different + sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ + -e 's/line [0-9]*/line (number)/' \ + -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ + -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ + -e 's/H5Eget_auto[1-2]*/H5Eget_auto(1 or 2)/' \ + -e 's/H5Eset_auto[1-2]*/H5Eset_auto(1 or 2)/' \ + $actual_err > $actual_ext + #cat $actual_ext >> $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 + if $CMP $expect_err $actual_ext; then + echo " PASSED" + else + echo "*FAILED*" + echo " Expected result (*.err) differs from actual result (*.oerr)" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /' + fi + else + echo "*FAILED*" + echo " Expected result (*.ddl) differs from actual result (*.out)" + 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 $actual_sav $actual_err_sav + fi + +} + # Print a "SKIP" message SKIP() { TESTING $DUMPER $@ @@ -1125,7 +1192,7 @@ TOOLTEST4 textlinkfar.ddl --enable-error-stack textlinkfar.h5 TOOLTEST4 textlink.ddl --enable-error-stack textlink.h5 # test for error stack display (BZ2048) -TOOLTEST4 filter_fail.ddl --enable-error-stack filter_fail.h5 +TOOLTEST5 filter_fail.ddl --enable-error-stack filter_fail.h5 # test for -o -y for dataset with attributes TOOLTEST2 tall-6.exp --enable-error-stack -y -o tall-6.txt -d /g1/g1.1/dset1.1.1 tall.h5 |