summaryrefslogtreecommitdiffstats
path: root/tools/test/h5dump/testh5dump.sh.in
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-12-22 00:04:45 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-12-22 00:04:45 (GMT)
commita2604b1e1583514c4a5b4bf1692c4db939ca6893 (patch)
tree2f256941b674049481f24d4abdfe331ab317de66 /tools/test/h5dump/testh5dump.sh.in
parentb81802b71e7d723e7d121c82eaf1844ef8527d0d (diff)
downloadhdf5-a2604b1e1583514c4a5b4bf1692c4db939ca6893.zip
hdf5-a2604b1e1583514c4a5b4bf1692c4db939ca6893.tar.gz
hdf5-a2604b1e1583514c4a5b4bf1692c4db939ca6893.tar.bz2
grep for failure text in error stack
Diffstat (limited to 'tools/test/h5dump/testh5dump.sh.in')
-rw-r--r--tools/test/h5dump/testh5dump.sh.in38
1 files changed, 37 insertions, 1 deletions
diff --git a/tools/test/h5dump/testh5dump.sh.in b/tools/test/h5dump/testh5dump.sh.in
index dc7d999..660d0cb 100644
--- a/tools/test/h5dump/testh5dump.sh.in
+++ b/tools/test/h5dump/testh5dump.sh.in
@@ -941,6 +941,42 @@ GREPTEST()
fi
}
+# Call the h5dump tool and grep for a value but disables plugin filter loading
+# txttype ERRTXT greps test error output, otherwise greps test output
+GREPTEST2()
+{
+ txttype=$1
+ expectdata=$2
+ actual=$TESTDIR/$3
+ actual_err="$TESTDIR/`basename $3 .ddl`.oerr"
+ shift
+ shift
+ shift
+
+ # Run test.
+ TESTING $DUMPER -p $@
+ (
+ cd $TESTDIR
+ $ENVCMD $RUNSERIAL $DUMPER_BIN -p "$@"
+ ) >$actual 2>$actual_err
+ if [ "$txttype" = "ERRTXT" ]; then
+ $GREP "$expectdata" $actual_err > /dev/null
+ else
+ $GREP "$expectdata" $actual > /dev/null
+ fi
+ 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 $@
@@ -1390,7 +1426,7 @@ TOOLTEST4 textlinkfar.ddl --enable-error-stack textlinkfar.h5
TOOLTEST4 textlink.ddl --enable-error-stack textlink.h5
# test for error stack display (BZ2048)
-TOOLTEST5 filter_fail.ddl --enable-error-stack filter_fail.h5
+GREPTEST2 "filter plugins disabled" 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