From 262df2adce6ae3378d77fb948603dde6c00d01de Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Tue, 8 Oct 2019 23:26:03 -0500 Subject: Fix errors in testh5dump.sh tests that grep for reference error messages. --- tools/test/h5dump/testh5dump.sh.in | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/tools/test/h5dump/testh5dump.sh.in b/tools/test/h5dump/testh5dump.sh.in index e5680cf..f920b9c 100644 --- a/tools/test/h5dump/testh5dump.sh.in +++ b/tools/test/h5dump/testh5dump.sh.in @@ -935,6 +935,36 @@ GREPTEST() fi } +# Call the h5dump tool and grep for an error string +# +GREPERRTEST() +{ + expectdata=$1 + actual=$TESTDIR/$2 + actual_err="$TESTDIR/`basename $2 .ddl`.oerr" + shift + shift + + # Run test. + TESTING $DUMPER -p $@ + ( + cd $TESTDIR + $ENVCMD $RUNSERIAL $DUMPER_BIN -p "$@" + ) >$actual 2>$actual_err + $GREP "$expectdata" $actual_err > /dev/null + if [ $? -eq 0 ]; then + echo " PASSED" + else + echo " FAILED" + nerrors="`expr $nerrors + 1`" + fi + + # Clean up output file + if test -z "$HDF5_NOCLEANUP"; then + rm -f $actual $actual_err + fi +} + # Print a "SKIP" message SKIP() { TESTING $DUMPER $@ -- cgit v0.12