mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-31 17:10:47 +08:00
tools/test/h5diff/testh5diff.sh.in:
Add code to delete copies of test .h5 files copied from tools/testfiles/vds to tools/test/h5diff/testfiles when running "make check" for an in-source build. tools/test/misc/testh5repart.sh.in: Change the name of the temporary test directory from "testfiles" which is also used for 2 h5mkgrp test files under source control to "testrepart" to avoid deleting source controlled files when running "make check" in the source directory. Fix test scripts that remove source-controlled files during "make check" when run in-source. Fix test scripts that don't remove test files because they add files to test directories but don't remove them if the build directories are the same as the source directory. Fix any test source file or Makefile.am files for tests that leave data files are removed by neither "make check" nor "make distclean".
This commit is contained in:
parent
089afc4856
commit
8452976de5
@ -846,7 +846,7 @@ void cleanup_file()
|
||||
HDremove(FILE1.c_str());
|
||||
HDremove(FILE2.c_str());
|
||||
HDremove(FILE3.c_str());
|
||||
// HDremove(FILE4.c_str());
|
||||
HDremove(FILE4.c_str());
|
||||
HDremove(FILE5.c_str());
|
||||
HDremove(FILE6.c_str());
|
||||
} // cleanup_file
|
||||
|
@ -57,9 +57,9 @@ libhdf5_fortran_la_LIBADD=$(LIBHDF5)
|
||||
# Remove it only when distclean.
|
||||
DISTCLEANFILES=h5fc
|
||||
|
||||
# H5fortran_types.F90 and H5f90i.h are automatically generaed by
|
||||
# H5fortran_types.F90 and H5f90i.h are automatically generated by
|
||||
# H5match_types, and must be cleaned explicitly.
|
||||
MOSTLYCLEANFILES=H5fortran_types.F90 H5f90i_gen.h
|
||||
MOSTLYCLEANFILES=H5fortran_types.F90 H5f90i_gen.h H5_gen.F90
|
||||
|
||||
# Fortran module files can have different extensions and different names
|
||||
# (e.g., different capitalizations) on different platforms. Write rules
|
||||
|
@ -161,6 +161,8 @@ CLEAN_DATAFILES_AND_BLDDIR()
|
||||
{
|
||||
$RM $BLDDIR/examples.datasets.H5Ex_D_*.txt
|
||||
$RM $BLDDIR/H5Ex_D_*.out
|
||||
$RM $BLDDIR/H5Ex_D_*.h5
|
||||
$RM $BLDDIR/H5Ex_D_External.data
|
||||
}
|
||||
|
||||
# Print a line-line message left justified in a field of 70 characters
|
||||
|
@ -158,6 +158,7 @@ CLEAN_DATAFILES_AND_BLDDIR()
|
||||
{
|
||||
$RM $BLDDIR/examples.datatypes.H5Ex_T_*.txt
|
||||
$RM $BLDDIR/H5Ex_T_*.out
|
||||
$RM $BLDDIR/H5Ex_T_*.h5
|
||||
}
|
||||
|
||||
# Print a line-line message left justified in a field of 70 characters
|
||||
|
@ -153,6 +153,14 @@ CLEAN_DATAFILES_AND_BLDDIR()
|
||||
{
|
||||
$RM $BLDDIR/examples.groups.H5Ex_G_*.txt
|
||||
$RM $BLDDIR/H5Ex_G_*.out
|
||||
$RM $BLDDIR/H5Ex_G_*.h5
|
||||
SDIR=`$DIRNAME $tstfile`
|
||||
INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
|
||||
INODE_DDIR=`$LS -i -d $BLDDIR | $AWK -F' ' '{print $1}'`
|
||||
if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then SDIR=`$DIRNAME $tstfile`
|
||||
$RM $BLDDIR/h5ex_g_iterate.h5
|
||||
$RM $BLDDIR/h5ex_g_visit.h5
|
||||
fi
|
||||
}
|
||||
|
||||
COPY_REFFILES="$LIST_REF_FILES"
|
||||
|
@ -147,6 +147,7 @@ CLEAN_DATAFILES_AND_BLDDIR()
|
||||
{
|
||||
$RM $BLDDIR/examples.intro.H5_*.txt
|
||||
$RM $BLDDIR/H5_*.out
|
||||
$RM $BLDDIR/H5_*.h5
|
||||
}
|
||||
|
||||
# Print a line-line message left justified in a field of 70 characters
|
||||
|
@ -130,6 +130,7 @@ CLEANFILES = classhdf5_java.stamp $(jarfile) $(JAVAROOT)/$(pkgpath)/callbacks/*.
|
||||
clean:
|
||||
rm -rf $(JAVAROOT)/*
|
||||
rm -f $(jarfile)
|
||||
rm -rf javadoc
|
||||
rm -f classhdf5_java.stamp
|
||||
|
||||
|
||||
|
@ -239,6 +239,7 @@ public class TestH5Ocopy {
|
||||
try {H5.H5Pclose(ocp_plist_id);} catch (Exception ex) {}
|
||||
try {H5.H5Fclose(H5fid2);} catch (Exception ex) {}
|
||||
}
|
||||
_deleteFile("copy.h5");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -183,7 +183,16 @@ CLEAN_DATAFILES_AND_BLDDIR()
|
||||
$RM $BLDDIR/JUnit-interface.out
|
||||
$RM $BLDDIR/JUnit-interface.err
|
||||
$RM $BLDDIR/JUnit-interface.ext
|
||||
# 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 $BLDDIR | $AWK -F' ' '{print $1}'`
|
||||
if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
|
||||
$RM $BLDDIR/JUnit-interface.ert
|
||||
$RM $BLDDIR/JUnit-interface.txt
|
||||
fi
|
||||
}
|
||||
|
||||
# Print a line-line message left justified in a field of 70 characters
|
||||
|
@ -174,7 +174,7 @@ CHECK_CLEANFILES+=accum.h5 cmpd_dset.h5 compact_dataset.h5 dataset.h5 dset_offse
|
||||
flushrefresh_VERIFICATION_CHECKPOINT1 flushrefresh_VERIFICATION_CHECKPOINT2 \
|
||||
flushrefresh_VERIFICATION_DONE accum_swmr_big.h5 ohdr_swmr.h5 \
|
||||
cache_logging.h5 cache_logging.out \
|
||||
swmr[0-2].h5
|
||||
swmr[0-2].h5 tbogus.h5.copy
|
||||
# Sources for testhdf5 executable
|
||||
testhdf5_SOURCES=testhdf5.c tarray.c tattr.c tchecksum.c tconfig.c tfile.c \
|
||||
tgenprop.c th5o.c th5s.c tcoords.c theap.c tid.c titerate.c tmeta.c tmisc.c \
|
||||
|
@ -382,6 +382,21 @@ CLEAN_TESTFILES_AND_TESTDIR()
|
||||
INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'`
|
||||
if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
|
||||
$RM $TESTDIR
|
||||
else
|
||||
# files in $LIST_HDF5_VDS_TEST_FILES are copied in from a different
|
||||
# directory, so when srcdir is the same as destdir and $TESTDIR is
|
||||
# not deleted, the copy n $TESTDIR of each file from
|
||||
# $LIST_HDF5_VDS_TEST_FILES will need to be deleted.
|
||||
for tstfile in $LIST_HDF5_VDS_TEST_FILES
|
||||
do
|
||||
# ignore '#' comment
|
||||
echo $tstfile | tr -d ' ' | grep '^#' > /dev/null
|
||||
RET=$?
|
||||
if [ $RET -eq 1 ]; then
|
||||
fname=`basename $tstfile`
|
||||
rm $TESTDIR/$fname
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -180,6 +180,9 @@ CLEAN_TESTFILES_AND_TESTDIR()
|
||||
$RM $TESTDIR
|
||||
else
|
||||
$RM $TESTDIR/$TMPFILE
|
||||
$RM $TESTDIR/$TMPOUTFILE
|
||||
$RM $TESTDIR/$TMPCHKFILE
|
||||
$RM $TESTDIR/$TMPDMPFILE
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@ SCRIPT_DEPEND=../../src/misc/h5repart$(EXEEXT) ../../src/misc/h5mkgrp$(EXEEXT) .
|
||||
# Temporary files. *.h5 are generated by h5repart_gentest. They should
|
||||
# copied to the testfiles/ directory if update is required. fst_family*.h5
|
||||
# and scd_family*.h5 were created by setting the HDF5_NOCLEANUP variable.
|
||||
CHECK_CLEANFILES+=*.h5 ../testfiles/fst_family*.h5 ../testfiles/scd_family*.h5
|
||||
CHECK_CLEANFILES+=*.h5 ../testfiles/fst_family*.h5 ../testfiles/scd_family*.h5 append.log
|
||||
|
||||
# These were generated by configure. Remove them only when distclean.
|
||||
DISTCLEANFILES=testh5repart.sh testh5clear.sh
|
||||
|
@ -43,7 +43,7 @@ SRC_TOOLS="$srcdir/../.."
|
||||
|
||||
SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles"
|
||||
|
||||
TESTDIR=./testfiles
|
||||
TESTDIR=./testrepart
|
||||
test -d $TESTDIR || mkdir -p $TESTDIR
|
||||
|
||||
#
|
||||
|
Loading…
x
Reference in New Issue
Block a user