summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/h5repack.sh.in
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2013-08-21 22:11:32 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2013-08-21 22:11:32 (GMT)
commit13a0f5576acfcce93c7b8344f3dd34e8e562e71a (patch)
tree4bbebf0fa6bc3be933e1a750975ffc67ec967e94 /tools/h5repack/h5repack.sh.in
parent8c14af82c61f50146a6c5646c2320a08d09dc32d (diff)
downloadhdf5-13a0f5576acfcce93c7b8344f3dd34e8e562e71a.zip
hdf5-13a0f5576acfcce93c7b8344f3dd34e8e562e71a.tar.gz
hdf5-13a0f5576acfcce93c7b8344f3dd34e8e562e71a.tar.bz2
[svn-r24053] HDFFV-8498: --minimum option was disabled by HDFFV-8214. Reverted code change and changed default to 0 from 1024. Changed limit test to use h5dump to compare repacked file instead of h5diff.
Corrected test scripts for test folder path Tested: h5committest and local linux with CMake
Diffstat (limited to 'tools/h5repack/h5repack.sh.in')
-rw-r--r--tools/h5repack/h5repack.sh.in53
1 files changed, 51 insertions, 2 deletions
diff --git a/tools/h5repack/h5repack.sh.in b/tools/h5repack/h5repack.sh.in
index ca25183..42b8ecb 100644
--- a/tools/h5repack/h5repack.sh.in
+++ b/tools/h5repack/h5repack.sh.in
@@ -120,6 +120,7 @@ LIST_OTHER_TEST_FILES="
$SRC_H5REPACK_TESTFILES/h5repack_ext.bin
$SRC_H5REPACK_TESTFILES/ublock.bin
$SRC_H5REPACK_TESTFILES/h5repack.info
+$SRC_H5REPACK_TESTFILES/h5repack_layout.h5.ddl
$SRC_TOOLS_TESTFILES/h5repack_filters.h5.ddl
"
@@ -201,7 +202,7 @@ DIFFTEST()
fi
}
-
+
# Call h5repack
#
@@ -475,6 +476,54 @@ TOOLTESTV()
rm -f $actual $actual_err
rm -f $outfile
}
+
+# This is same as TOOLTESTV() with comparing h5dump output
+# from -pH option
+#
+TOOLTEST_DUMP()
+{
+ infile=$TESTDIR/$2
+ outfile=$TESTDIR/out-$1.$2
+ expect="$TESTDIR/$2.ddl"
+ actual="$TESTDIR/out-$1.$2.out"
+ actual_err="$TESTDIR/out-$1.$2.err"
+
+ shift
+ shift
+
+ # Run test.
+ TESTING $H5REPACK $@
+ (
+ $RUNSERIAL $H5REPACK_BIN "$@" $infile $outfile
+ ) >$actual 2>$actual_err
+ RET=$?
+ if [ $RET != 0 ] ; then
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ else
+ echo " PASSED"
+ VERIFY h5dump output $@
+ (
+ $RUNSERIAL $H5DUMP_BIN -pH $outfile
+ ) >$actual 2>$actual_err
+ cat $actual_err >> $actual
+
+ RET=$?
+
+ fi
+
+ if cmp -s $expect $actual; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && diff -c $expect $actual |sed 's/^/ /'
+ fi
+
+ rm -f $actual $actual_err
+ rm -f $outfile
+}
# TOOLTEST_META:
# Test metadata block size option.
@@ -820,7 +869,7 @@ arg="h5repack_layout.h5 -f GZIP=1 -m 1024"
if test $USE_FILTER_DEFLATE != "yes" ; then
SKIP $arg
else
- TOOLTEST deflate_limit $arg
+ TOOLTEST_DUMP deflate_limit $arg
fi
#file