diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2013-03-29 23:58:07 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2013-03-29 23:58:07 (GMT) |
commit | b6e0e867d07faac7edde726bf7ed2a5f01f6cdb6 (patch) | |
tree | a89f756228cc72486ff1e71fbc68fd29baa01ba3 /tools | |
parent | 02b1c11ecd0d06acc26de368846449fbfcfe66fa (diff) | |
parent | 6c974c824db0c4b97a5ec5e03726ebe4a2198ad9 (diff) | |
download | hdf5-b6e0e867d07faac7edde726bf7ed2a5f01f6cdb6.zip hdf5-b6e0e867d07faac7edde726bf7ed2a5f01f6cdb6.tar.gz hdf5-b6e0e867d07faac7edde726bf7ed2a5f01f6cdb6.tar.bz2 |
[svn-r23496] synced DESY branch with the trunk (tested with h5committest)
Diffstat (limited to 'tools')
-rw-r--r-- | tools/h5dump/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tools/h5dump/testh5dump.sh.in | 69 | ||||
-rw-r--r-- | tools/misc/h5cc.in | 14 |
3 files changed, 69 insertions, 15 deletions
diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt index 3f39ae3..bcabdee 100644 --- a/tools/h5dump/CMakeLists.txt +++ b/tools/h5dump/CMakeLists.txt @@ -1656,6 +1656,7 @@ IF (BUILD_TESTING) # test for error stack display (BZ2048) ADD_H5ERR_MASK_TEST (filter_fail 1 --enable-error-stack filter_fail.h5) + SET_TESTS_PROPERTIES (H5DUMP-filter_fail PROPERTIES ENVIRONMENT "HDF5_PLUGIN_PRELOAD=::") # test for -o -y for dataset with attributes ADD_H5_TEST_EXPORT (tall-6 tall.h5 0 --enable-error-stack -d /g1/g1.1/dset1.1.1 -y -o) diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in index 238eee9..ceefc08 100644 --- a/tools/h5dump/testh5dump.sh.in +++ b/tools/h5dump/testh5dump.sh.in @@ -38,6 +38,9 @@ DIRNAME='dirname' LS='ls' AWK='awk' +# Skip plugin module to test missing filter +ENVCMD="env HDF5_PLUGIN_PRELOAD=::" + nerrors=0 verbose=yes @@ -721,6 +724,70 @@ TOOLTEST4() { } +# same as TOOLTEST4 but disables plugin filter loading +# silences extra error output on some platforms +# ADD_H5ERR_MASK_TEST +TOOLTEST5() { + + expect="$TESTDIR/$1" + expect_err="$TESTDIR/`basename $1 .ddl`.err" + actual="$TESTDIR/`basename $1 .ddl`.out" + actual_err="$TESTDIR/`basename $1 .ddl`.oerr" + actual_ext="$TESTDIR/`basename $1 .ddl`.ext" + actual_sav=${actual}-sav + actual_err_sav=${actual_err}-sav + shift + + # Run test. + TESTING $DUMPER $@ + ( + cd $TESTDIR + $ENVCMD $RUNSERIAL $DUMPER_BIN "$@" + ) >$actual 2>$actual_err + + # save actual and actual_err in case they are needed later. + cp $actual $actual_sav + STDOUT_FILTER $actual + cp $actual_err $actual_err_sav + STDERR_FILTER $actual_err + + # Extract file name, line number, version and thread IDs because they may be different + sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ + -e 's/line [0-9]*/line (number)/' \ + -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ + -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ + -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. + echo " CREATED" + cp $actual $expect + elif $CMP $expect $actual; then + if $CMP $expect_err $actual_ext; then + echo " PASSED" + else + echo "*FAILED*" + echo " Expected result (*.err) differs from actual result (*.oerr)" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && $DIFF $expect_err $actual_ext |sed 's/^/ /' + fi + else + echo "*FAILED*" + echo " Expected result (*.ddl) differs from actual result (*.out)" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' + fi + + # Clean up output file + if test -z "$HDF5_NOCLEANUP"; then + rm -f $actual $actual_err $actual_sav $actual_err_sav + fi + +} + # Print a "SKIP" message SKIP() { TESTING $DUMPER $@ @@ -1128,7 +1195,7 @@ TOOLTEST4 textlinkfar.ddl --enable-error-stack textlinkfar.h5 TOOLTEST4 textlink.ddl --enable-error-stack textlink.h5 # test for error stack display (BZ2048) -TOOLTEST4 filter_fail.ddl --enable-error-stack filter_fail.h5 +TOOLTEST5 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 diff --git a/tools/misc/h5cc.in b/tools/misc/h5cc.in index fe11c26..45143e4 100644 --- a/tools/misc/h5cc.in +++ b/tools/misc/h5cc.in @@ -350,20 +350,6 @@ if test "x$do_link" = "xyes"; then if test -n "$flag"; then shared_link="${flag}${libdir}" - # Any libraries in LDFLAGS or H5BLD_LDFLAGS also should have rpaths embedded - # in the executables created by h5cc (reduces need for LD_LIBRARY_PATH). - if test -n "$LDFLAGS"; then - for entry in $LDFLAGS; do - extdir=`echo $entry | sed '/^-L/ s/^-L//'` - shared_link="${shared_link} ${flag}${extdir}" - done - fi - if test -n "$H5BLD_LDFLAGS"; then - for entry in $H5BLD_LDFLAGS; do - extdir=`echo $entry | sed '/^-L/ s/^-L//'` - shared_link="${shared_link} ${flag}${extdir}" - done - fi fi if test "x$USE_SHARED_LIB" != "xyes"; then |