diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2013-11-01 21:26:11 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2013-11-01 21:26:11 (GMT) |
commit | 08901f283eeb75bef514be2a8ea285475e154e0d (patch) | |
tree | 5a2e926b3aae6d96a7c3052e62b21784f7b43ca4 /tools/h5dump | |
parent | d242fd85c4d280a85522bf6ad31e2998d10e1e08 (diff) | |
download | hdf5-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/h5dump')
-rw-r--r-- | tools/h5dump/testh5dump.sh.in | 17 | ||||
-rw-r--r-- | tools/h5dump/testh5dumppbits.sh.in | 17 | ||||
-rw-r--r-- | tools/h5dump/testh5dumpxml.sh.in | 16 |
3 files changed, 48 insertions, 2 deletions
diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in index b1c2a82..381e772 100644 --- a/tools/h5dump/testh5dump.sh.in +++ b/tools/h5dump/testh5dump.sh.in @@ -30,7 +30,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' DIFF='diff -c' CP='cp' @@ -394,6 +394,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". # @@ -1255,6 +1268,8 @@ TOOLTEST5 filter_fail.ddl --enable-error-stack filter_fail.h5 # test for -o -y for dataset with attributes TOOLTEST2 tall-6.exp --enable-error-stack -y -o tall-6.txt -d /g1/g1.1/dset1.1.1 tall.h5 +# Clean up temporary files/directories +CLEAN_TESTFILES_AND_TESTDIR # Report test results and exit if test $nerrors -eq 0 ; then 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 diff --git a/tools/h5dump/testh5dumpxml.sh.in b/tools/h5dump/testh5dumpxml.sh.in index 6e4efd1..4dad9cd 100644 --- a/tools/h5dump/testh5dumpxml.sh.in +++ b/tools/h5dump/testh5dumpxml.sh.in @@ -26,6 +26,7 @@ H5_LONE_COLON="@H5_LONE_COLON@" DUMPER=h5dump # The tool name DUMPER_BIN=`pwd`/$DUMPER # The path of the tool binary +RM='rm -rf' CMP='cmp -s' DIFF='diff -c' CP='cp' @@ -217,6 +218,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". # @@ -372,6 +386,8 @@ TOOLTEST torderattr4.h5.xml --xml -H --sort_by=creation_order --sort_order=desce # tests for floating point user defined printf format TOOLTEST tfpformat.h5.xml -u -m %.7f tfpformat.h5 +# Clean up temporary files/directories +CLEAN_TESTFILES_AND_TESTDIR if test $nerrors -eq 0 ; then echo "All $TESTNAME tests passed." |