Run all scripts using signal files between processes in their own directories to avoid accidental deletion of the signal files.

This commit is contained in:
lrknox 2017-03-21 22:58:41 -05:00
parent fa5ca5272d
commit b461f1818b
4 changed files with 83 additions and 6 deletions

View File

@ -113,6 +113,33 @@ TOOLTEST() {
fi
}
# HDF5 has several tests that create and delete signal files to communicate
# between processes, and it seems that even though the names of the files are
# different, occasionally the wrong file is deleted, interrupting the flow of
# the test. Running each of these tests in its own directory should eliminate
# the problem.
mkdir usecases_test
cp twriteorder usecases_test
for FILE in use_*; do
case "$FILE" in
*.o) continue ;; ## don't copy the .o files
esac
cp $FILE usecases_test
done
# With the --disable-shared option, swmr program files are built in the test
# directory, otherwise they are in test/.libs with a corresponding wrapper
# script in the test directory. The programs or wrapper scripts in test should
# always be copied, swmr files in .libs should be copied only if they exists.
if [ -f .libs/use_append_chunk ]; then
mkdir usecases_test/.libs
cp .libs/use_* usecases_test/.libs
cp .libs/twriteorder usecases_test/.libs
fi
cd usecases_test
# run tests for H5Odisable_mdc_flushes/H5Oenable_mdc_flushes/H5Oare_mdc_flushes_disabled here temporary
USECORK=use_disable_mdc_flushes
for p in $USECORK; do
@ -158,10 +185,14 @@ for p in $USECASES_PROGRAMS; do
fi
done
cd ..
# Report test results and exit
if test $nerrors -eq 0 ; then
echo "All $TESTNAME tests passed."
if test -z "$HDF5_NOCLEANUP"; then
# delete the test directory
rm -rf usecases_test
fi
else
echo "$TESTNAME tests failed with $nerrors errors."
EXIT_VALUE=$EXIT_FAILURE

View File

@ -84,7 +84,7 @@ fi
# different, occasionally the wrong file is deleted, interrupting the flow of
# the test. Running each of these tests in its own directory should eliminate
# the problem.
mkdir -p flushrefresh_test/.libs
mkdir flushrefresh_test
cp flushrefresh flushrefresh_test
# With the --disable-shared option, flushrefresh is built in the test directory,
@ -92,6 +92,7 @@ cp flushrefresh flushrefresh_test
# the test directory. test/flushrefresh should always be copied,
# .libs/flushrefresh should be copied only if it exists.
if [ -f .libs/flushrefresh ]; then
mkdir flushrefresh_test/.libs
cp .libs/flushrefresh flushrefresh_test/.libs
fi
cd flushrefresh_test
@ -210,6 +211,10 @@ fi
if test $nerrors -eq 0 ; then
echo "flush/refresh objects tests passed."
if test -z "$HDF5_NOCLEANUP"; then
# delete the test directory
rm -rf flushrefresh_test
fi
exit 0
else
echo "flush/refresh objects tests failed with $nerrors errors."

View File

@ -128,7 +128,13 @@ done
# different, occasionally the wrong file is deleted, interrupting the flow of
# the test. Running each of these tests in its own directory should eliminate
# the problem.
mkdir -p swmr_test/.libs
mkdir swmr_test
for FILE in swmr*; do
case "$FILE" in
*.o) continue ;; ## don't copy the .o files
esac
cp $FILE swmr_test
done
cp swmr* swmr_test
# With the --disable-shared option, swmr program files are built in the test
@ -136,7 +142,13 @@ cp swmr* swmr_test
# script in the test directory. The programs or wrapper scripts in test should
# always be copied, swmr files in .libs should be copied only if they exists.
if [ -f .libs/swmr ]; then
cp .libs/swmr* swmr_test/.libs
mkdir swmr_test/.libs
for FILE in .libs/swmr*; do
case "$FILE" in
*.o) continue ;; ## don't copy the .o files
esac
cp $FILE swmr_test/.libs
done
fi
cd swmr_test
@ -536,7 +548,7 @@ done
###############################################################################
## Report and exit
###############################################################################
cd ..
$DPRINT nerrors=$nerrors
if test $nerrors -eq 0 ; then
echo "SWMR tests passed."

View File

@ -109,6 +109,31 @@ while [ $# -gt 0 ]; do
esac
done
# HDF5 has several tests that create and delete signal files to communicate
# between processes, and it seems that even though the names of the files are
# different, occasionally the wrong file is deleted, interrupting the flow of
# the test. Running each of these tests in its own directory should eliminate
# the problem.
mkdir vds_swmr_test
for FILE in vds_swmr*; do
case "$FILE" in
*.o) continue ;; ## don't copy the .o files
esac
cp $FILE vds_swmr_test
done
# With the --disable-shared option, swmr program files are built in the test
# directory, otherwise they are in test/.libs with a corresponding wrapper
# script in the test directory. The programs or wrapper scripts in test should
# always be copied, swmr files in .libs should be copied only if they exists.
if [ -f .libs/vds_swmr_writer ]; then
mkdir vds_swmr_test/.libs
cp .libs/vds_swmr* vds_swmr_test/.libs
fi
cd vds_swmr_test
echo
echo "###############################################################################"
echo "## Basic VDS SWMR test - writing to a tiled plane"
@ -187,10 +212,14 @@ fi
###############################################################################
## Report and exit
###############################################################################
cd ..
$DPRINT nerrors=$nerrors
if test $nerrors -eq 0 ; then
echo "VDS SWMR tests passed."
if test -z "$HDF5_NOCLEANUP"; then
# delete the test directory
rm -rf vds_swmr_test
fi
exit 0
else
echo "VDS SWMR tests failed with $nerrors errors."