summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2021-10-21 21:09:09 (GMT)
committerGitHub <noreply@github.com>2021-10-21 21:09:09 (GMT)
commit25ef191f433f0b90cd691d6481e6259ef7f5bc65 (patch)
tree7d848a023f120fa1ba81caddf998df2c12af2fb8 /test
parent9ad1d9073c2750d7675ef7296e6ad80d50fbdc0f (diff)
downloadhdf5-25ef191f433f0b90cd691d6481e6259ef7f5bc65.zip
hdf5-25ef191f433f0b90cd691d6481e6259ef7f5bc65.tar.gz
hdf5-25ef191f433f0b90cd691d6481e6259ef7f5bc65.tar.bz2
1.12 Merge Move test utilities to utils/test folder #1109 (#1110)
* Merge Move test utilities to utils/test folder #1109 * Merge Correct shell tests and c++ flag warning * Fix typo
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt36
-rw-r--r--test/CMakeTests.cmake2
-rw-r--r--test/CMakeVFDTests.cmake14
-rw-r--r--test/Makefile.am14
-rw-r--r--test/ShellTests.cmake9
-rw-r--r--test/swmr_check_compat_vfd.c53
-rw-r--r--test/test_usecases.sh.in32
-rw-r--r--test/testflushrefresh.sh.in24
-rw-r--r--test/testswmr.sh.in38
-rw-r--r--test/testvdsswmr.sh.in12
10 files changed, 113 insertions, 121 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index f3e2db9..bac04b0 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -314,7 +314,7 @@ set (H5_TESTS
ros3
s3comms
hdfs
- mirror_vfd
+ #mirror_vfd # multiple source
ntypes
dangle
dtransform
@@ -334,6 +334,9 @@ set (H5_TESTS
timer
cmpd_dtransform
)
+if (HDF5_BUILD_UTILS)
+ set (H5_TESTS ${H5_TESTS} mirror_vfd)
+endif ()
macro (ADD_H5_EXE file)
add_executable (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c)
@@ -508,23 +511,25 @@ if (HDF5_ENABLE_FORMATTERS)
clang_format (HDF5_TEST_thread_id_FORMAT thread_id)
endif ()
+if (HDF5_BUILD_UTILS)
#-- Adding test for mirror_vfd
add_executable (mirror_vfd ${mirror_vfd_SOURCES})
-target_include_directories (mirror_vfd PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
-if (NOT BUILD_SHARED_LIBS)
- TARGET_C_PROPERTIES (mirror_vfd STATIC)
- target_link_libraries (mirror_vfd PRIVATE ${HDF5_TEST_LIB_TARGET})
-else ()
- TARGET_C_PROPERTIES (mirror_vfd SHARED)
- target_link_libraries (mirror_vfd PRIVATE ${HDF5_TEST_LIBSH_TARGET})
-endif ()
-set_target_properties (mirror_vfd PROPERTIES FOLDER test)
+ target_include_directories (mirror_vfd PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ if (NOT BUILD_SHARED_LIBS)
+ TARGET_C_PROPERTIES (mirror_vfd STATIC)
+ target_link_libraries (mirror_vfd PRIVATE ${HDF5_TEST_LIB_TARGET})
+ else ()
+ TARGET_C_PROPERTIES (mirror_vfd SHARED)
+ target_link_libraries (mirror_vfd PRIVATE ${HDF5_TEST_LIBSH_TARGET})
+ endif ()
+ set_target_properties (mirror_vfd PROPERTIES FOLDER test)
-#-----------------------------------------------------------------------------
-# Add Target to clang-format
-#-----------------------------------------------------------------------------
-if (HDF5_ENABLE_FORMATTERS)
- clang_format (HDF5_TEST_mirror_vfd_FORMAT mirror_vfd)
+ #-----------------------------------------------------------------------------
+ # Add Target to clang-format
+ #-----------------------------------------------------------------------------
+ if (HDF5_ENABLE_FORMATTERS)
+ clang_format (HDF5_TEST_mirror_vfd_FORMAT mirror_vfd)
+ endif ()
endif ()
##############################################################################
@@ -566,7 +571,6 @@ endif ()
set (H5_SWMR_TESTS
swmr_addrem_writer
- swmr_check_compat_vfd
swmr_generator
swmr_reader
swmr_remove_reader
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake
index ea39250..3ac4876 100644
--- a/test/CMakeTests.cmake
+++ b/test/CMakeTests.cmake
@@ -876,8 +876,6 @@ if (ENABLE_EXTENDED_TESTS)
# testswmr.sh: swmr*
# testvdsswmr.sh: vds_swmr*
-# add_test (NAME H5Test-swmr_check_compat_vfd COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:swmr_check_compat_vfd>)
-
#-- Adding test for flushrefresh
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/flushrefresh_test")
if (H5_PERL_FOUND)
diff --git a/test/CMakeVFDTests.cmake b/test/CMakeVFDTests.cmake
index 892ccf3..4a83c11 100644
--- a/test/CMakeVFDTests.cmake
+++ b/test/CMakeVFDTests.cmake
@@ -17,21 +17,9 @@
##############################################################################
# included from CMakeTests.cmake
-set (VFD_LIST
- sec2
- stdio
- core
- core_paged
- split
- multi
- family
-)
-if (H5_HAVE_DIRECT)
- set (VFD_LIST ${VFD_LIST} direct)
-endif ()
+H5_SET_VFD_LIST()
foreach (vfdtest ${VFD_LIST})
- file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}")
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}/testfiles")
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}/testfiles/plist_files")
endforeach ()
diff --git a/test/Makefile.am b/test/Makefile.am
index 1dfe711..27ea4f3 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -36,8 +36,7 @@ AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_builddir)/src
# test_mirror.sh: mirror_vfd ../utils/mirror_vfd/*
# test_usecases.sh: use_append_chunk, use_append_mchunks, use_disable_mdc_flushes
TEST_SCRIPT = testerror.sh testlibinfo.sh testcheck_version.sh testlinks_env.sh testexternal_env.sh \
- testswmr.sh testvds_env.sh testvdsswmr.sh testflushrefresh.sh test_usecases.sh testabort_fail.sh \
- test_mirror.sh
+ testswmr.sh testvds_env.sh testvdsswmr.sh testflushrefresh.sh test_usecases.sh testabort_fail.sh
SCRIPT_DEPEND = error_test$(EXEEXT) err_compat$(EXEEXT) links_env$(EXEEXT) \
external_env$(EXEEXT) filenotclosed$(EXEEXT) del_many_dense_attrs$(EXEEXT) \
flushrefresh$(EXEEXT) use_append_chunk$(EXEEXT) use_append_mchunks$(EXEEXT) use_disable_mdc_flushes$(EXEEXT) \
@@ -50,6 +49,10 @@ if HAVE_SHARED_CONDITIONAL
SCRIPT_DEPEND += filter_plugin$(EXEEXT) vol_plugin$(EXEEXT)
endif
+if MIRROR_VFD_CONDITIONAL
+ TEST_SCRIPT += test_mirror.sh
+endif
+
check_SCRIPTS = $(TEST_SCRIPT)
# These are our main targets. They should be listed in the order to be
@@ -91,12 +94,15 @@ check_PROGRAMS=$(TEST_PROG) error_test err_compat tcheck_version \
use_append_chunk use_append_chunk_mirror use_append_mchunks use_disable_mdc_flushes \
swmr_generator swmr_start_write swmr_reader swmr_writer swmr_remove_reader \
swmr_remove_writer swmr_addrem_writer swmr_sparse_reader swmr_sparse_writer \
- swmr_check_compat_vfd vds_env vds_swmr_gen vds_swmr_reader vds_swmr_writer \
- mirror_vfd
+ vds_env vds_swmr_gen vds_swmr_reader vds_swmr_writer
if HAVE_SHARED_CONDITIONAL
check_PROGRAMS+= filter_plugin vol_plugin
endif
+if MIRROR_VFD_CONDITIONAL
+ check_PROGRAMS+= mirror_vfd
+endif
+
# These programs generate test files for the tests. They don't need to be
# compiled every time we want to test the library. However, putting
# them in a conditional causes automake to generate rules so that they
diff --git a/test/ShellTests.cmake b/test/ShellTests.cmake
index 9614152..732091b 100644
--- a/test/ShellTests.cmake
+++ b/test/ShellTests.cmake
@@ -21,6 +21,7 @@ if (UNIX)
if (SH_PROGRAM)
set (srcdir ${HDF5_TEST_SOURCE_DIR})
set (bindir ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+ set (testdir ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
##############################################################################
# configure scripts to test dir
##############################################################################
@@ -37,7 +38,7 @@ if (UNIX)
#shell script creates dir
#file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/swmr_test")
add_custom_command (
- TARGET swmr_check_compat_vfd
+ TARGET accum_swmr_reader
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different "${HDF5_SOURCE_DIR}/bin/output_filter.sh" "${HDF5_TEST_BINARY_DIR}/H5TEST/bin/output_filter.sh"
@@ -46,9 +47,11 @@ if (UNIX)
#shell script creates dir
#file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/usecases_test")
- file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/swmr_test")
+ #shell script creates dir
+ #file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/swmr_test")
- file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/vds_swmr_test")
+ #shell script creates dir
+ #file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/vds_swmr_test")
##############################################################################
##############################################################################
diff --git a/test/swmr_check_compat_vfd.c b/test/swmr_check_compat_vfd.c
deleted file mode 100644
index 4133696..0000000
--- a/test/swmr_check_compat_vfd.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Copyright by The HDF Group. *
- * Copyright by the Board of Trustees of the University of Illinois. *
- * All rights reserved. *
- * *
- * This file is part of HDF5. The full HDF5 copyright notice, including *
- * terms governing use, modification, and redistribution, is contained in *
- * the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://www.hdfgroup.org/licenses. *
- * If you do not have access to either file, you may request a copy from *
- * help@hdfgroup.org. *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/* Purpose: This is a small program that checks if the HDF5_DRIVER
- * environment variable is set to a value that supports SWMR.
- *
- * It is intended for use in shell scripts.
- */
-
-#include "h5test.h"
-
-/* This file needs to access the file driver testing code */
-#define H5FD_FRIEND /*suppress error about including H5FDpkg */
-#define H5FD_TESTING
-#include "H5FDpkg.h" /* File drivers */
-
-/*-------------------------------------------------------------------------
- * Function: main
- *
- * Purpose: Inspects the HDF5_DRIVER environment variable, which
- * determines the VFD that the test harness will use with
- * the majority of the tests.
- *
- * Return: VFD supports SWMR: EXIT_SUCCESS
- *
- * VFD does not support SWMR
- * or failure: EXIT_FAILURE
- *
- *-------------------------------------------------------------------------
- */
-int
-main(void)
-{
- char *driver = NULL;
-
- driver = HDgetenv("HDF5_DRIVER");
-
- if (H5FD__supports_swmr_test(driver))
- return EXIT_SUCCESS;
- else
- return EXIT_FAILURE;
-
-} /* end main() */
diff --git a/test/test_usecases.sh.in b/test/test_usecases.sh.in
index eaa875e..3f7d5f1 100644
--- a/test/test_usecases.sh.in
+++ b/test/test_usecases.sh.in
@@ -21,14 +21,38 @@
# For now, it shows how to run the test cases programs. It only verifies the
# exit codes are okay (0).
+###############################################################################
+## test variables
+###############################################################################
+
+# Number of errors encountered during test run.
+nerrors=0
+
+# Define variables
+verbose=yes
+
+###############################################################################
+## Main
+###############################################################################
srcdir=@srcdir@
bindir=@bindir@
+testdir=@testdir@
+
+# The build (current) directory might be different than the source directory.
+if test -z "$srcdir"; then
+ srcdir=.
+fi
# If the bindir directory is not set just use current (.).
if test -z "$bindir"; then
bindir=.
fi
+# If the testdir directory is not set just use current (.).
+if test -z "$testdir"; then
+ testdir=.
+fi
+
# Check to see if the VFD specified by the HDF5_DRIVER environment variable
# supports SWMR.
$bindir/swmr_check_compat_vfd
@@ -53,10 +77,6 @@ RESULT_SKIP="-SKIP-"
USECASES_PROGRAMS="use_append_chunk use_append_mchunks"
TESTNAME="Use Case"
-# Define variables
-nerrors=0
-verbose=yes
-
# Source in the output filter function definitions.
. $srcdir/../bin/output_filter.sh
@@ -91,7 +111,7 @@ TOOLTEST() {
# Run test.
TESTING $program $@
(
- $RUNSERIAL $bindir/$program "$@"
+ $RUNSERIAL $testdir/$program "$@"
) >$actual 2>$actual_err
exit_code=$?
@@ -123,7 +143,7 @@ TOOLTEST() {
# the test. Running each of these tests in its own directory should eliminate
# the problem.
mkdir usecases_test
-cp twriteorder usecases_test
+cp $bindir/twriteorder usecases_test
for FILE in use_*; do
case "$FILE" in
*.o) continue ;; ## don't copy the .o files
diff --git a/test/testflushrefresh.sh.in b/test/testflushrefresh.sh.in
index 83685e8..3c7f13d 100644
--- a/test/testflushrefresh.sh.in
+++ b/test/testflushrefresh.sh.in
@@ -58,14 +58,28 @@ fi
###############################################################################
## Main
###############################################################################
+srcdir=@srcdir@
+bindir=@bindir@
+testdir=@testdir@
+
# The build (current) directory might be different than the source directory.
if test -z "$srcdir"; then
srcdir=.
fi
+# If the bindir directory is not set just use current (.).
+if test -z "$bindir"; then
+ bindir=.
+fi
+
+# If the testdir directory is not set just use current (.).
+if test -z "$testdir"; then
+ testdir=.
+fi
+
# Check to see if the VFD specified by the HDF5_DRIVER environment variable
# supports SWMR.
-./swmr_check_compat_vfd
+$bindir/swmr_check_compat_vfd
rc=$?
if [ $rc -ne 0 ] ; then
echo
@@ -83,7 +97,7 @@ fi
# the test. Running each of these tests in its own directory should eliminate
# the problem.
mkdir -p flushrefresh_test
-cp flushrefresh flushrefresh_test
+cp $bindir/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
@@ -118,7 +132,7 @@ fi
# ========================
# Launch the Test Program.
# ========================
-./flushrefresh &
+$testdir/flushrefresh &
pid_main=$!
# =======================================
@@ -155,7 +169,7 @@ until [ $verification_done -eq 1 ]; do
verification_done=1
echo "all flush verification complete" > $endsignal
else
- ./flushrefresh $param1 $param2
+ $testdir/flushrefresh $param1 $param2
# Check for core dump
if [ $? -gt 0 ]; then
@@ -200,7 +214,7 @@ if [ $timedout -eq 0 ]; then
verification_done=2
echo "all refresh verification complete" > $endsignal
else
- ./flushrefresh $param1
+ $testdir/flushrefresh $param1
# Check for core dump
if [ $? -gt 0 ]; then
diff --git a/test/testswmr.sh.in b/test/testswmr.sh.in
index 37e8f9c..cb60fce 100644
--- a/test/testswmr.sh.in
+++ b/test/testswmr.sh.in
@@ -18,6 +18,7 @@
srcdir=@srcdir@
bindir=@bindir@
+testdir=@testdir@
###############################################################################
## test parameters
@@ -103,6 +104,11 @@ if test -z "$bindir"; then
bindir=.
fi
+# If the testdir directory is not set just use current (.).
+if test -z "$testdir"; then
+ testdir=.
+fi
+
# Check to see if the VFD specified by the HDF5_DRIVER environment variable
# supports SWMR.
$bindir/swmr_check_compat_vfd
@@ -178,7 +184,7 @@ do
echo "###############################################################################"
# Launch the Generator without SWMR_WRITE
echo launch the swmr_generator
- $bindir/swmr_generator $compress $index_type
+ $testdir/swmr_generator $compress $index_type
if test $? -ne 0; then
echo generator had error
nerrors=`expr $nerrors + 1`
@@ -186,7 +192,7 @@ do
# Launch the Generator with SWMR_WRITE
echo launch the swmr_generator with SWMR_WRITE
- $bindir/swmr_generator -s $compress $index_type
+ $testdir/swmr_generator -s $compress $index_type
if test $? -ne 0; then
echo generator had error
nerrors=`expr $nerrors + 1`
@@ -210,7 +216,7 @@ do
# Launch the Writer
echo launch the swmr_start_writer
seed="" # Put -r <random seed> command here
- $bindir/swmr_start_write $compress $index_type $Nrecords $seed 2>&1 |tee swmr_writer.out &
+ $testdir/swmr_start_write $compress $index_type $Nrecords $seed 2>&1 |tee swmr_writer.out &
pid_writer=$!
$DPRINT pid_writer=$pid_writer
@@ -226,7 +232,7 @@ do
while [ $n -lt $Nreaders ]; do
#seed="-r ${seeds[$n]}"
seed=""
- $bindir/swmr_reader $Nsecs_add $seed 2>&1 |tee swmr_reader.out.$n &
+ $testdir/swmr_reader $Nsecs_add $seed 2>&1 |tee swmr_reader.out.$n &
pid_readers="$pid_readers $!"
n=`expr $n + 1`
done
@@ -271,7 +277,7 @@ do
# Launch the Generator
echo launch the swmr_generator
- $bindir/swmr_generator -s $compress $index_type
+ $testdir/swmr_generator -s $compress $index_type
if test $? -ne 0; then
echo generator had error
nerrors=`expr $nerrors + 1`
@@ -283,7 +289,7 @@ do
# Launch the Writer
echo launch the swmr_writer
seed="" # Put -r <random seed> command here
- $bindir/swmr_writer -o $Nrecords $seed 2>&1 |tee swmr_writer.out &
+ $testdir/swmr_writer -o $Nrecords $seed 2>&1 |tee swmr_writer.out &
pid_writer=$!
$DPRINT pid_writer=$pid_writer
@@ -298,7 +304,7 @@ do
while [ $n -lt $Nreaders ]; do
#seed="-r ${seeds[$n]}"
seed=""
- $bindir/swmr_reader $Nsecs_add $seed 2>&1 |tee swmr_reader.out.$n &
+ $testdir/swmr_reader $Nsecs_add $seed 2>&1 |tee swmr_reader.out.$n &
pid_readers="$pid_readers $!"
n=`expr $n + 1`
done
@@ -346,7 +352,7 @@ do
# Launch the Remove Writer
echo launch the swmr_remove_writer
seed="" # Put -r <random seed> command here
- $bindir/swmr_remove_writer -o $Nrecs_rem $seed 2>&1 |tee swmr_writer.out &
+ $testdir/swmr_remove_writer -o $Nrecs_rem $seed 2>&1 |tee swmr_writer.out &
pid_writer=$!
$DPRINT pid_writer=$pid_writer
@@ -361,7 +367,7 @@ do
while [ $n -lt $Nreaders ]; do
#seed="-r ${seeds[$n]}"
seed=""
- $bindir/swmr_remove_reader $Nsecs_rem $seed 2>&1 |tee swmr_reader.out.$n &
+ $testdir/swmr_remove_reader $Nsecs_rem $seed 2>&1 |tee swmr_reader.out.$n &
pid_readers="$pid_readers $!"
n=`expr $n + 1`
done
@@ -406,7 +412,7 @@ do
# Launch the Generator
echo launch the swmr_generator
- $bindir/swmr_generator $compress $index_type
+ $testdir/swmr_generator $compress $index_type
if test $? -ne 0; then
echo generator had error
nerrors=`expr $nerrors + 1`
@@ -415,7 +421,7 @@ do
# Launch the Writer (not in parallel - just to rebuild the datasets)
echo launch the swmr_writer
seed="" # Put -r <random seed> command here
- $bindir/swmr_writer $Nrecords $seed
+ $testdir/swmr_writer $Nrecords $seed
if test $? -ne 0; then
echo writer had error
nerrors=`expr $nerrors + 1`
@@ -427,7 +433,7 @@ do
# Launch the Add/Remove Writer
echo launch the swmr_addrem_writer
seed="" # Put -r <random seed> command here
- $bindir/swmr_addrem_writer $Nrecords $seed 2>&1 |tee swmr_writer.out &
+ $testdir/swmr_addrem_writer $Nrecords $seed 2>&1 |tee swmr_writer.out &
pid_writer=$!
$DPRINT pid_writer=$pid_writer
@@ -442,7 +448,7 @@ do
while [ $n -lt $Nreaders ]; do
#seed="-r ${seeds[$n]}"
seed=""
- $bindir/swmr_remove_reader $Nsecs_addrem $seed 2>&1 |tee swmr_reader.out.$n &
+ $testdir/swmr_remove_reader $Nsecs_addrem $seed 2>&1 |tee swmr_reader.out.$n &
pid_readers="$pid_readers $!"
n=`expr $n + 1`
done
@@ -490,7 +496,7 @@ do
# created by the generator.
echo launch the swmr_generator
seed="" # Put -r <random seed> command here
- $bindir/swmr_generator $compress $index_type $seed
+ $testdir/swmr_generator $compress $index_type $seed
if test $? -ne 0; then
echo generator had error
nerrors=`expr $nerrors + 1`
@@ -500,7 +506,7 @@ do
rm -f $WRITER_MESSAGE
# Launch the Sparse writer
echo launch the swmr_sparse_writer
- nice -n 20 $bindir/swmr_sparse_writer $Nrecs_spa 2>&1 |tee swmr_writer.out &
+ nice -n 20 $testdir/swmr_sparse_writer $Nrecs_spa 2>&1 |tee swmr_writer.out &
pid_writer=$!
$DPRINT pid_writer=$pid_writer
@@ -513,7 +519,7 @@ do
echo launch $Nrdrs_spa swmr_sparse_readers
while [ $n -lt $Nrdrs_spa ]; do
# The sparse reader spits out a LOT of data so it's set to 'quiet'
- $bindir/swmr_sparse_reader -q $Nrecs_spa 2>&1 |tee swmr_reader.out.$n &
+ $testdir/swmr_sparse_reader -q $Nrecs_spa 2>&1 |tee swmr_reader.out.$n &
pid_readers="$pid_readers $!"
n=`expr $n + 1`
done
diff --git a/test/testvdsswmr.sh.in b/test/testvdsswmr.sh.in
index 5399903..c57cc08 100644
--- a/test/testvdsswmr.sh.in
+++ b/test/testvdsswmr.sh.in
@@ -18,6 +18,7 @@
srcdir=@srcdir@
bindir=@bindir@
+testdir=@testdir@
###############################################################################
## test parameters
@@ -89,6 +90,11 @@ if test -z "$bindir"; then
bindir=.
fi
+# If the testdir directory is not set just use current (.).
+if test -z "$testdir"; then
+ testdir=.
+fi
+
# Check to see if the VFD specified by the HDF5_DRIVER environment variable
# supports SWMR.
$bindir/swmr_check_compat_vfd
@@ -154,7 +160,7 @@ echo "##########################################################################
# Launch the file generator
echo launch the generator
-$bindir/vds_swmr_gen
+$testdir/vds_swmr_gen
if test $? -ne 0; then
echo generator had error
nerrors=`expr $nerrors + 1`
@@ -172,7 +178,7 @@ echo "launch the $Nwriters SWMR VDS writers (1 per source)"
pid_writers=""
n=0
while [ $n -lt $Nwriters ]; do
- $bindir/vds_swmr_writer $n &
+ $testdir/vds_swmr_writer $n &
pid_writers="$pid_writers $!"
n=`expr $n + 1`
done
@@ -187,7 +193,7 @@ echo launch $Nreaders SWMR readers
pid_readers=""
n=0
while [ $n -lt $Nreaders ]; do
- $bindir/vds_swmr_reader &
+ $testdir/vds_swmr_reader &
pid_readers="$pid_readers $!"
n=`expr $n + 1`
done