HDFFV-10740 - skip copying dirs in for loops

This commit is contained in:
Allen Byrne 2019-09-18 11:04:09 -05:00
parent 671649f6f2
commit 624d5d9a8e
4 changed files with 54 additions and 26 deletions

View File

@ -40,7 +40,7 @@ fi
# Define symbols
EXIT_SUCCESS=0
EXIT_FAILURE=1
EXIT_VALUE=$EXIT_SUCCESS # Default all tests succeed
EXIT_VALUE=$EXIT_SUCCESS # Default all tests succeed
RESULT_PASSED=" PASSED"
RESULT_FAILED="*FAILED*"
RESULT_SKIP="-SKIP-"
@ -97,17 +97,17 @@ TOOLTEST() {
cat $actual_err >> $actual
if [ $exit_code -eq 0 ];then
echo "$RESULT_PASSED"
test yes = "$verbose" && sed 's/^/ /' < $actual
echo "$RESULT_PASSED"
test yes = "$verbose" && sed 's/^/ /' < $actual
else
echo "$RESULT_FAILED"
nerrors="`expr $nerrors + 1`"
test yes = "$verbose" && sed 's/^/ /' < $actual
echo "$RESULT_FAILED"
nerrors="`expr $nerrors + 1`"
test yes = "$verbose" && sed 's/^/ /' < $actual
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext
rm -f $actual $actual_err $actual_sav $actual_err_sav $actual_ext
fi
}
@ -122,7 +122,9 @@ for FILE in use_*; do
case "$FILE" in
*.o) continue ;; ## don't copy the .o files
esac
cp $FILE usecases_test
if test -f "$FILE" ; then
cp $FILE usecases_test
fi
done
# With the --disable-shared option, swmr program files are built in the test
@ -131,7 +133,14 @@ done
# 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
for FILE in .libs/use_*; do
case "$FILE" in
*.o) continue ;; ## don't copy the .o files
esac
if test -f "$FILE" ; then
cp $FILE usecases_test/.libs
fi
done
cp .libs/twriteorder usecases_test/.libs
fi
@ -176,10 +185,10 @@ for p in $USECASES_PROGRAMS; do
TOOLTEST ./$p -l w
TOOLTEST ./$p -l r
# use case 1.9, testing with multi-planes chunks
TOOLTEST ./$p -z 256 -y 5 # 5 planes chunks
TOOLTEST ./$p -z 256 -y 5 # 5 planes chunks
# cleanup temp datafile
if test -z "$HDF5_NOCLEANUP"; then
rm -f $p.h5
rm -f $p.h5
fi
done

View File

@ -20,7 +20,7 @@
# the verification of this feature needs to occur in separate processes
# from the one in which the file is being manipulated in. (i.e., we have
# a single writer process, and various reader processes spawning off
# and doing the verification that individual objects are being
# and doing the verification that individual objects are being
# correctly flushed).
#
# Programmer:
@ -80,23 +80,30 @@ 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 test. Running each of these tests in its own directory should eliminate
# the problem.
mkdir flushrefresh_test
cp flushrefresh flushrefresh_test
# With the --disable-shared option, flushrefresh is built in the test directory,
# otherwise it is in test/.libs with a wrapper script named flushrefresh in
# the test directory. test/flushrefresh should always be copied,
# otherwise it is in test/.libs with a wrapper script named flushrefresh in
# 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
for FILE in .libs/flushrefresh*; do
case "$FILE" in
*.o) continue ;; ## don't copy the .o files
esac
if test -f "$FILE" ; then
cp $FILE flushrefresh_test/.libs
fi
done
fi
cd flushrefresh_test
# =================================================
# Set up/initialize some variables to be used later
# Set up/initialize some variables to be used later
# =================================================
testfile=flushrefresh.h5
startsignal=flushrefresh_VERIFICATION_START
@ -119,13 +126,13 @@ pid_main=$!
# =======================================
until [ $verification_done -eq 1 ]; do
# Wait for signal from test program that verification routine can run.
before=`TimeStamp`
until [ -s $startsignal ]; do
after=`TimeStamp`
timediff=`expr $after - $before`
if [ $timediff -gt $timeout_length ]; then
if [ $timediff -gt $timeout_length ]; then
nerrors=`expr $nerrors + 1`
timedout=1
break
@ -165,7 +172,7 @@ if [ $timedout -eq 0 ]; then
until [ -s $startsignal ]; do
after=`TimeStamp`
timediff=`expr $after - $before`
if [ $timediff -gt $timeout_length ]; then
if [ $timediff -gt $timeout_length ]; then
nerrors=`expr $nerrors + 1`
timedout=1
break

View File

@ -131,9 +131,10 @@ for FILE in swmr*; do
case "$FILE" in
*.o) continue ;; ## don't copy the .o files
esac
cp $FILE swmr_test
if test -f "$FILE" ; then
cp $FILE swmr_test
fi
done
cp swmr* swmr_test
# With the --disable-shared option, swmr program files are built in the test
# directory, otherwise they are in test/.libs with a corresponding wrapper
@ -145,7 +146,9 @@ if [ -f .libs/swmr ]; then
case "$FILE" in
*.o) continue ;; ## don't copy the .o files
esac
cp $FILE swmr_test/.libs
if test -f "$FILE" ; then
cp $FILE swmr_test/.libs
fi
done
fi
@ -153,7 +156,7 @@ cd swmr_test
# Loop over index types
for index_type in "-i ea" "-i b2"
for index_type in "-i ea" "-i b2"
do
# Try with and without compression
for compress in "" "-c 5"

View File

@ -117,7 +117,9 @@ for FILE in vds_swmr*; do
case "$FILE" in
*.o) continue ;; ## don't copy the .o files
esac
cp $FILE vds_swmr_test
if test -f "$FILE" ; then
cp $FILE vds_swmr_test
fi
done
# With the --disable-shared option, swmr program files are built in the test
@ -126,7 +128,14 @@ done
# 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
for FILE in .libs/vds_swmr*; do
case "$FILE" in
*.o) continue ;; ## don't copy the .o files
esac
if test -f "$FILE" ; then
cp $FILE vds_swmr_test/.libs
fi
done
fi
cd vds_swmr_test