summaryrefslogtreecommitdiffstats
path: root/tools/h5copy
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2006-08-01 14:31:45 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2006-08-01 14:31:45 (GMT)
commit1be6fb841730862e59678c57e4fcc75661b3d16f (patch)
tree47094992141aa53cd98f5fc097c063e179efadc9 /tools/h5copy
parent400676eea079ad55b77b01e507185cd66c2e9bae (diff)
downloadhdf5-1be6fb841730862e59678c57e4fcc75661b3d16f.zip
hdf5-1be6fb841730862e59678c57e4fcc75661b3d16f.tar.gz
hdf5-1be6fb841730862e59678c57e4fcc75661b3d16f.tar.bz2
[svn-r12522] h5copy was not able to find the source file because it was not using
the $srcdir properly. It is not right to chdir into testfiles and write files there because in real srcdir mode, one should not changes things in the srcdir area which could be shared by multiple builds simultanteously. Solution: added the proper $srcdir components to the source file name. Also clean up the indentation by cb. Tested: only by hand in heping.
Diffstat (limited to 'tools/h5copy')
-rw-r--r--tools/h5copy/testh5copy.sh43
1 files changed, 21 insertions, 22 deletions
diff --git a/tools/h5copy/testh5copy.sh b/tools/h5copy/testh5copy.sh
index 13b7e81..0d7fb7c 100644
--- a/tools/h5copy/testh5copy.sh
+++ b/tools/h5copy/testh5copy.sh
@@ -33,8 +33,8 @@ test -d ../testfiles || mkdir ../testfiles
# 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'
+ SPACES=" "
+ echo "Testing $* $SPACES" |cut -c1-70 |tr -d '\012'
}
# Run a test and print PASS or *FAIL*. If h5copy can complete
@@ -42,32 +42,31 @@ TESTING() {
# the `nerrors' global variable.
TOOLTEST() {
-
- TESTING $H5COPY $@
- (
- echo "#############################"
- echo " output for '$H5COPY $@'"
- echo "#############################"
- cd $srcdir/../testfiles
-# echo " pwd = `pwd`"
- $RUNSERIAL $H5COPY_BIN $@
- ) > output.out
- RET=$?
- if [ $RET != 0 ] ; then
- echo "*FAILED*"
- nerrors="`expr $nerrors + 1`"
- else
- echo " PASSED"
- fi
+ TESTING $H5COPY $@
+ (
+ echo "#############################"
+ echo " output for '$H5COPY $@'"
+ echo "#############################"
+ $RUNSERIAL $H5COPY_BIN $@
+ ) > output.out
+ RET=$?
+ if [ $RET != 0 ] ; then
+ echo "*FAILED*"
+ echo "failed result is:"
+ cat output.out
+ nerrors="`expr $nerrors + 1`"
+ else
+ echo " PASSED"
+ fi
}
##############################################################################
### T H E T E S T S ###
##############################################################################
-#TOOLTEST -v test1.h5/array test1.out.h5/array
-#TOOLTEST -v test1.h5/integer test1.out.h5/integer_copy
-#TOOLTEST -v test1.h5/g1 test1.out.h5/g1
+TOOLTEST -v $srcdir/../testfiles/test1.h5/array test1.out.h5/array
+TOOLTEST -v $srcdir/../testfiles/test1.h5/integer test1.out.h5/integer_copy
+TOOLTEST -v $srcdir/../testfiles/test1.h5/g1 test1.out.h5/g1
if test $nerrors -eq 0 ; then
echo "All h5copy tests passed."