summaryrefslogtreecommitdiffstats
path: root/tools/test/h5dump/testh5dump.sh.in
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2019-12-09 16:30:58 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2019-12-09 16:30:58 (GMT)
commitc8f533cfc33ac743227cbed8eba361c715a2976f (patch)
treebcae5320f80bac774647cacbbd8493604f9384d2 /tools/test/h5dump/testh5dump.sh.in
parentadcf8a315e82c0848d126e7e46b662930c081896 (diff)
downloadhdf5-c8f533cfc33ac743227cbed8eba361c715a2976f.zip
hdf5-c8f533cfc33ac743227cbed8eba361c715a2976f.tar.gz
hdf5-c8f533cfc33ac743227cbed8eba361c715a2976f.tar.bz2
Merge all of my changes from merge-back-to-feature-vfd_swmr-attempt-1,
including the merge of `hdffv/hdf5/develop`, back to the branch that Vailin and I share. Now I need to put this branch on a fork with a less confusing name than vchoi_fork!
Diffstat (limited to 'tools/test/h5dump/testh5dump.sh.in')
-rw-r--r--tools/test/h5dump/testh5dump.sh.in61
1 files changed, 48 insertions, 13 deletions
diff --git a/tools/test/h5dump/testh5dump.sh.in b/tools/test/h5dump/testh5dump.sh.in
index 42e4b07..141715c 100644
--- a/tools/test/h5dump/testh5dump.sh.in
+++ b/tools/test/h5dump/testh5dump.sh.in
@@ -34,13 +34,16 @@ 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'
AWK='awk'
# Skip plugin module to test missing filter
-ENVCMD="env HDF5_PLUGIN_PRELOAD=::"
+# Also reset the VOL connector to only use the native connector, because of the
+# error stack checking. QAK - 2019/03/09
+ENVCMD="env HDF5_PLUGIN_PRELOAD=:: HDF5_VOL_CONNECTOR=native"
WORDS_BIGENDIAN="@WORDS_BIGENDIAN@"
@@ -81,6 +84,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
@@ -490,7 +494,6 @@ TOOLTEST() {
STDOUT_FILTER $actual
cp $actual_err $actual_err_sav
STDERR_FILTER $actual_err
- cat $actual_err >> $actual
if [ ! -f $expect ]; then
# Create the expect file if it doesn't yet exist.
@@ -534,7 +537,6 @@ TOOLTEST2() {
cd $TESTDIR
$RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
- cat $actual_err >> $actual
if [ ! -f $expect ]; then
# Create the expect file if it doesn't yet exist.
@@ -593,7 +595,6 @@ TOOLTEST2A() {
cd $TESTDIR
$RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
- cat $actual_err >> $actual
if [ ! -f $expect ]; then
# Create the expect file if it doesn't yet exist.
@@ -660,7 +661,6 @@ TOOLTEST2B() {
cd $TESTDIR
$RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
- cat $actual_err >> $actual
if [ ! -f $expectdata ]; then
# Create the expect data file if it doesn't yet exist.
@@ -717,7 +717,6 @@ TOOLTEST3() {
-e 's/H5Eget_auto[1-2]*/H5Eget_auto(1 or 2)/' \
-e 's/H5Eset_auto[1-2]*/H5Eset_auto(1 or 2)/' \
$actual_err > $actual_ext
- cat $actual_ext >> $actual
if [ ! -f $expect ]; then
# Create the expect file if it doesn't yet exist.
@@ -759,7 +758,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.
@@ -776,7 +775,6 @@ TOOLTEST4() {
-e 's/H5Eget_auto[1-2]*/H5Eget_auto(1 or 2)/' \
-e 's/H5Eset_auto[1-2]*/H5Eset_auto(1 or 2)/' \
$actual_err > $actual_ext
- #cat $actual_ext >> $actual
if [ ! -f $expect ]; then
# Create the expect file if it doesn't yet exist.
@@ -842,7 +840,6 @@ TOOLTEST5() {
-e 's/H5Eget_auto[1-2]*/H5Eget_auto(1 or 2)/' \
-e 's/H5Eset_auto[1-2]*/H5Eset_auto(1 or 2)/' \
$actual_err > $actual_ext
- #cat $actual_ext >> $actual
if [ ! -f $expect ]; then
# Create the expect file if it doesn't yet exist.
@@ -886,7 +883,6 @@ TOOLTEST_HELP() {
cd $TESTDIR
$RUNSERIAL $DUMPER_BIN "$@"
) >$actual 2>$actual_err
- cat $actual_err >> $actual
if [ ! -f $expectdata ]; then
# Create the expect data file if it doesn't yet exist.
@@ -909,6 +905,42 @@ TOOLTEST_HELP() {
}
+# Call the h5dump tool and grep for a value
+# txttype ERRTXT greps test error output, otherwise greps test output
+GREPTEST()
+{
+ 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 $@
@@ -1111,7 +1143,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
-TOOLTEST4 tarray1_big.ddl --enable-error-stack -R tarray1_big.h5
+GREPTEST ERRTXT "Undefined reference pointer" 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
@@ -1319,9 +1351,9 @@ fi
# test for dataset region references
TOOLTEST tdatareg.ddl --enable-error-stack tdatareg.h5
-TOOLTEST4 tdataregR.ddl --enable-error-stack -R tdatareg.h5
+GREPTEST ERRTXT "Undefined reference pointer" tdataregR.ddl --enable-error-stack -R tdatareg.h5
TOOLTEST tattrreg.ddl --enable-error-stack tattrreg.h5
-TOOLTEST4 tattrregR.ddl --enable-error-stack -R tattrreg.h5
+GREPTEST ERRTXT "Undefined reference pointer" 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
@@ -1369,6 +1401,9 @@ TOOLTEST3 non_existing.ddl --enable-error-stack tgroup.h5 non_existing.h5
# test to verify HDFFV-10333: error similar to H5O_attr_decode in the jira issue
TOOLTEST err_attr_dspace.ddl err_attr_dspace.h5
+# test to verify HDFFV-9407: long double full precision
+GREPTEST OUTTXT "1.123456789012345" t128bit_float.ddl -m %.35Lf t128bit_float.h5
+
# Clean up temporary files/directories
CLEAN_TESTFILES_AND_TESTDIR