mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-21 01:04:10 +08:00
[svn-r26702] HDFFV-8667: h5repack crashes on enumerated 8-bit type nested in compound type.
Description: The test added failed in some machines because the data file contains infinity values that different machines print them differently as "inf", "INF", "Inf", ... Solution: Added a "ignorecase" option to TOOLTEST() to do caseless matching between generated output vs expected output. This solved most machines problem for now. Tested: h5committest, emu by hand for both development and production modes. But cmake built h5dump failed to read the data file. Using the same source to build h5dump by autotools produced a h5dump that can read the test data file. Don't know why cmake could not produce a correct binary.
This commit is contained in:
parent
99baa66184
commit
33c8035f0e
@ -438,8 +438,21 @@ TESTING() {
|
||||
# the actual output file is calculated by replacing the `.ddl' with
|
||||
# `.out'. The actual output is not removed if $HDF5_NOCLEANUP has a
|
||||
# non-zero value.
|
||||
# If $1 == ignorecase then do caseless CMP and DIFF.
|
||||
# ADD_H5_TEST
|
||||
TOOLTEST() {
|
||||
# check if caseless compare and diff requested
|
||||
if [ "$1" = ignorecase ]; then
|
||||
caseless="-i"
|
||||
# replace cmp with diff which runs much longer.
|
||||
xCMP="$DIFF -i"
|
||||
shift
|
||||
else
|
||||
caseless=""
|
||||
# stick with faster cmp if ignorecase is not requested.
|
||||
xCMP="$CMP"
|
||||
fi
|
||||
|
||||
expect="$TESTDIR/$1"
|
||||
actual="$TESTDIR/`basename $1 .ddl`.out"
|
||||
actual_err="$TESTDIR/`basename $1 .ddl`.err"
|
||||
@ -465,13 +478,13 @@ TOOLTEST() {
|
||||
# Create the expect file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actual $expect
|
||||
elif $CMP $expect $actual; then
|
||||
elif $xCMP $expect $actual > /dev/null 2>&1 ; then
|
||||
echo " PASSED"
|
||||
else
|
||||
echo "*FAILED*"
|
||||
echo " Expected result (*.ddl) differs from actual result (*.out)"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
|
||||
test yes = "$verbose" && $DIFF $caseless $expect $actual |sed 's/^/ /'
|
||||
fi
|
||||
|
||||
# Clean up output file
|
||||
@ -1018,7 +1031,7 @@ TOOLTEST tcomp-4.ddl --enable-error-stack tcompound_complex.h5
|
||||
#test for the nested compound type
|
||||
TOOLTEST tnestcomp-1.ddl --enable-error-stack tnestedcomp.h5
|
||||
TOOLTEST tnestedcmpddt.ddl --enable-error-stack tnestedcmpddt.h5
|
||||
TOOLTEST tcompound_enum.ddl --enable-error-stack tcompound_enum.h5
|
||||
TOOLTEST ignorecase tcompound_enum.ddl --enable-error-stack tcompound_enum.h5
|
||||
|
||||
# test for options
|
||||
TOOLTEST4 tall-1.ddl --enable-error-stack tall.h5
|
||||
|
Loading…
Reference in New Issue
Block a user