summaryrefslogtreecommitdiffstats
path: root/tools/misc
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2013-11-01 21:26:11 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2013-11-01 21:26:11 (GMT)
commit08901f283eeb75bef514be2a8ea285475e154e0d (patch)
tree5a2e926b3aae6d96a7c3052e62b21784f7b43ca4 /tools/misc
parentd242fd85c4d280a85522bf6ad31e2998d10e1e08 (diff)
downloadhdf5-08901f283eeb75bef514be2a8ea285475e154e0d.zip
hdf5-08901f283eeb75bef514be2a8ea285475e154e0d.tar.gz
hdf5-08901f283eeb75bef514be2a8ea285475e154e0d.tar.bz2
[svn-r24393] Cleanup testfiles from scripts. Update lists of files to be cleaned. CMake update to clean testfiles.
Tested: local cmake, autotools
Diffstat (limited to 'tools/misc')
-rw-r--r--tools/misc/testh5mkgrp.sh.in16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/misc/testh5mkgrp.sh.in b/tools/misc/testh5mkgrp.sh.in
index 5ec1a28..85205a8 100644
--- a/tools/misc/testh5mkgrp.sh.in
+++ b/tools/misc/testh5mkgrp.sh.in
@@ -31,6 +31,7 @@ H5LS=h5ls # The h5ls tool name
H5LS_ARGS=-vr # Arguments to the h5ls tool
H5LS_BIN=`pwd`/../h5ls/$H5LS # The path of the h5ls tool binary
+RM='rm -rf'
CMP='cmp'
DIFF='diff -c'
CP='cp'
@@ -111,6 +112,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 line-line message left justified in a field of 70 characters
# beginning with the word "Testing".
TESTING()
@@ -299,6 +313,8 @@ RUNTEST h5mkgrp_nested_lp.h5 "-lp" /one/two
RUNTEST h5mkgrp_nested_mult_p.h5 "-p" /one/two /three/four
RUNTEST h5mkgrp_nested_mult_lp.h5 "-lp" /one/two /three/four
+# Clean up temporary files/directories
+CLEAN_TESTFILES_AND_TESTDIR
if test $nerrors -eq 0 ; then
echo "All $TESTNAME tests passed."