summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/h5repack.sh.in
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2006-11-15 19:56:44 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2006-11-15 19:56:44 (GMT)
commit8f74e81758f53e46a2898616c1c438c99aaac15b (patch)
tree3a1a524e78357f06cd8abf481b3334b6a6bae605 /tools/h5repack/h5repack.sh.in
parenta44ab9133a917152680938707d893888d6a97c02 (diff)
downloadhdf5-8f74e81758f53e46a2898616c1c438c99aaac15b.zip
hdf5-8f74e81758f53e46a2898616c1c438c99aaac15b.tar.gz
hdf5-8f74e81758f53e46a2898616c1c438c99aaac15b.tar.bz2
[svn-r12917]
h5repack revision: 1. added a new test due to the introduction of H5Ocopy in the copy of objects (compressed dataset with references, that still must go a second sweep of the file to be regenerated). 2. Moved all the source files from the h5repack test program to a new file h5repacktst.c and removed the old ones (testh5repack*.c). 3. Renamed the binary files from test*.h5 to h5repack*.h5 for easy reference. 4. Modified the shell script to use variables for file names instead of hard coded names
Diffstat (limited to 'tools/h5repack/h5repack.sh.in')
-rwxr-xr-xtools/h5repack/h5repack.sh.in123
1 files changed, 72 insertions, 51 deletions
diff --git a/tools/h5repack/h5repack.sh.in b/tools/h5repack/h5repack.sh.in
index ca0fa2e..a29fc80 100755
--- a/tools/h5repack/h5repack.sh.in
+++ b/tools/h5repack/h5repack.sh.in
@@ -13,6 +13,11 @@
# access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu.
#
# Tests for the h5repack tool
+#
+# Modification:
+# Pedro Vicente Nunes, 11/15/2006
+# Added $FILEN variables for file names
+#
USE_FILTER_SZIP="@USE_FILTER_SZIP@"
USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@"
@@ -33,6 +38,21 @@ H5DETECTSZIP_BIN=`pwd`/$H5DETECTSZIP # The path of the tool binary
INFO_FILE=../testfiles/info.h5repack
+FILE0=h5repack_fill.h5
+FILE1=h5repack_objs.h5
+FILE2=h5repack_attr.h5
+FILE3=h5repack_hlink.h5
+FILE4=h5repack_layout.h5
+FILE5=h5repack_early.h5
+FILE7=h5repack_szip.h5
+FILE8=h5repack_deflate.h5
+FILE9=h5repack_shuffle.h5
+FILE10=h5repack_fletcher.h5
+FILE11=h5repack_filters.h5
+FILE12=h5repack_nbit.h5
+FILE13=h5repack_soffset.h5
+
+
nerrors=0
verbose=yes
@@ -137,17 +157,18 @@ USE_FILTER_SZIP_ENCODER=`$RUNSERIAL $H5DETECTSZIP_BIN`
fi
# copy files (these files have no filters)
-TOOLTEST test0.h5
-TOOLTEST test1.h5
-TOOLTEST test2.h5
-TOOLTEST test3.h5
-TOOLTEST test4.h5
-TOOLTEST test5.h5
+TOOLTEST $FILE0
+TOOLTEST $FILE1
+TOOLTEST $FILE2
+TOOLTEST $FILE3
+TOOLTEST $FILE4
+TOOLTEST $FILE5
+
-# use test4.h5 to write some filters (this file has no filters)
+# use $FILE4 to write some filters (this file has no filters)
# gzip with individual object
-arg="test4.h5 -f dset1:GZIP=1 -l dset1:CHUNK=20x10"
+arg="$FILE4 -f dset1:GZIP=1 -l dset1:CHUNK=20x10"
if test $USE_FILTER_DEFLATE != "yes" ; then
SKIP $arg
else
@@ -155,7 +176,7 @@ else
fi
# gzip for all
-arg="test4.h5 -f GZIP=1"
+arg="$FILE4 -f GZIP=1"
if test $USE_FILTER_DEFLATE != "yes" ; then
SKIP $arg
else
@@ -163,7 +184,7 @@ else
fi
# szip with individual object
-arg="test4.h5 -f dset2:SZIP=8,EC -l dset2:CHUNK=20x10"
+arg="$FILE4 -f dset2:SZIP=8,EC -l dset2:CHUNK=20x10"
if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" ; then
SKIP $arg
else
@@ -171,7 +192,7 @@ else
fi
# szip for all
-arg="test4.h5 -f SZIP=8,NN"
+arg="$FILE4 -f SZIP=8,NN"
if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" ; then
SKIP $arg
else
@@ -179,7 +200,7 @@ else
fi
# shuffle with individual object
-arg="test4.h5 -f dset2:SHUF -l dset2:CHUNK=20x10"
+arg="$FILE4 -f dset2:SHUF -l dset2:CHUNK=20x10"
if test $USE_FILTER_SHUFFLE != "yes" ; then
SKIP $arg
else
@@ -188,7 +209,7 @@ fi
# shuffle for all
-arg="test4.h5 -f SHUF"
+arg="$FILE4 -f SHUF"
if test $USE_FILTER_SHUFFLE != "yes" ; then
SKIP $arg
else
@@ -196,7 +217,7 @@ else
fi
# fletcher32 with individual object
-arg="test4.h5 -f dset2:FLET -l dset2:CHUNK=20x10"
+arg="$FILE4 -f dset2:FLET -l dset2:CHUNK=20x10"
if test $USE_FILTER_FLETCHER32 != "yes" ; then
SKIP $arg
else
@@ -204,7 +225,7 @@ else
fi
# fletcher32 for all
-arg="test4.h5 -f FLET"
+arg="$FILE4 -f FLET"
if test $USE_FILTER_FLETCHER32 != "yes" ; then
SKIP $arg
else
@@ -212,7 +233,7 @@ else
fi
# all filters
-arg="test4.h5 -f dset2:SHUF -f dset2:FLET -f dset2:SZIP=8,NN -f dset2:GZIP=1 -l dset2:CHUNK=20x10"
+arg="$FILE4 -f dset2:SHUF -f dset2:FLET -f dset2:SZIP=8,NN -f dset2:GZIP=1 -l dset2:CHUNK=20x10"
if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" -o $USE_FILTER_SHUFFLE != "yes" -o $USE_FILTER_FLETCHER32 != "yes" -o $USE_FILTER_DEFLATE != "yes" ; then
SKIP $arg
else
@@ -224,7 +245,7 @@ fi
###########################################################
# szip copy
-arg="test_szip.h5"
+arg="$FILE7"
if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" ; then
SKIP $arg
else
@@ -232,7 +253,7 @@ else
fi
# szip remove
-arg="test_szip.h5 -f dset_szip:NONE"
+arg="$FILE7 -f dset_szip:NONE"
if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" ; then
SKIP $arg
else
@@ -240,7 +261,7 @@ else
fi
# deflate copy
-arg="test_deflate.h5"
+arg="$FILE8"
if test $USE_FILTER_DEFLATE != "yes" ; then
SKIP $arg
else
@@ -248,7 +269,7 @@ else
fi
# deflate remove
-arg="test_deflate.h5 -f dset_deflate:NONE"
+arg="$FILE8 -f dset_deflate:NONE"
if test $USE_FILTER_DEFLATE != "yes" ; then
SKIP $arg
else
@@ -256,7 +277,7 @@ else
fi
# shuffle copy
-arg="test_shuffle.h5"
+arg="$FILE9"
if test $USE_FILTER_SHUFFLE != "yes" ; then
SKIP $arg
else
@@ -264,7 +285,7 @@ else
fi
# shuffle remove
-arg="test_shuffle.h5 -f dset_shuffle:NONE"
+arg="$FILE9 -f dset_shuffle:NONE"
if test $USE_FILTER_SHUFFLE != "yes" ; then
SKIP $arg
else
@@ -272,7 +293,7 @@ else
fi
# fletcher32 copy
-arg="test_fletcher32.h5"
+arg="$FILE10"
if test $USE_FILTER_FLETCHER32 != "yes" ; then
SKIP $arg
else
@@ -280,7 +301,7 @@ else
fi
# fletcher32 remove
-arg="test_fletcher32.h5 -f dset_fletcher32:NONE"
+arg="$FILE10 -f dset_fletcher32:NONE"
if test $USE_FILTER_FLETCHER32 != "yes" ; then
SKIP $arg
else
@@ -288,7 +309,7 @@ else
fi
# nbit copy
-arg="test_nbit.h5"
+arg="$FILE12"
if test $USE_FILTER_NBIT != "yes" ; then
SKIP $arg
else
@@ -296,7 +317,7 @@ else
fi
# nbit remove
-arg="test_nbit.h5 -f dset_nbit:NONE"
+arg="$FILE12 -f dset_nbit:NONE"
if test $USE_FILTER_NBIT != "yes" ; then
SKIP $arg
else
@@ -304,7 +325,7 @@ else
fi
# nbit add
-arg="test_nbit.h5 -f dset_int31:NBIT"
+arg="$FILE12 -f dset_int31:NBIT"
if test $USE_FILTER_NBIT != "yes" ; then
SKIP $arg
else
@@ -312,7 +333,7 @@ else
fi
# scaleoffset copy
-arg="test_scaleoffset.h5"
+arg="$FILE13"
if test $USE_FILTER_SCALEOFFSET != "yes" ; then
SKIP $arg
else
@@ -320,7 +341,7 @@ else
fi
# scaleoffset add
-arg="test_scaleoffset.h5 -f dset_none:SOFF=31,IN"
+arg="$FILE13 -f dset_none:SOFF=31,IN"
if test $USE_FILTER_SCALEOFFSET != "yes" ; then
SKIP $arg
else
@@ -328,7 +349,7 @@ else
fi
# scaleoffset remove
-arg="test_scaleoffset.h5 -f dset_scaleoffset:NONE"
+arg="$FILE13 -f dset_scaleoffset:NONE"
if test $USE_FILTER_SCALEOFFSET != "yes" ; then
SKIP $arg
else
@@ -336,7 +357,7 @@ else
fi
# remove all filters
-arg="test_all.h5 -f NONE"
+arg="$FILE11 -f NONE"
if test $USE_FILTER_FLETCHER32 != "yes" -o $USE_FILTER_DEFLATE != "yes" -o $USE_FILTER_SZIP != "yes" -o $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SHUFFLE != "yes" -o $USE_FILTER_NBIT != "yes" -o $USE_FILTER_SCALEOFFSET != "yes" ; then
SKIP $arg
else
@@ -345,14 +366,14 @@ fi
#filter conversions
-arg="test_deflate.h5 -f dset_deflate:SZIP=8,NN"
+arg="$FILE8 -f dset_deflate:SZIP=8,NN"
if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" -o $USE_FILTER_DEFLATE != "yes" ; then
SKIP $arg
else
TOOLTEST $arg
fi
-arg="test_szip.h5 -f dset_szip:GZIP=1"
+arg="$FILE7 -f dset_szip:GZIP=1"
if test $USE_FILTER_SZIP != "yes" -o $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_DEFLATE != "yes" ; then
SKIP $arg
else
@@ -361,7 +382,7 @@ fi
#limit
-arg="test4.h5 -f GZIP=1 -m 1024"
+arg="$FILE4 -f GZIP=1 -m 1024"
if test $USE_FILTER_DEFLATE != "yes" ; then
SKIP $arg
else
@@ -369,7 +390,7 @@ else
fi
#file
-arg="test4.h5 -e $INFO_FILE"
+arg="$FILE4 -e $INFO_FILE"
if test $USE_FILTER_DEFLATE != "yes" ; then
SKIP $arg
else
@@ -381,27 +402,27 @@ fi
# layout options (these files have no filters)
#########################################################
-TOOLTEST test4.h5 -l dset2:CHUNK=20x10
-TOOLTEST test4.h5 -l CHUNK=20x10
-TOOLTEST test4.h5 -l dset2:CONTI
-TOOLTEST test4.h5 -l CONTI
-TOOLTEST test4.h5 -l dset2:COMPA
-TOOLTEST test4.h5 -l COMPA
+TOOLTEST $FILE4 -l dset2:CHUNK=20x10
+TOOLTEST $FILE4 -l CHUNK=20x10
+TOOLTEST $FILE4 -l dset2:CONTI
+TOOLTEST $FILE4 -l CONTI
+TOOLTEST $FILE4 -l dset2:COMPA
+TOOLTEST $FILE4 -l COMPA
################################################################
# layout conversions (file has no filters)
###############################################################
-arg1="test4.h5 -l dset_compact:CONTI"
-arg2="test4.h5 -l dset_compact:CHUNK=2x5"
-arg3="test4.h5 -l dset_compact:COMPA"
-arg4="test4.h5 -l dset_contiguous:COMPA"
-arg5="test4.h5 -l dset_contiguous:CHUNK=3x6"
-arg6="test4.h5 -l dset_contiguous:CONTI"
-arg7="test4.h5 -l dset_chunk:COMPA"
-arg8="test4.h5 -l dset_chunk:CONTI"
-arg9="test4.h5 -l dset_chunk:CHUNK=18x13"
+arg1="$FILE4 -l dset_compact:CONTI"
+arg2="$FILE4 -l dset_compact:CHUNK=2x5"
+arg3="$FILE4 -l dset_compact:COMPA"
+arg4="$FILE4 -l dset_contiguous:COMPA"
+arg5="$FILE4 -l dset_contiguous:CHUNK=3x6"
+arg6="$FILE4 -l dset_contiguous:CONTI"
+arg7="$FILE4 -l dset_chunk:COMPA"
+arg8="$FILE4 -l dset_chunk:CONTI"
+arg9="$FILE4 -l dset_chunk:CHUNK=18x13"
TOOLTEST $arg1
TOOLTEST $arg2
TOOLTEST $arg3
@@ -413,7 +434,7 @@ TOOLTEST $arg8
TOOLTEST $arg9
#native option
-arg="test1.h5 -n"
+arg="$FILE1 -n"
TOOLTEST $arg