diff options
author | Vailin Choi <vchoi@hdfgroup.org> | 2013-11-19 23:00:19 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@hdfgroup.org> | 2013-11-19 23:00:19 (GMT) |
commit | 9dfe3e854f023fb2351cdd014c1954297e9fd921 (patch) | |
tree | fbe8d544de76a35a7b46b2733ebdae20f8007b33 /tools/h5import | |
parent | 612faec1aceceb595c77da52b092b7683581e776 (diff) | |
download | hdf5-9dfe3e854f023fb2351cdd014c1954297e9fd921.zip hdf5-9dfe3e854f023fb2351cdd014c1954297e9fd921.tar.gz hdf5-9dfe3e854f023fb2351cdd014c1954297e9fd921.tar.bz2 |
[svn-r24457] Bring revisions #24333 - #24432 from trunk to revise_chunks.
h5committested.
Diffstat (limited to 'tools/h5import')
-rw-r--r-- | tools/h5import/CMakeTests.cmake | 23 | ||||
-rw-r--r-- | tools/h5import/Makefile.am | 3 | ||||
-rw-r--r-- | tools/h5import/Makefile.in | 4 | ||||
-rw-r--r-- | tools/h5import/h5importtestutil.sh.in | 17 |
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 |