diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2019-06-24 20:04:07 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2019-06-24 20:04:07 (GMT) |
commit | ee07744966b28206fb843716194786ad433171b6 (patch) | |
tree | 1467bac79bb20d790f8169e8fd6ef0c8ec7297b4 | |
parent | a03d35dc22a4be89c09d923e439167de697510d0 (diff) | |
download | hdf5-ee07744966b28206fb843716194786ad433171b6.zip hdf5-ee07744966b28206fb843716194786ad433171b6.tar.gz hdf5-ee07744966b28206fb843716194786ad433171b6.tar.bz2 |
HDFFV-9407 add autotools test
-rw-r--r-- | config/cmake/CTestCustom.cmake | 1 | ||||
-rw-r--r-- | tools/test/h5dump/testh5dump.sh.in | 29 |
2 files changed, 30 insertions, 0 deletions
diff --git a/config/cmake/CTestCustom.cmake b/config/cmake/CTestCustom.cmake index 75d73cd..6db0f6f 100644 --- a/config/cmake/CTestCustom.cmake +++ b/config/cmake/CTestCustom.cmake @@ -93,6 +93,7 @@ set (CTEST_CUSTOM_MEMCHECK_IGNORE H5DUMP_PACKED_BITS-clearall-objects H5DUMP-XML-clearall-objects H5DUMP_VDS-clearall-objects + H5DUMP-t128bit_float #uses grepTest.cmake ######### tools/h5format_convert ######### H5FC-clearall-objects ######### tools/h5import ######### diff --git a/tools/test/h5dump/testh5dump.sh.in b/tools/test/h5dump/testh5dump.sh.in index e1c02cf..c4efd8f 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' @@ -83,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 @@ -903,6 +905,30 @@ 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 + + # 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 +} + # Print a "SKIP" message SKIP() { TESTING $DUMPER $@ @@ -1363,6 +1389,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 "1.123456789012345" t128bit_float.ddl -m %.35Lf t128bit_float.h5 + # Clean up temporary files/directories CLEAN_TESTFILES_AND_TESTDIR |