summaryrefslogtreecommitdiffstats
path: root/tools/h5copy/testh5copy.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/h5copy/testh5copy.sh')
-rw-r--r--tools/h5copy/testh5copy.sh22
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 "/" "/"