summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2015-04-02 16:13:28 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2015-04-02 16:13:28 (GMT)
commit0f173c15bb3655f04c66deea3bd0502d7dfdecc9 (patch)
tree80c799685341993b79eeffaafacf0de303786abf
parent6986211d6584792ca48cb2469d0e779c445638d2 (diff)
downloadhdf5-0f173c15bb3655f04c66deea3bd0502d7dfdecc9.zip
hdf5-0f173c15bb3655f04c66deea3bd0502d7dfdecc9.tar.gz
hdf5-0f173c15bb3655f04c66deea3bd0502d7dfdecc9.tar.bz2
[svn-r26706] Merge r26702 of trunk to v18 branch.
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.
-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 5f7dafb..d65c4ff 100644
--- a/tools/h5dump/testh5dump.sh.in
+++ b/tools/h5dump/testh5dump.sh.in
@@ -436,8 +436,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"
@@ -463,13 +476,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
@@ -1016,7 +1029,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