summaryrefslogtreecommitdiffstats
path: root/test/testswmr.sh.in
diff options
context:
space:
mode:
authorlrknox <lrknox>2017-03-17 22:24:21 (GMT)
committerlrknox <lrknox>2017-03-17 22:24:21 (GMT)
commit42141478f275676e7d6c940d821d21bd89c451db (patch)
tree513da2391593f53dc97b3a00d2ca2f7556292071 /test/testswmr.sh.in
parent983658973b514fa25a831e31d5dc22e585d00b47 (diff)
downloadhdf5-42141478f275676e7d6c940d821d21bd89c451db.zip
hdf5-42141478f275676e7d6c940d821d21bd89c451db.tar.gz
hdf5-42141478f275676e7d6c940d821d21bd89c451db.tar.bz2
Run swmr tests in their own subdirectory of test to avoid signal
file deletion by other tests.
Diffstat (limited to 'test/testswmr.sh.in')
-rw-r--r--test/testswmr.sh.in23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/testswmr.sh.in b/test/testswmr.sh.in
index c4a75e8..85e169a 100644
--- a/test/testswmr.sh.in
+++ b/test/testswmr.sh.in
@@ -123,6 +123,25 @@ 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 -p swmr_test/.libs
+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
+ cp .libs/swmr* swmr_test/.libs
+fi
+
+cd swmr_test
+
+
# Loop over index types
for index_type in "-i ea" "-i b2"
do
@@ -521,6 +540,10 @@ done
$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."