From 0c40ae2d42f935dcc2d8eed01a4c0e877417ef90 Mon Sep 17 00:00:00 2001 From: Pedro Vicente Nunes Date: Wed, 21 May 2008 09:53:53 -0500 Subject: [PATCH] [svn-r15052] Add a test for the 1.6.7 -i infile -o outifle for backward compability Used the function TOOLTEST from 1.6.7 Tested: linux --- tools/h5repack/h5repack.sh.in | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/tools/h5repack/h5repack.sh.in b/tools/h5repack/h5repack.sh.in index 6aeb4fb0d9..77be575a78 100755 --- a/tools/h5repack/h5repack.sh.in +++ b/tools/h5repack/h5repack.sh.in @@ -137,6 +137,34 @@ TOOLTEST() rm -f $outfile } +TOOLTEST0() +{ + # Run test. + # Tflops interprets "$@" as "" when no parameter is given (e.g., the + # case of missing file name). Changed it to use $@ till Tflops fixes it. + TESTING $H5REPACK $@ + + infile=$srcdir/../testfiles/$1 + path=`pwd` + outfile=$path/out.$1 + shift + if [ "`uname -s`" = "TFLOPS O/S" ]; then + $RUNSERIAL $H5REPACK_BIN -i $infile -o $outfile $@ + else + $RUNSERIAL $H5REPACK_BIN -i $infile -o $outfile "$@" + fi + + RET=$? + if [ $RET != 0 ] ; then + echo "*FAILED*" + nerrors="`expr $nerrors + 1`" + else + echo " PASSED" + DIFFTEST $infile $outfile + fi + rm -f $outfile +} + # # The tests # We use the files generated by h5repacktst @@ -453,6 +481,15 @@ else TOOLTEST $arg fi +# syntax of -i infile -o outfile +# latest file format with short switches. use FILE4=h5repack_layout.h5 (no filters) +arg="$FILE4 -l CHUNK=20x10 -f GZIP=1 -m 10 -n -L -c 8 -d 6 -s 8[:dtype]" +if test $USE_FILTER_DEFLATE != "yes" ; then + SKIP $arg +else + TOOLTEST0 $arg +fi + if test $nerrors -eq 0 ; then echo "All $H5REPACK tests passed."