summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2019-10-09 04:26:03 (GMT)
committerLarry Knox <lrknox@hdfgroup.org>2019-10-09 04:26:03 (GMT)
commit21d69ca15f004063c8784efeab84ebb1eb3e8033 (patch)
tree161a4e0f712921a55e1e9cc606da2912fe5f6b40 /tools
parent1cac341502d8acb296f41db38d31b7eb8021ffdb (diff)
downloadhdf5-21d69ca15f004063c8784efeab84ebb1eb3e8033.zip
hdf5-21d69ca15f004063c8784efeab84ebb1eb3e8033.tar.gz
hdf5-21d69ca15f004063c8784efeab84ebb1eb3e8033.tar.bz2
Fix errors in testh5dump.sh tests that grep for reference error messages.
Diffstat (limited to 'tools')
-rw-r--r--tools/test/h5dump/testh5dump.sh.in36
1 files changed, 33 insertions, 3 deletions
diff --git a/tools/test/h5dump/testh5dump.sh.in b/tools/test/h5dump/testh5dump.sh.in
index 8b6118e..c9f71a9 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 $@
@@ -1137,7 +1167,7 @@ TOOLTEST tvlenstr_array.ddl --enable-error-stack tvlenstr_array.h5
# test for files with array data
TOOLTEST tarray1.ddl --enable-error-stack tarray1.h5
# # added for bug# 2092 - tarray1_big.h
-GREPTEST "Undefined reference pointer" tarray1_big.ddl --enable-error-stack -R tarray1_big.h5
+GREPERRTEST "unable to get object address" tarray1_big.ddl --enable-error-stack -R tarray1_big.h5
TOOLTEST tarray2.ddl --enable-error-stack tarray2.h5
TOOLTEST tarray3.ddl --enable-error-stack tarray3.h5
TOOLTEST tarray4.ddl --enable-error-stack tarray4.h5
@@ -1345,9 +1375,9 @@ fi
# test for dataset region references
TOOLTEST tdatareg.ddl --enable-error-stack tdatareg.h5
-GREPTEST "Undefined reference pointer" tdataregR.ddl --enable-error-stack -R tdatareg.h5
+GREPERRTEST "unable to get object address" tdataregR.ddl --enable-error-stack -R tdatareg.h5
TOOLTEST tattrreg.ddl --enable-error-stack tattrreg.h5
-GREPTEST "Undefined reference pointer" tattrregR.ddl --enable-error-stack -R tattrreg.h5
+GREPERRTEST "unable to get object address" tattrregR.ddl --enable-error-stack -R tattrreg.h5
TOOLTEST2 tbinregR.exp --enable-error-stack -d /Dataset1 -s 0 -R -y -o tbinregR.txt tdatareg.h5
# Clean up text output files