diff options
author | Larry Knox <lrknox@hdfgroup.org> | 2019-10-09 04:26:03 (GMT) |
---|---|---|
committer | Larry Knox <lrknox@hdfgroup.org> | 2019-10-09 20:18:52 (GMT) |
commit | 262df2adce6ae3378d77fb948603dde6c00d01de (patch) | |
tree | 0afadf0fece59ed6a96ab80dd0234daa0e8daf37 /tools/test | |
parent | e487737b4fb7267385d8219796263ef29c3b9b95 (diff) | |
download | hdf5-262df2adce6ae3378d77fb948603dde6c00d01de.zip hdf5-262df2adce6ae3378d77fb948603dde6c00d01de.tar.gz hdf5-262df2adce6ae3378d77fb948603dde6c00d01de.tar.bz2 |
Fix errors in testh5dump.sh tests that grep for reference error messages.
Diffstat (limited to 'tools/test')
-rw-r--r-- | tools/test/h5dump/testh5dump.sh.in | 30 |
1 files changed, 30 insertions, 0 deletions
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 $@ |