diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-02-14 14:44:42 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-02-14 14:44:42 (GMT) |
commit | 847f01442b20cbe7132a1533e493e06975b48bdc (patch) | |
tree | c3939e0da50f811dc126d719ac6aa17e7103e590 /tools/h5copy/testh5copy.sh | |
parent | bb392083b2a81aa942678e06a537a3c0ab5c08aa (diff) | |
download | hdf5-847f01442b20cbe7132a1533e493e06975b48bdc.zip hdf5-847f01442b20cbe7132a1533e493e06975b48bdc.tar.gz hdf5-847f01442b20cbe7132a1533e493e06975b48bdc.tar.bz2 |
[svn-r13299] Description:
Put paths to testfile input & output directories in one place, making it
easier to modify them if we choose to re-arrange our testfile locations in
the future (this should probably be carried over to other test scripts).
Make h5copy exit more cleanly if no command line parameters are given.
Tested on:
Linux/32 2.6 (chicago)
Linux/64 2.6 (chicago2)
Diffstat (limited to 'tools/h5copy/testh5copy.sh')
-rw-r--r-- | tools/h5copy/testh5copy.sh | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/tools/h5copy/testh5copy.sh b/tools/h5copy/testh5copy.sh index 4106fe0..b8fbb79 100644 --- a/tools/h5copy/testh5copy.sh +++ b/tools/h5copy/testh5copy.sh @@ -31,6 +31,8 @@ nerrors=0 verbose=yes SRCFILE=h5copytst.h5 +INDIR=$srcdir/../testfiles +OUTDIR=../testfiles CMP='cmp -s' DIFF='diff -c' @@ -38,7 +40,7 @@ DIFF='diff -c' if test -z "$srcdir"; then srcdir=. fi -test -d ../testfiles || mkdir ../testfiles +test -d $OUTDIR || mkdir $OUTDIR # Print a line-line message left justified in a field of 70 characters # beginning with the word "Testing". @@ -135,8 +137,8 @@ H5DIFFTEST() # H5LSTEST() { - expect="$srcdir/../testfiles/`basename $1 .h5`.ls" - actual="../testfiles/`basename $1 .h5`.out" + expect="$INDIR/`basename $1 .h5`.ls" + actual="$OUTDIR/`basename $1 .h5`.out" # Stderr is included in stdout so that the diff can detect # any unexpected output from that stream too. @@ -172,8 +174,8 @@ H5LSTEST() # $3 is group within destination file COPYOBJECTS() { - TESTFILE=$srcdir/../testfiles/$SRCFILE - FILEOUT="../testfiles/`basename $SRCFILE .h5`.$1.out.h5" + TESTFILE="$INDIR/$SRCFILE" + FILEOUT="$OUTDIR/`basename $SRCFILE .h5`.$1.out.h5" # Remove any output file left over from previous test run rm -f $FILEOUT @@ -202,7 +204,7 @@ COPYOBJECTS() # Remove output file created, if the "no cleanup" environment variable is # not defined - if [ x$HDF5_NOCLEANUP = "x" ]; then + if test -z "$HDF5_NOCLEANUP"; then rm -f $FILEOUT fi } @@ -211,12 +213,12 @@ COPYOBJECTS() ### T H E T E S T S ### ############################################################################## -# Copy objects from root group of source file to root of destination file -# (with implicit root group paths) +echo "Copy objects from root group of source file to root of destination file" +echo "(with implicit root group paths)" COPYOBJECTS a "" "" -# Copy objects from root group of source file to root of destination file -# (with explicit root group paths) +echo "Copy objects from root group of source file to root of destination file" +echo "(with explicit root group paths)" COPYOBJECTS b "/" "/" |