summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_usecases.sh.in33
-rw-r--r--test/testflushrefresh.sh.in32
-rw-r--r--test/testswmr.sh.in37
-rw-r--r--test/testvdsswmr.sh.in31
4 files changed, 125 insertions, 8 deletions
diff --git a/test/test_usecases.sh.in b/test/test_usecases.sh.in
index 1cae191..a1fda0e 100644
--- a/test/test_usecases.sh.in
+++ b/test/test_usecases.sh.in
@@ -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
diff --git a/test/testflushrefresh.sh.in b/test/testflushrefresh.sh.in
index 83b7134..d894cee 100644
--- a/test/testflushrefresh.sh.in
+++ b/test/testflushrefresh.sh.in
@@ -79,11 +79,23 @@ if [ $rc -ne 0 ] ; then
exit 0
fi
-# ========================
-# Launch the Test Program.
-# ========================
-./flushrefresh &
-pid_main=$!
+# 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 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,
+# .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
# =================================================
# Set up/initialize some variables to be used later
@@ -98,6 +110,12 @@ if [ -e $testfile ]; then
rm $testfile
fi
+# ========================
+# Launch the Test Program.
+# ========================
+./flushrefresh &
+pid_main=$!
+
# =======================================
# Run flush verification on test program.
# =======================================
@@ -193,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."
diff --git a/test/testswmr.sh.in b/test/testswmr.sh.in
index c4a75e8..f70d083 100644
--- a/test/testswmr.sh.in
+++ b/test/testswmr.sh.in
@@ -123,6 +123,37 @@ 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 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
+# 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/swmr ]; then
+ 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
+
+
# Loop over index types
for index_type in "-i ea" "-i b2"
do
@@ -517,10 +548,14 @@ done
###############################################################################
## Report and exit
###############################################################################
-
+cd ..
$DPRINT nerrors=$nerrors
if test $nerrors -eq 0 ; then
echo "SWMR tests passed."
+ if test -z "$HDF5_NOCLEANUP"; then
+ # delete the test directory
+ rm -rf swmr_test
+ fi
exit 0
else
echo "SWMR tests failed with $nerrors errors."
diff --git a/test/testvdsswmr.sh.in b/test/testvdsswmr.sh.in
index d69b8c0..3ada67b 100644
--- a/test/testvdsswmr.sh.in
+++ b/test/testvdsswmr.sh.in
@@ -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."