summaryrefslogtreecommitdiffstats
path: root/tools/h5dump
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2015-04-01 21:18:18 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2015-04-01 21:18:18 (GMT)
commit33c8035f0e8cd62b0fc4b5100f922426b1b77a8f (patch)
treec07b681fcd50a790345980dc3fd7ec736cd401a0 /tools/h5dump
parent99baa66184cdf358d1e598351008baa22e1ebd37 (diff)
downloadhdf5-33c8035f0e8cd62b0fc4b5100f922426b1b77a8f.zip
hdf5-33c8035f0e8cd62b0fc4b5100f922426b1b77a8f.tar.gz
hdf5-33c8035f0e8cd62b0fc4b5100f922426b1b77a8f.tar.bz2
[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.
Diffstat (limited to 'tools/h5dump')
-rw-r--r--tools/h5dump/testh5dump.sh.in19
1 files changed, 16 insertions, 3 deletions
diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in
index 6944701..2fc09da 100644
--- a/tools/h5dump/testh5dump.sh.in
+++ b/tools/h5dump/testh5dump.sh.in
@@ -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