From d114cda9a00a89323aedacec5dfcbbdf0aca32b7 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Tue, 26 Jun 2007 11:08:38 -0500 Subject: [svn-r13914] Description: Clean up files generated during testing. Tested on: Linux/32 2.6 (chicago) --- test/testhdf5.c | 2 +- tools/h5copy/Makefile.am | 4 ++++ tools/h5copy/Makefile.in | 2 +- tools/h5copy/testh5copy.sh | 10 ++++++++++ tools/misc/testh5mkgrp.sh | 11 +++++++++++ 5 files changed, 27 insertions(+), 2 deletions(-) diff --git a/test/testhdf5.c b/test/testhdf5.c index a7ee83a..5b174be 100644 --- a/test/testhdf5.c +++ b/test/testhdf5.c @@ -52,7 +52,7 @@ main(int argc, char *argv[]) AddTest("skiplist", test_skiplist, NULL, "Skip Lists", NULL); AddTest("refstr", test_refstr, NULL, "Reference Counted Strings", NULL); AddTest("file", test_file, cleanup_file, "Low-Level File I/O", NULL); - AddTest("objects", test_h5o, cleanup_file, "Generic Object Functions", NULL); + AddTest("objects", test_h5o, cleanup_h5o, "Generic Object Functions", NULL); AddTest("h5s", test_h5s, cleanup_h5s, "Dataspaces", NULL); AddTest("sohm", test_sohm, cleanup_sohm, "Shared Object Header Messages", NULL); AddTest("attr", test_attr, cleanup_attr, "Attributes", NULL); diff --git a/tools/h5copy/Makefile.am b/tools/h5copy/Makefile.am index efdc2a9..23432eb 100644 --- a/tools/h5copy/Makefile.am +++ b/tools/h5copy/Makefile.am @@ -39,4 +39,8 @@ h5copygentest_SOURCES=h5copygentest.c # All programs depend on the hdf5 and h5tools libraries LDADD=$(LIBH5TOOLS) $(LIBHDF5) +# Temporary files. *.h5 are generated by h5dumpgentest. They should +# copied to the testfiles/ directory if update is required. +CHECK_CLEANFILES+=*.h5 + include $(top_srcdir)/config/conclude.am diff --git a/tools/h5copy/Makefile.in b/tools/h5copy/Makefile.in index 5262cc9..c7d469d 100644 --- a/tools/h5copy/Makefile.in +++ b/tools/h5copy/Makefile.in @@ -316,7 +316,7 @@ 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 +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 # Include src and tools/lib directories INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/tools/lib diff --git a/tools/h5copy/testh5copy.sh b/tools/h5copy/testh5copy.sh index e3cf67d..9ff3d50 100644 --- a/tools/h5copy/testh5copy.sh +++ b/tools/h5copy/testh5copy.sh @@ -107,6 +107,11 @@ TOOLTEST() nerrors="`expr $nerrors + 1`" else echo " PASSED" + + # Clean up output file + if test -z "$HDF5_NOCLEANUP"; then + rm -f output.out + fi fi if [ $runh5diff != no ]; then @@ -166,6 +171,11 @@ H5LSTEST() nerrors="`expr $nerrors + 1`" test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' fi + + # Clean up output file + if test -z "$HDF5_NOCLEANUP"; then + rm -f $actual $actual_err + fi } # Copy single datasets of various forms from one group to another, diff --git a/tools/misc/testh5mkgrp.sh b/tools/misc/testh5mkgrp.sh index b90c288..50ac23b 100644 --- a/tools/misc/testh5mkgrp.sh +++ b/tools/misc/testh5mkgrp.sh @@ -79,6 +79,11 @@ TOOLTEST() nerrors="`expr $nerrors + 1`" else echo " PASSED" + + # Clean up output file + if test -z "$HDF5_NOCLEANUP"; then + rm -f output.out + fi fi } @@ -112,6 +117,11 @@ H5LSTEST() nerrors="`expr $nerrors + 1`" test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' fi + + # Clean up output file + if test -z "$HDF5_NOCLEANUP"; then + rm -f $actual $actual_err + fi } # Single run of tool @@ -138,6 +148,7 @@ RUNTEST() # Remove output file created, if the "no cleanup" environment variable is # not defined +echo "FILEOUT=" $FILEOUT if test -z "$HDF5_NOCLEANUP"; then rm -f $FILEOUT fi -- cgit v0.12