[svn-r24392] Cleanup testfiles from scripts. Update lists of files to be cleaned. CMake update to clean testfiles.

Tested: local cmake, autools, and h5committest
This commit is contained in:
Allen Byrne 2013-11-01 16:15:37 -05:00
parent 2136f11a47
commit 819b8099e2
29 changed files with 335 additions and 18 deletions

View File

@ -539,11 +539,11 @@
./perform/sio_timer.h
./perform/zip_perf.c
./release_docs/INSTALL_CMake.txt
./release_docs/COPYING
./release_docs/HISTORY-1_0-1_8_0_rc3.txt
./release_docs/HISTORY-1_9.txt
./release_docs/INSTALL
./release_docs/INSTALL_CMake.txt
./release_docs/INSTALL_Cygwin.txt
./release_docs/INSTALL_parallel
./release_docs/INSTALL_VMS.txt

View File

@ -4,8 +4,21 @@
### T E S T I N G ###
##############################################################################
##############################################################################
# Remove any output file left over from previous test run
ADD_TEST (
NAME cpp_testhdf5-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
tattr_basic.h5
tattr_compound.h5
tattr_dtype.h5
tattr_multi.h5
tattr_scalar.h5
tfattrs.h5
)
ADD_TEST (NAME cpp_testhdf5 COMMAND $<TARGET_FILE:cpp_testhdf5>)
SET_TESTS_PROPERTIES (cpp_testhdf5 PROPERTIES DEPENDS cpp_testhdf5-clear-objects)
IF (HDF5_TEST_VFD)
@ -24,6 +37,17 @@ IF (HDF5_TEST_VFD)
MACRO (ADD_VFD_TEST vfdname resultcode)
IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME VFD-${vfdname}-cpp_testhdf5-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
tattr_basic.h5
tattr_compound.h5
tattr_dtype.h5
tattr_multi.h5
tattr_scalar.h5
tfattrs.h5
)
ADD_TEST (
NAME VFD-${vfdname}-cpp_testhdf5
COMMAND "${CMAKE_COMMAND}"
@ -35,6 +59,7 @@ IF (HDF5_TEST_VFD)
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-P "${HDF5_RESOURCES_DIR}/vfdTest.cmake"
)
SET_TESTS_PROPERTIES (VFD-${vfdname}-cpp_testhdf5 PROPERTIES DEPENDS VFD-${vfdname}-cpp_testhdf5-clear-objects)
ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_VFD_TEST)

View File

@ -39,6 +39,9 @@
soft_link.h5
subset.h5
unix2win.h5
blue/prefix_target.h5
red/prefix_target.h5
u2w/u2w_target.h5
)
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (EXAMPLES-clear-objects PROPERTIES DEPENDS ${last_test})

View File

