summaryrefslogtreecommitdiffstats
path: root/tools/h5dump/testh5dumppbits.sh.in
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2013-11-22 17:27:08 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2013-11-22 17:27:08 (GMT)
commit8f3a6ae8b7bf2554478b668a102f37a9f1363e3e (patch)
tree8ca4b4d22964f978670e8668e240f99aa43f3f47 /tools/h5dump/testh5dumppbits.sh.in
parent10d221961cd178734d674cb7d20465374ac37afd (diff)
downloadhdf5-8f3a6ae8b7bf2554478b668a102f37a9f1363e3e.zip
hdf5-8f3a6ae8b7bf2554478b668a102f37a9f1363e3e.tar.gz
hdf5-8f3a6ae8b7bf2554478b668a102f37a9f1363e3e.tar.bz2
[svn-r24462] Bring revision #24457 from revise_chunks.
Diffstat (limited to 'tools/h5dump/testh5dumppbits.sh.in')
-rw-r--r--tools/h5dump/testh5dumppbits.sh.in17
1 files changed, 16 insertions, 1 deletions
diff --git a/tools/h5dump/testh5dumppbits.sh.in b/tools/h5dump/testh5dumppbits.sh.in
index def687b..0f6503d 100644
--- a/tools/h5dump/testh5dumppbits.sh.in
+++ b/tools/h5dump/testh5dumppbits.sh.in
@@ -38,7 +38,7 @@ H5DIFF_BIN=`pwd`/$H5DIFF # The path of the h5diff tool binary
H5IMPORT=../h5import/h5import # The h5import tool name
H5IMPORT_BIN=`pwd`/$H5IMPORT # The path of the h5import tool binary
-
+RM='rm -rf'
CMP='cmp -s'
DIFF='diff -c'
CP='cp'
@@ -189,6 +189,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".
#
@@ -576,6 +589,8 @@ TOOLTEST tpbitsLongLengthExceeded.ddl --enable-error-stack -d /DS32BITS -M 26,7
# Incomplete pair of packed bits request.
TOOLTEST tpbitsIncomplete.ddl --enable-error-stack -d /DS08BITS -M 0,2,2,1,0,2,2, packedbits.h5
+# Clean up temporary files/directories
+CLEAN_TESTFILES_AND_TESTDIR
# Report test results and exit
if test $nerrors -eq 0 ; then