mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-18 15:15:56 +08:00
[svn-r23447] Add new env var to prevent filter plugin loading
Tested: jam
This commit is contained in:
parent
01765e3079
commit
dabebe412f
@ -523,6 +523,7 @@ ADD_TEST (NAME error_test COMMAND "${CMAKE_COMMAND}"
|
||||
-P "${HDF5_RESOURCES_DIR}/runTest.cmake"
|
||||
)
|
||||
SET_TESTS_PROPERTIES(error_test PROPERTIES DEPENDS h5test-clear-error_test-objects)
|
||||
SET_TESTS_PROPERTIES (error_test PROPERTIES ENVIRONMENT "HDF5_PLUGIN_PRELOAD=::")
|
||||
|
||||
#-- Adding test for links_env
|
||||
ADD_EXECUTABLE (links_env ${HDF5_TEST_SOURCE_DIR}/links_env.c)
|
||||
|
@ -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)
|
||||
|
@ -674,6 +674,70 @@ TOOLTEST4() {
|
||||
actual_err_sav=${actual_err}-sav
|
||||
shift
|
||||
|
||||
# Run test.
|
||||
TESTING $DUMPER $@
|
||||
(
|
||||
cd $TESTDIR
|
||||
$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
|
||||
|
||||
}
|
||||
|
||||
# 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 $@
|
||||
(
|
||||
@ -1131,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
|
||||
|
Loading…
Reference in New Issue
Block a user