summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/h5repack.sh.in
diff options
context:
space:
mode:
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