@ -5,6 +5,30 @@
##############################################################################
##############################################################################
# Remove any output file left over from previous test run
ADD_TEST (
NAME f90_ex-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
compound.h5
copy1.h5
copy2.h5
dsetf.h5
extend.h5
FORTRAN.h5
groupf.h5
groupsf.h5
h5_cmprss.h5
mount1.h5
mount2.h5
sdsf.h5
subset.h5
)
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (f90_ex-clear-objects PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
SET (last_test "f90_ex-clear-objects")
FOREACH (example ${examples})
ADD_TEST (NAME f90_ex_${example} COMMAND $<TARGET_FILE:f90_ex_${example}>)
IF (NOT "${last_test}" STREQUAL "")

View File

@ -4,5 +4,13 @@
### T E S T I N G ###
##############################################################################
##############################################################################
# Remove any output file left over from previous test run
ADD_TEST (
NAME cpp_hl_ex_ptExampleFL-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
PTcppexampleFL.h5
)
ADD_TEST (NAME cpp_hl_ex_ptExampleFL COMMAND $<TARGET_FILE:ptExampleFL>)
SET_TESTS_PROPERTIES (cpp_hl_ex_ptExampleFL PROPERTIES DEPENDS cpp_hl_ex_ptExampleFL-clear-objects)

View File

@ -6,7 +6,7 @@ PROJECT (HDF5_HL_EXAMPLES )
#-----------------------------------------------------------------------------
SET (examples
ex_lite1
ex_lite2
ex_lite2 #ex_lite2 PROPERTIES DEPENDS ex_lite1)
ex_lite3
ptExampleFL
ex_image1

View File

@ -21,8 +21,40 @@ FOREACH (h5_file ${HDF5_TEST_FILES})
)
ENDFOREACH (h5_file ${HDF5_TEST_FILES})
# Remove any output file left over from previous test run
ADD_TEST (
NAME hl_ex-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
ex_lite1.h5
ex_lite2.h5
ex_lite3.h5
packet_table_FLexample.h5
ex_image1.h5
ex_image2.h5
ex_table_01.h5
ex_table_02.h5
ex_table_03.h5
ex_table_04.h5
ex_table_05.h5
ex_table_06.h5
ex_table_07.h5
ex_table_08.h5
ex_table_09.h5
ex_table_10.h5
ex_table_11.h5
ex_table_12.h5
ex_ds1.h5
)
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (hl_ex-clear-objects PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
SET (last_test "hl_ex-clear-objects")
FOREACH (example ${examples})
ADD_TEST (NAME hl_ex_${example} COMMAND $<TARGET_FILE:hl_ex_${example}>)
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (hl_ex_${example} PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
SET (last_test "hl_ex_${example}")
ENDFOREACH (example ${examples})
SET_TESTS_PROPERTIES (hl_ex_ex_lite2 PROPERTIES DEPENDS hl_ex_ex_lite1)

View File

@ -15,8 +15,9 @@ ADD_TEST (
dsetf3.h5
dsetf4.h5
dsetf5.h5
f1image.h5
f1img.h5
f1tab.h5
tstds.h5
)
ADD_TEST (NAME hl_f90_tstds COMMAND $<TARGET_FILE:hl_f90_tstds>)

View File

@ -47,12 +47,15 @@ ADD_TEST (
test_ds7.h5
test_ds8.h5
test_ds9.h5
test_ds10.h5
test_dectris.h5
test_image1.h5
test_image2.h5
test_image3.h5
test_lite1.h5
test_lite2.h5
test_lite3.h5
test_lite4.h5
test_packet_compress.h5
test_packet_table.h5
test_table.h5

View File

@ -142,6 +142,7 @@ ADD_TEST (
COMMAND ${CMAKE_COMMAND}
-E remove
coord.h5
dtypes10.h5
sys_file1
tattr.h5
tfile1.h5
@ -150,6 +151,7 @@ ADD_TEST (
tfile4.h5
tfile5.h5
tfile6.h5
tfile7.h5
th5o_file
th5s1.h5
tselect.h5

View File

@ -130,7 +130,7 @@ CHECK_CLEANFILES+=accum.h5 cmpd_dset.h5 compact_dataset.h5 dataset.h5 dset_offse
max_compact_dataset.h5 simple.h5 set_local.h5 random_chunks.h5 \
huge_chunks.h5 chunk_cache.h5 big_chunk.h5 chunk_expand.h5 \
copy_dcpl_newfile.h5 extend.h5 istore.h5 extlinks*.h5 frspace.h5 links*.h5 \
sys_file1 tfile[1-6].h5 th5s[1-4].h5 lheap.h5 fheap.h5 ohdr.h5 \
sys_file1 tfile[1-7].h5 th5s[1-4].h5 lheap.h5 fheap.h5 ohdr.h5 \
stab.h5 extern_[1-3].h5 extern_[1-4][ab].raw gheap[0-4].h5 \
dt_arith[1-2] links.h5 links[0-6]*.h5 extlinks[0-15].h5 tmp \
big.data big[0-9][0-9][0-9][0-9][0-9].h5 \

View File

@ -865,7 +865,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog accum.h5 cmpd_dset.h5 \
max_compact_dataset.h5 simple.h5 set_local.h5 random_chunks.h5 \
huge_chunks.h5 chunk_cache.h5 big_chunk.h5 chunk_expand.h5 \
copy_dcpl_newfile.h5 extend.h5 istore.h5 extlinks*.h5 \
frspace.h5 links*.h5 sys_file1 tfile[1-6].h5 th5s[1-4].h5 \
frspace.h5 links*.h5 sys_file1 tfile[1-7].h5 th5s[1-4].h5 \
lheap.h5 fheap.h5 ohdr.h5 stab.h5 extern_[1-3].h5 \
extern_[1-4][ab].raw gheap[0-4].h5 dt_arith[1-2] links.h5 \
links[0-6]*.h5 extlinks[0-15].h5 tmp big.data \

View File

@ -7062,7 +7062,7 @@ test_utf_ascii_conv(void)
char *ascii_r = NULL;
const char *ascii_w = "bar!";
char *utf8_r = NULL;
char filename[1024];
char ascii2[4], utf8_2[4];
herr_t status;
@ -7095,7 +7095,8 @@ test_utf_ascii_conv(void)
FAIL_STACK_ERROR
/* Create a file */
if((fid = H5Fcreate(FILENAME[10], H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
h5_fixname(FILENAME[10], H5P_DEFAULT, filename, sizeof filename);
if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) FAIL_STACK_ERROR
/* Create a scalar dataspace for the dataset */
if((sid = H5Screate(H5S_SCALAR)) < 0) FAIL_STACK_ERROR

View File

@ -89,5 +89,6 @@ else
fi
# Clean up temporary files/directories and leave
$RM $PLUGIN_LIBDIR2
$RM $PLUGIN_LIBDIR1 $PLUGIN_LIBDIR2
exit $exit_code

View File

@ -67,6 +67,8 @@ H5DIFF_BIN=`pwd`/../h5diff/$H5DIFF # The path of the h5diff tool binary
H5LS=h5ls # The h5ls tool name
H5LS_ARGS=-Svr # Arguments to the h5ls tool
H5LS_BIN=`pwd`/../h5ls/$H5LS # The path of the h5ls tool binary
RM='rm -rf'
CMP='cmp -s'
DIFF='diff -c'
CP='cp'
@ -121,6 +123,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 "SKIP" message
SKIP() {
@ -578,6 +593,8 @@ COPY_REFERENCES
COPY_EXT_LINKS
TEST_MISC
# Clean up temporary files/directories
CLEAN_TESTFILES_AND_TESTDIR
if test $nerrors -eq 0 ; then
echo "All $TESTNAME tests passed."

View File

@ -38,6 +38,7 @@ EXIT_FAILURE=1
H5DIFF=h5diff # The tool name
H5DIFF_BIN=`pwd`/$H5DIFF # The path of the tool binary
RM='rm -rf'
CMP='cmp -s'
DIFF='diff -c'
CP='cp'
@ -336,6 +337,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
}
# Parse option
# -p run ph5diff tests
# -h print help page
@ -1096,6 +1110,9 @@ TOOLTEST h5diff_646.txt -v --use-system-epsilon -p 0.05 h5diff_basic1.h5 h5diff_
# # END
# ##############################################################################
# Clean up temporary files/directories
CLEAN_TESTFILES_AND_TESTDIR
if test $nerrors -eq 0 ; then
echo "All $TESTNAME tests passed."
exit $EXIT_SUCCESS

View File

@ -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'
@ -396,6 +396,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".
#
@ -1258,6 +1271,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

View File

@ -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

View File

@ -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."

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -34,6 +34,7 @@ UNJAM=h5unjam # Tool to test
JAM_BIN="$RUNSERIAL "`pwd` # The path of the jam binary
UNJAM_BIN=`pwd` # The path of the jam binary
RM='rm -rf'
CMP='cmp -s'
DIFF='diff -c'
AWK='awk'
@ -122,6 +123,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".
#
@ -675,7 +689,8 @@ UNJAMTEST taj3.h5 --delete tac3.h5
CHECKFILE $TESTDIR/tall.h5 tac3.h5
CLEANUP tac3.h5 taj3.h5
# Clean up temporary files/directories
CLEAN_TESTFILES_AND_TESTDIR
if test $nerrors -eq 0 ; then
echo "All $TESTNAME tests passed."

View File

@ -24,6 +24,7 @@ EXIT_FAILURE=1
H5LS=h5ls # The tool name
H5LS_BIN=`pwd`/$H5LS # The path of the tool binary
RM='rm -rf'
CMP='cmp -s'
DIFF='diff -c'
CP='cp'
@ -189,6 +190,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".
TESTING() {
@ -404,6 +418,8 @@ else
TOOLTEST tdataregbe.ls 0 -v tdatareg.h5
fi
# Clean up temporary files/directories
CLEAN_TESTFILES_AND_TESTDIR
if test $nerrors -eq 0 ; then
echo "All $TESTNAME tests passed."

View File

@ -42,6 +42,7 @@ H5DIFF_BIN=`pwd`/$H5DIFF # The path of the h5diff tool binary
H5DUMP=../h5dump/h5dump # The h5dump tool name
H5DUMP_BIN=`pwd`/$H5DUMP # The path of the h5dump tool binary
RM='rm -rf'
GREP='grep'
CP='cp'
DIRNAME='dirname'
@ -161,6 +162,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 $* message left justified in a field of 70 characters
#
MESSAGE() {
@ -1088,6 +1102,9 @@ TOOLTEST HDFFV-7840 h5diff_attr1.h5
TOOLTEST_META meta_short h5repack_layout.h5 -M 8192
TOOLTEST_META meta_long h5repack_layout.h5 --metadata_block_size=8192
# Clean up temporary files/directories
CLEAN_TESTFILES_AND_TESTDIR
if test $nerrors -eq 0 ; then
echo "All $TESTNAME tests passed."
exit $EXIT_SUCCESS

View File

@ -35,7 +35,7 @@ TEST_NAME=ud_plugin
FROM_DIR=`pwd`/.libs
PLUGIN_LIB="$FROM_DIR/libdynlibadd.*"
PLUGIN_LIBDIR=testdir3
RM="rm -rf"
RM='rm -rf'
GREP='grep'
CP='cp'
@ -118,6 +118,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 $* message left justified in a field of 70 characters
#
MESSAGE() {
@ -233,6 +246,10 @@ else
exit_code=$EXIT_SUCCESS
fi
# Clean up temporary files/directories
CLEAN_TESTFILES_AND_TESTDIR
# Clean up temporary files/directories and leave
$RM $PLUGIN_LIBDIR
exit $exit_code

View File

@ -37,6 +37,7 @@ EXIT_FAILURE=1
STAT=h5stat # The tool name
STAT_BIN=`pwd`/$STAT # The path of the tool binary
RM='rm -rf'
CMP='cmp -s'
DIFF='diff -c'
CP='cp'
@ -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
}
# Print a line-line message left justified in a field of 70 characters
# beginning with the word "Testing".
#
@ -294,6 +308,9 @@ TOOLTEST h5stat_numattrs3.ddl -A --numattrs=25 h5stat_threshold.h5
TOOLTEST h5stat_numattrs4.ddl -A -a 100 h5stat_newgrat.h5
#
# Clean up temporary files/directories
CLEAN_TESTFILES_AND_TESTDIR
if test $nerrors -eq 0 ; then
echo "All $TESTNAME tests passed."
exit $EXIT_SUCCESS

View File

@ -31,6 +31,7 @@ H5LS=h5ls # The h5ls tool name
H5LS_ARGS=-vr # Arguments to the h5ls tool
H5LS_BIN=`pwd`/../h5ls/$H5LS # The path of the h5ls tool binary
RM='rm -rf'
CMP='cmp'
DIFF='diff -c'
CP='cp'
@ -111,6 +112,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".
TESTING()
@ -299,6 +313,8 @@ RUNTEST h5mkgrp_nested_lp.h5 "-lp" /one/two
RUNTEST h5mkgrp_nested_mult_p.h5 "-p" /one/two /three/four
RUNTEST h5mkgrp_nested_mult_lp.h5 "-lp" /one/two /three/four
# Clean up temporary files/directories
CLEAN_TESTFILES_AND_TESTDIR
if test $nerrors -eq 0 ; then
echo "All $TESTNAME tests passed."