diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2012-04-06 02:57:06 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2012-04-06 02:57:06 (GMT) |
commit | d5a62239587f7cc5de301fa5c6b0919807689818 (patch) | |
tree | 40a36d60dd8ac2d10a45886869cc53d3fdc9181e /tools/h5repack/h5repack.sh.in | |
parent | ebf3d99b955c705217227fb7f8ae4405e941399a (diff) | |
download | hdf5-d5a62239587f7cc5de301fa5c6b0919807689818.zip hdf5-d5a62239587f7cc5de301fa5c6b0919807689818.tar.gz hdf5-d5a62239587f7cc5de301fa5c6b0919807689818.tar.bz2 |
[svn-r22254] Description:
Bring r22085:22251 from trunk to revise_chunks branch.
Also tackle some testing issues in test/objcopy.c test and clean up
some warnings.
Tested on:
FreeBSD/32 8.2 (loyalty) w/gcc4.6, w/C++ & FORTRAN, in debug mode
FreeBSD/64 8.2 (freedom) w/gcc4.6, w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (koala) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, w/threadsafe, in production mode
Linux/PPC 2.6 (ostrich) w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-ia64 2.6 (ember) w/Intel compilers, w/paralle, C++ & FORTRAN,
in production mode
Mac OS X/32 10.7.3 (amazon) in debug mode
Mac OS X/32 10.7.3 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
Mac OS X/32 10.7.3 (amazon) w/parallel, in debug mode
Diffstat (limited to 'tools/h5repack/h5repack.sh.in')
-rw-r--r--[-rwxr-xr-x] | tools/h5repack/h5repack.sh.in | 61 |
1 files changed, 56 insertions, 5 deletions
diff --git a/tools/h5repack/h5repack.sh.in b/tools/h5repack/h5repack.sh.in index c1cbba1..236c555 100755..100644 --- a/tools/h5repack/h5repack.sh.in +++ b/tools/h5repack/h5repack.sh.in @@ -147,20 +147,25 @@ COPY_TESTFILES_TO_TESTDIR() done } +# Print a $* message left justified in a field of 70 characters +# +MESSAGE() { + SPACES=" " + echo "$* $SPACES" | cut -c1-70 | tr -d '\012' +} + # Print a line-line message left justified in a field of 70 characters # beginning with the word "Testing". # TESTING() { - SPACES=" " - echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' + MESSAGE "Testing $*" } # Print a line-line message left justified in a field of 70 characters # beginning with the word "Verifying". # VERIFY() { - SPACES=" " - echo "Verifying h5diff output $* $SPACES" | cut -c1-70 | tr -d '\012' + MESSAGE "Verifying h5diff output $*" } # Print a message that a test has been skipped (because a required filter @@ -385,6 +390,49 @@ TOOLTESTV() rm -f $actual $actual_err $actual_sav } +# TOOLTEST_META: +# Test metadata block size option. +# Reason to create a function here is to localize all special steps related to +# metadata block size option in one place. This is a quick solution. More +# thought out solution needed when there is more time. +# +# $1: test input file +# $2:$: metadata options (either "-M size" or "--metadata_block_size=size") +# +# Algorithm: +# Run it once without the metadata option ($2-$); +# Save the result output file; +# Run it second time with the metadata option; +# Verify the output file of second run is larger than the one of 1st run. +TOOLTEST_META() +{ + input_file=$1 + outfile="$TESTDIR/out.$1" + + # Use TOOLTEST_MAIN to run because it does not remove the output file. + # 1st run, without metadata option + TOOLTEST_MAIN $1 + # get the size of the first output file + size1=`wc -c $outfile | cut -d' ' -f1` + + # 2nd run with metadata option + TOOLTEST_MAIN $* + # get the size of the second output file + size2=`wc -c $outfile | cut -d' ' -f1` + + # verify sizes. + MESSAGE "Verify the sizes of both output files ($size1 vs $size2)" + if [ $size1 -lt $size2 ]; then + # pass + echo " PASSED" + else + #fail + echo "*FAILED*" + fi + + rm -f $outfile +} + # This is different from $srcdir/../../bin/output_filter.sh STDOUT_FILTER() { result_file=$1 @@ -801,7 +849,6 @@ TOOLTEST h5repack_refs.h5 # the references in attribute of compund or vlen datatype TOOLTEST h5repack_attr_refs.h5 - # Add test for memory leak in attirbute. This test is verified by CTEST. # 1. leak from vlen string # 2. leak from compound type without reference member @@ -809,6 +856,10 @@ TOOLTEST h5repack_attr_refs.h5 # Note: this test is experimental for sharing test file among tools TOOLTEST h5diff_attr1.h5 +# tests for metadata block size option ('-M') +TOOLTEST_META h5repack_layout.h5 -M 8192 +TOOLTEST_META h5repack_layout.h5 --metadata_block_size=8192 + if test $nerrors -eq 0 ; then echo "All $TESTNAME tests passed." exit $EXIT_SUCCESS |