summaryrefslogtreecommitdiffstats
path: root/tools/h5copy
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2012-08-06 19:42:49 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2012-08-06 19:42:49 (GMT)
commitcd3f42096b9a957e37c9df48aa0d31d9ed4bc537 (patch)
tree86a1672d114762d3aea872e44104e65d1bc09254 /tools/h5copy
parent434643dd4d14a841abdcc73ad7b3a0a8e06e4438 (diff)
downloadhdf5-cd3f42096b9a957e37c9df48aa0d31d9ed4bc537.zip
hdf5-cd3f42096b9a957e37c9df48aa0d31d9ed4bc537.tar.gz
hdf5-cd3f42096b9a957e37c9df48aa0d31d9ed4bc537.tar.bz2
[svn-r22636] Description:
Bring r22599:22634 from trunk to revise_chunks branch Tested on: Mac OSX/64 10.7.4 (amazon) w/gcc 4.7.x, C++ & FORTRAN (No need for h5committest yet on this branch)
Diffstat (limited to 'tools/h5copy')
-rw-r--r--tools/h5copy/testh5copy.sh24
1 files changed, 18 insertions, 6 deletions
diff --git a/tools/h5copy/testh5copy.sh b/tools/h5copy/testh5copy.sh
index 4501e29..9b4fcff 100644
--- a/tools/h5copy/testh5copy.sh
+++ b/tools/h5copy/testh5copy.sh
@@ -76,6 +76,9 @@ H5LS_BIN=`pwd`/../h5ls/$H5LS # The path of the h5ls tool binary
CMP='cmp -s'
DIFF='diff -c'
CP='cp'
+DIRNAME='dirname'
+LS='ls'
+AWK='awk'
nerrors=0
verbose=yes
@@ -105,17 +108,26 @@ COPY_TESTFILES_TO_TESTDIR()
echo $tstfile | tr -d ' ' | grep '^#' > /dev/null
RET=$?
if [ $RET -eq 1 ]; then
- if [ -a $tstfile ]; then
- $CP -f $tstfile $TESTDIR
- else
- echo "Error: FAILED to copy $tstfile."
- echo " $tstfile doesn't exist!"
- exit $EXIT_FAILURE
+ # skip cp if srcdir is same as destdir
+ # this occurs when build/test performed in source dir and
+ # make cp fail
+ SDIR=`$DIRNAME $tstfile`
+ INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
+ INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'`
+ if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
+ $CP -f $tstfile $TESTDIR
+ if [ $? -ne 0 ]; then
+ echo "Error: FAILED to copy $tstfile ."
+
+ # Comment out this to CREATE expected file
+ exit $EXIT_FAILURE
+ fi
fi
fi
done
}
+
# Print a "SKIP" message
SKIP() {
TESTING $H5COPY $@