summaryrefslogtreecommitdiffstats
path: root/tools/h5import
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2013-11-01 21:15:37 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2013-11-01 21:15:37 (GMT)
commit819b8099e24809cdb9c9e2e11078cffc0e754ace (patch)
treefc87a9a3666851cd012e7782b3f14e306dc55490 /tools/h5import
parent2136f11a47ef28553d9e6e3ade726d28590087f3 (diff)
downloadhdf5-819b8099e24809cdb9c9e2e11078cffc0e754ace.zip
hdf5-819b8099e24809cdb9c9e2e11078cffc0e754ace.tar.gz
hdf5-819b8099e24809cdb9c9e2e11078cffc0e754ace.tar.bz2
[svn-r24392] Cleanup testfiles from scripts. Update lists of files to be cleaned. CMake update to clean testfiles.
Tested: local cmake, autools, and h5committest
Diffstat (limited to 'tools/h5import')
-rw-r--r--tools/h5import/CMakeTests.cmake23
-rw-r--r--tools/h5import/Makefile.am3
-rw-r--r--tools/h5import/Makefile.in4
-rw-r--r--tools/h5import/h5importtestutil.sh.in17
4 files changed, 43 insertions, 4 deletions
diff --git a/tools/h5import/CMakeTests.cmake b/tools/h5import/CMakeTests.cmake
index cb76204..96cca87 100644
--- a/tools/h5import/CMakeTests.cmake
+++ b/tools/h5import/CMakeTests.cmake
@@ -105,7 +105,7 @@
IF (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (NAME H5IMPORT-${testname} COMMAND $<TARGET_FILE:h5import> ${importfile} -c ${conffile} -o ${testfile})
IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5IMPORT-${testname} PROPERTIES DEPENDS ${last_test})
+ SET_TESTS_PROPERTIES (H5IMPORT-${testname} PROPERTIES DEPENDS H5IMPORT-h5importtest)
ENDIF (NOT "${last_test}" STREQUAL "")
ELSE (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
@@ -118,6 +118,7 @@
${testfile}.out
${testfile}.out.err
)
+ SET_TESTS_PROPERTIES (H5IMPORT-${testname}-clear-objects PROPERTIES DEPENDS H5IMPORT-h5importtest)
ADD_TEST (NAME H5IMPORT-${testname} COMMAND $<TARGET_FILE:h5import> ${importfile} -c ${conffile} -o ${testfile})
SET_TESTS_PROPERTIES (H5IMPORT-${testname} PROPERTIES DEPENDS H5IMPORT-${testname}-clear-objects)
@@ -167,6 +168,7 @@
d${testfile}.dff
d${testfile}.dff.err
)
+ SET_TESTS_PROPERTIES (H5IMPORT-DUMP-${testname}-clear-objects PROPERTIES DEPENDS H5IMPORT-h5importtest)
IF ("${ARGN}" STREQUAL "BINARY")
ADD_TEST (
@@ -407,10 +409,25 @@
SET (last_test "H5IMPORT-clear-objects")
ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5IMPORT-h5importtest COMMAND $<TARGET_FILE:h5importtest>)
+ ADD_TEST (
+ NAME H5IMPORT-h5importtest-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ binfp64.bin
+ binin8.bin
+ binin8w.bin
+ binin16.bin
+ binin32.bin
+ binuin16.bin
+ binuin32.bin
+ )
IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5IMPORT-h5importtest PROPERTIES DEPENDS ${last_test})
+ SET_TESTS_PROPERTIES (H5IMPORT-h5importtest-clear-objects PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
+ SET (last_test "H5IMPORT-clear-objects")
+
+ ADD_TEST (NAME H5IMPORT-h5importtest COMMAND $<TARGET_FILE:h5importtest>)
+ SET_TESTS_PROPERTIES (H5IMPORT-h5importtest PROPERTIES DEPENDS H5IMPORT-h5importtest-clear-objects)
# ----- TESTING "ASCII I32 rank 3 - Output BE " ;
ADD_H5_TEST (ASCII_I32 testfiles/txtin32.txt testfiles/txtin32.conf txtin32.h5)
diff --git a/tools/h5import/Makefile.am b/tools/h5import/Makefile.am
index 167dbc9..6d18e25 100644
--- a/tools/h5import/Makefile.am
+++ b/tools/h5import/Makefile.am
@@ -40,4 +40,7 @@ h5import_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS)
# All programs depend on the main hdf5 library and the tools library
LDADD=$(LIBH5TOOLS) $(LIBHDF5)
+# Temporary files from h5importtest
+CHECK_CLEANFILES+=*.bin
+
include $(top_srcdir)/config/conclude.am
diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in
index bfb777a..94910af 100644
--- a/tools/h5import/Makefile.in
+++ b/tools/h5import/Makefile.in
@@ -428,7 +428,9 @@ TRACE = perl $(top_srcdir)/bin/trace
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
# *.clog are from the MPE option.
-CHECK_CLEANFILES = *.chkexe *.chklog *.clog
+
+# Temporary files from h5importtest
+CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.bin
# Include src and tools/lib directories
INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/tools/lib
diff --git a/tools/h5import/h5importtestutil.sh.in b/tools/h5import/h5importtestutil.sh.in
index fd21dc1..e50ddac 100644
--- a/tools/h5import/h5importtestutil.sh.in
+++ b/tools/h5import/h5importtestutil.sh.in
@@ -25,6 +25,7 @@ TESTNAME=h5import
EXIT_SUCCESS=0
EXIT_FAILURE=1
+RM='rm -rf'
CP='cp'
DIRNAME='dirname'
LS='ls'
@@ -147,6 +148,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
+}
+
TESTING() {
SPACES=" "
echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012'
@@ -350,6 +364,9 @@ else
nerrors="` expr $nerrors + 1 `";
fi
+# Clean up temporary files/directories
+CLEAN_TESTFILES_AND_TESTDIR
+
#
# Check errors result
if test $nerrors -eq 0 ; then