summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2013-11-01 21:38:21 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2013-11-01 21:38:21 (GMT)
commitad1a5b1e9855dfbc7f9e6149321c08ac0047f961 (patch)
treeedfc30b85059b48ee6735b10d00a50ebcf33811a
parent08901f283eeb75bef514be2a8ea285475e154e0d (diff)
downloadhdf5-ad1a5b1e9855dfbc7f9e6149321c08ac0047f961.zip
hdf5-ad1a5b1e9855dfbc7f9e6149321c08ac0047f961.tar.gz
hdf5-ad1a5b1e9855dfbc7f9e6149321c08ac0047f961.tar.bz2
[svn-r24395] Missed script file for cleanup
-rw-r--r--tools/h5repack/h5repack.sh.in17
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/h5repack/h5repack.sh.in b/tools/h5repack/h5repack.sh.in
index 583b6ef..045aebf 100644
--- a/tools/h5repack/h5repack.sh.in
+++ b/tools/h5repack/h5repack.sh.in
@@ -42,6 +42,7 @@ H5DIFF_BIN=`pwd`/$H5DIFF # The path of the h5diff tool binary
H5DUMP=../h5dump/h5dump # The h5dump tool name
H5DUMP_BIN=`pwd`/$H5DUMP # The path of the h5dump tool binary
+RM='rm -rf'
GREP='grep'
CP='cp'
DIRNAME='dirname'
@@ -161,6 +162,19 @@ COPY_TESTFILES_TO_TESTDIR()
done
}
+CLEAN_TESTFILES_AND_TESTDIR()
+{
+ # skip rm 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
+ $RM $TESTDIR
+ fi
+}
+
# Print a $* message left justified in a field of 70 characters
#
MESSAGE() {
@@ -1088,6 +1102,9 @@ TOOLTEST HDFFV-7840 h5diff_attr1.h5
TOOLTEST_META meta_short h5repack_layout.h5 -M 8192
TOOLTEST_META meta_long h5repack_layout.h5 --metadata_block_size=8192
+# Clean up temporary files/directories
+CLEAN_TESTFILES_AND_TESTDIR
+
if test $nerrors -eq 0 ; then
echo "All $TESTNAME tests passed."
exit $EXIT_SUCCESS