summaryrefslogtreecommitdiffstats
path: root/tools/test/h5dump/testh5dump.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'tools/test/h5dump/testh5dump.sh.in')
-rw-r--r--tools/test/h5dump/testh5dump.sh.in37
1 files changed, 36 insertions, 1 deletions
diff --git a/tools/test/h5dump/testh5dump.sh.in b/tools/test/h5dump/testh5dump.sh.in
index 9b1543c..507556f 100644
--- a/tools/test/h5dump/testh5dump.sh.in
+++ b/tools/test/h5dump/testh5dump.sh.in
@@ -34,6 +34,7 @@ H5IMPORT_BIN=`pwd`/$H5IMPORT # The path of the h5import tool binary
RM='rm -rf'
CMP='cmp'
DIFF='diff -c'
+GREP='grep'
CP='cp'
DIRNAME='dirname'
LS='ls'
@@ -81,6 +82,7 @@ $SRC_H5DUMP_TESTFILES/charsets.h5
$SRC_H5DUMP_TESTFILES/file_space.h5
$SRC_H5DUMP_TESTFILES/filter_fail.h5
$SRC_H5DUMP_TESTFILES/packedbits.h5
+$SRC_H5DUMP_TESTFILES/t128bit_float.h5
$SRC_H5DUMP_TESTFILES/taindices.h5
$SRC_H5DUMP_TESTFILES/tall.h5
$SRC_H5DUMP_TESTFILES/tarray1.h5
@@ -752,7 +754,7 @@ TOOLTEST4() {
TESTING $DUMPER $@
(
cd $TESTDIR
- $RUNSERIAL $DUMPER_BIN "$@"
+ $ENVCMD $RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
# save actual and actual_err in case they are needed later.
@@ -899,6 +901,36 @@ TOOLTEST_HELP() {
}
+# Call the h5dump tool and grep for a value
+#
+GREPTEST()
+{
+ 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 > /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 $@
@@ -1356,6 +1388,9 @@ TOOLTEST2 tall-6.exp --enable-error-stack -y -o tall-6.txt -d /g1/g1.1/dset1.1.1
# test for non-existing file
TOOLTEST3 non_existing.ddl --enable-error-stack tgroup.h5 non_existing.h5
+# test to verify HDFFV-9407: long double full precision
+GREPTEST "1.123456789012345" t128bit_float.ddl -m %.35Lf t128bit_float.h5
+
# Clean up temporary files/directories
CLEAN_TESTFILES_AND_TESTDIR