summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2021-12-10 05:06:53 (GMT)
committerGitHub <noreply@github.com>2021-12-10 05:06:53 (GMT)
commit5580d7ec815e506370c4b1d68fc5ed089442e15d (patch)
tree5416be32e3251eeb809c1f16781d3e22644536f2 /test
parent364d8cc3e749bcee4486897b6703f9ac7a303225 (diff)
downloadhdf5-5580d7ec815e506370c4b1d68fc5ed089442e15d.zip
hdf5-5580d7ec815e506370c4b1d68fc5ed089442e15d.tar.gz
hdf5-5580d7ec815e506370c4b1d68fc5ed089442e15d.tar.bz2
Fix directory variable in shell scripts (#1273)
* Fix testswmr scripts with utils/test variable * Change format of configure var assignment * quote the variable value in configure * Use sh.in expected var pattern * Only ref builddir in script * Create vars for utils/test and test as H5_<path>_BUILDDIR * Use abs_top_builddir in test scripts * Change script var to make it easier to read. * Use @abs_top_builddir@ directly in paths * Correct typos/comment
Diffstat (limited to 'test')
-rw-r--r--test/ShellTests.cmake8
-rw-r--r--test/test_usecases.sh.in23
-rw-r--r--test/testflushrefresh.sh.in23
-rw-r--r--test/testswmr.pwsh.in59
-rw-r--r--test/testswmr.sh.in24
-rw-r--r--test/testvdsswmr.pwsh.in36
-rw-r--r--test/testvdsswmr.sh.in24
7 files changed, 51 insertions, 146 deletions
diff --git a/test/ShellTests.cmake b/test/ShellTests.cmake
index a6fda87..e7de735 100644
--- a/test/ShellTests.cmake
+++ b/test/ShellTests.cmake
@@ -22,8 +22,8 @@ if (PWSH)
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST/vds_swmr_test")
set (srcdir ${HDF5_TEST_SOURCE_DIR})
- set (bindir ${CMAKE_TEST_OUTPUT_DIRECTORY})
- set (testdir ${HDF5_TEST_BINARY_DIR}/H5TEST)
+ set (H5_UTILS_TEST_BUILDDIR ${CMAKE_TEST_OUTPUT_DIRECTORY})
+ set (H5_TEST_BUILDDIR ${HDF5_TEST_BINARY_DIR}/H5TEST)
configure_file(${HDF5_TEST_SOURCE_DIR}/testswmr.pwsh.in ${HDF5_TEST_BINARY_DIR}/H5TEST/testswmr.ps1 @ONLY)
# test commented out as currently the programs are not allowing another access to the data file
#add_test (H5SHELL-testswmr ${PWSH} ${HDF5_TEST_BINARY_DIR}/H5TEST/testswmr.ps1)
@@ -42,8 +42,8 @@ elseif (UNIX)
find_program (SH_PROGRAM bash)
if (SH_PROGRAM)
set (srcdir ${HDF5_TEST_SOURCE_DIR})
- set (bindir ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
- set (testdir ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+ set (H5_UTILS_TEST_BUILDDIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
+ set (H5_TEST_BUILDDIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
##############################################################################
# configure scripts to test dir
##############################################################################
diff --git a/test/test_usecases.sh.in b/test/test_usecases.sh.in
index 3f7d5f1..fd30afd 100644
--- a/test/test_usecases.sh.in
+++ b/test/test_usecases.sh.in
@@ -35,27 +35,12 @@ 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
+utils_testdir=@abs_top_builddir@/@H5_UTILS_TEST_BUILDDIR@
+testdir=@abs_top_builddir@/@H5_TEST_BUILDDIR@
# Check to see if the VFD specified by the HDF5_DRIVER environment variable
# supports SWMR.
-$bindir/swmr_check_compat_vfd
+$utils_testdir/swmr_check_compat_vfd
rc=$?
if [[ $rc != 0 ]] ; then
echo
@@ -143,7 +128,7 @@ TOOLTEST() {
# the test. Running each of these tests in its own directory should eliminate
# the problem.
mkdir usecases_test
-cp $bindir/twriteorder usecases_test
+cp $testdir/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 3c7f13d..209d370 100644
--- a/test/testflushrefresh.sh.in
+++ b/test/testflushrefresh.sh.in
@@ -59,27 +59,12 @@ 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
+utils_testdir=@abs_top_builddir@/@H5_UTILS_TEST_BUILDDIR@
+testdir=@abs_top_builddir@/@H5_TEST_BUILDDIR@
# Check to see if the VFD specified by the HDF5_DRIVER environment variable
# supports SWMR.
-$bindir/swmr_check_compat_vfd
+$utils_testdir/swmr_check_compat_vfd
rc=$?
if [ $rc -ne 0 ] ; then
echo
@@ -97,7 +82,7 @@ fi
# the test. Running each of these tests in its own directory should eliminate
# the problem.
mkdir -p flushrefresh_test
-cp $bindir/flushrefresh flushrefresh_test
+cp $testdir/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
diff --git a/test/testswmr.pwsh.in b/test/testswmr.pwsh.in
index c2cc97e..de7a57a 100644
--- a/test/testswmr.pwsh.in
+++ b/test/testswmr.pwsh.in
@@ -11,8 +11,8 @@
# Tests for the swmr feature.
$srcdir = '@srcdir@'
-$bindir = '@bindir@'
-$testdir = '@testdir@'
+$utils_testdir=@H5_UTILS_TEST_BUILDDIR@
+$testdir=@H5_TEST_BUILDDIR@
###############################################################################
## test parameters
@@ -32,9 +32,9 @@ $nerrors = 0
## definitions for message file to coordinate test runs
###############################################################################
$WRITER_MESSAGE = 'SWMR_WRITER_MESSAGE' # The message file created by writer that the open is complete
- # This should be the same as the define in "$bindir/swmr_common.h"
+ # This should be the same as the define in "test/swmr_common.h"
$MESSAGE_TIMEOUT = 300 # Message timeout length in secs
- # This should be the same as the define in "./h5test.h"
+ # This should be the same as the define in "test/h5test.h"
# Print a line-line message left justified in a field of 70 characters
# beginning with the word "Testing".
@@ -93,27 +93,10 @@ function Wait-Message {
## to proceed as expected.
##
###############################################################################
-# The build (current) directory might be different than the source directory.
-if (![System.IO.Directory]::Exists($srcdir)) {
- $srcdir = Get-Location
- Write-Output "Setting srcdir to default: $srcdir"
-}
-
-# If the bindir directory is not set just use current (.).
-if (![System.IO.Directory]::Exists($bindir)) {
- $bindir = Get-Location
- Write-Output "Setting bindir to default: $bindir"
-}
-
-# If the testdir directory is not set just use current (.).
-if (![System.IO.Directory]::Exists($testdir)) {
- $testdir = Get-Location
- Write-Output "Setting testdir to default: $testdir"
-}
# Check to see if the VFD specified by the HDF5_DRIVER environment variable
# supports SWMR.
-$testprog = Join-Path -Path $bindir -ChildPath swmr_check_compat_vfd.exe
+$testprog = Join-Path -Path $utils_testdir -ChildPath swmr_check_compat_vfd.exe
$rp = Start-Process -FilePath $testprog -PassThru -Wait -NoNewWindow
if ($rp.ExitCode -ne 0) {
Write-Output ""
@@ -145,7 +128,7 @@ foreach ($index_type in $IndexTypeLoop) {
Write-Output "###############################################################################"
# Launch the Generator without SWMR_WRITE
Write-Output "launch the swmr_generator"
- $rp = Start-Process -FilePath $bindir/swmr_generator.exe -NoNewWindow -ArgumentList "$compress $index_type" -PassThru -Wait
+ $rp = Start-Process -FilePath $testdir/swmr_generator.exe -NoNewWindow -ArgumentList "$compress $index_type" -PassThru -Wait
if ($rp.ExitCode -ne 0) {
Write-Warning "generator had error"
$nerrors += 1
@@ -153,7 +136,7 @@ foreach ($index_type in $IndexTypeLoop) {
# Launch the Generator with SWMR_WRITE
Write-Output "launch the swmr_generator with SWMR_WRITE"
- $rp = Start-Process -FilePath $bindir/swmr_generator.exe -NoNewWindow -ArgumentList "-s $compress $index_type" -PassThru -Wait
+ $rp = Start-Process -FilePath $testdir/swmr_generator.exe -NoNewWindow -ArgumentList "-s $compress $index_type" -PassThru -Wait
if ($rp.ExitCode -ne 0) {
Write-Warning "generator had error"
$nerrors += 1
@@ -179,7 +162,7 @@ foreach ($index_type in $IndexTypeLoop) {
# Launch the Writer
Write-Output "launch the swmr_start_writer"
$seed = "" # Put -r <random seed> command here
- $rp = Start-Process -FilePath $bindir/swmr_start_write.exe -NoNewWindow -PassThru -ArgumentList "$compress $index_type $Nrecords $seed" 2>&1 |tee swmr_writer.out
+ $rp = Start-Process -FilePath $testdir/swmr_start_write.exe -NoNewWindow -PassThru -ArgumentList "$compress $index_type $Nrecords $seed" 2>&1 |tee swmr_writer.out
$pid_writer = $rp.id
#Write-Output "pid_writer=$pid_writer"
@@ -195,7 +178,7 @@ foreach ($index_type in $IndexTypeLoop) {
while ($n -lt $Nreaders) {
#seed = "-r ${seeds[$n]}"
$seed = ""
- $rp = Start-Process -FilePath $bindir/swmr_reader.exe -NoNewWindow -PassThru -ArgumentList "$Nsecs_add $seed" 2>&1 | tee swmr_reader.out.$n
+ $rp = Start-Process -FilePath $testdir/swmr_reader.exe -NoNewWindow -PassThru -ArgumentList "$Nsecs_add $seed" 2>&1 | tee swmr_reader.out.$n
$pid_readers += $rp.id
$n += 1
}
@@ -239,7 +222,7 @@ foreach ($index_type in $IndexTypeLoop) {
# Launch the Generator
Write-Output "launch the swmr_generator"
- $rp = Start-Process -FilePath $bindir/swmr_generator.exe -NoNewWindow -PassThru -Wait -ArgumentList "-s $compress $index_type"
+ $rp = Start-Process -FilePath $testdir/swmr_generator.exe -NoNewWindow -PassThru -Wait -ArgumentList "-s $compress $index_type"
if ($rp.ExitCode -ne 0) {
Write-Warning "generator had error"
$nerrors += 1
@@ -251,7 +234,7 @@ foreach ($index_type in $IndexTypeLoop) {
# Launch the Writer
Write-Output "launch the swmr_writer"
$seed = "" # Put -r <random seed> command here
- $rp = Start-Process -FilePath $bindir/swmr_writer.exe -NoNewWindow -PassThru -ArgumentList "-o $Nrecords $seed" 2>&1 |tee swmr_writer.out
+ $rp = Start-Process -FilePath $testdir/swmr_writer.exe -NoNewWindow -PassThru -ArgumentList "-o $Nrecords $seed" 2>&1 |tee swmr_writer.out
$pid_writer = $rp.id
#Write-Output "pid_writer=$pid_writer"
@@ -266,7 +249,7 @@ foreach ($index_type in $IndexTypeLoop) {
while ($n -lt $Nreaders) {
#seed = "-r ${seeds[$n]}"
$seed = ""
- $rp = Start-Process -FilePath $bindir/swmr_reader.exe -NoNewWindow -PassThru -ArgumentList "$Nsecs_add $seed" 2>&1 |tee swmr_reader.out.$n
+ $rp = Start-Process -FilePath $testdir/swmr_reader.exe -NoNewWindow -PassThru -ArgumentList "$Nsecs_add $seed" 2>&1 |tee swmr_reader.out.$n
$pid_readers += $rp.id
$n += 1
}
@@ -313,7 +296,7 @@ foreach ($index_type in $IndexTypeLoop) {
# Launch the Remove Writer
Write-Output "launch the swmr_remove_writer"
$seed = "" # Put -r <random seed> command here
- $rp = Start-Process -FilePath $bindir/swmr_remove_writer.exe -NoNewWindow -PassThru -ArgumentList "-o $Nrecs_rem $seed" 2>&1 |tee swmr_writer.out
+ $rp = Start-Process -FilePath $testdir/swmr_remove_writer.exe -NoNewWindow -PassThru -ArgumentList "-o $Nrecs_rem $seed" 2>&1 |tee swmr_writer.out
$pid_writer = $rp.id
#Write-Output "pid_writer=$pid_writer"
@@ -328,7 +311,7 @@ foreach ($index_type in $IndexTypeLoop) {
while ($n -lt $Nreaders) {
#seed = "-r ${seeds[$n]}"
$seed = ""
- $rp = Start-Process -FilePath $bindir/swmr_remove_reader.exe -NoNewWindow -PassThru -ArgumentList "$Nsecs_rem $seed" 2>&1 |tee swmr_reader.out.$n
+ $rp = Start-Process -FilePath $testdir/swmr_remove_reader.exe -NoNewWindow -PassThru -ArgumentList "$Nsecs_rem $seed" 2>&1 |tee swmr_reader.out.$n
$pid_readers += $rp.id
$n += 1
}
@@ -372,7 +355,7 @@ foreach ($index_type in $IndexTypeLoop) {
# Launch the Generator
Write-Output "launch the swmr_generator"
- $rp = Start-Process -FilePath $bindir/swmr_generator.exe -NoNewWindow-PassThru -Wait -ArgumentList "$compress $index_type"
+ $rp = Start-Process -FilePath $testdir/swmr_generator.exe -NoNewWindow-PassThru -Wait -ArgumentList "$compress $index_type"
if ($rp.ExitCode -ne 0) {
Write-Warning "generator had error"
$nerrors += 1
@@ -381,7 +364,7 @@ foreach ($index_type in $IndexTypeLoop) {
# Launch the Writer (not in parallel - just to rebuild the datasets)
Write-Output "launch the swmr_writer"
$seed = "" # Put -r <random seed> command here
- $rp = Start-Process -FilePath $bindir/swmr_writer.exe -NoNewWindow -PassThru -Wait -ArgumentList "$Nrecords $seed"
+ $rp = Start-Process -FilePath $testdir/swmr_writer.exe -NoNewWindow -PassThru -Wait -ArgumentList "$Nrecords $seed"
if ($rp.ExitCode -ne 0) {
Write-Warning "writer had error"
$nerrors += 1
@@ -393,7 +376,7 @@ foreach ($index_type in $IndexTypeLoop) {
# Launch the Add/Remove Writer
Write-Output "launch the swmr_addrem_writer"
$seed = "" # Put -r <random seed> command here
- $rp = Start-Process -FilePath $bindir/swmr_addrem_writer.exe -NoNewWindow -PassThru -ArgumentList "$Nrecords $seed" 2>&1 |tee swmr_writer.out
+ $rp = Start-Process -FilePath $testdir/swmr_addrem_writer.exe -NoNewWindow -PassThru -ArgumentList "$Nrecords $seed" 2>&1 |tee swmr_writer.out
$pid_writer = $rp.id
#Write-Output "pid_writer=$pid_writer"
@@ -408,7 +391,7 @@ foreach ($index_type in $IndexTypeLoop) {
while ($n -lt $Nreaders) {
#seed = "-r ${seeds[$n]}"
$seed = ""
- $rp = Start-Process -FilePath $bindir/swmr_remove_reader.exe -NoNewWindow -PassThru -ArgumentList "$Nsecs_addrem $seed" 2>&1 |tee swmr_reader.out.$n
+ $rp = Start-Process -FilePath $testdir/swmr_remove_reader.exe -NoNewWindow -PassThru -ArgumentList "$Nsecs_addrem $seed" 2>&1 |tee swmr_reader.out.$n
$pid_readers += $rp.id
$n += 1
}
@@ -455,7 +438,7 @@ foreach ($index_type in $IndexTypeLoop) {
# created by the generator.
Write-Output "launch the swmr_generator"
$seed = "" # Put -r <random seed> command here
- $rp = Start-Process -FilePath $bindir/swmr_generator.exe -NoNewWindow -PassThru -Wait -ArgumentList "$compress $index_type $seed"
+ $rp = Start-Process -FilePath $testdir/swmr_generator.exe -NoNewWindow -PassThru -Wait -ArgumentList "$compress $index_type $seed"
if ($rp.ExitCode -ne 0) {
Write-Warning "generator had error"
$nerrors += 1
@@ -465,7 +448,7 @@ foreach ($index_type in $IndexTypeLoop) {
Remove-Item $WRITER_MESSAGE
# Launch the Sparse writer
Write-Output "launch the swmr_sparse_writer"
- $rp = Start-Process -FilePath $bindir/swmr_sparse_writer.exe -NoNewWindow -PassThru -ArgumentList "$Nrecs_spa" 2>&1 |tee swmr_writer.out
+ $rp = Start-Process -FilePath $testdir/swmr_sparse_writer.exe -NoNewWindow -PassThru -ArgumentList "$Nrecs_spa" 2>&1 |tee swmr_writer.out
$pid_writer = $rp.Id
#Write-Output "pid_writer=$pid_writer"
@@ -478,7 +461,7 @@ foreach ($index_type in $IndexTypeLoop) {
Write-Output "launch $Nrdrs_spa swmr_sparse_readers"
while ($n -lt $Nrdrs_spa) {
# The sparse reader spits out a LOT of data so it's set to 'quiet'
- $rp = Start-Process -FilePath $bindir/swmr_sparse_reader.exe -NoNewWindow -PassThru -ArgumentList "-q $Nrecs_spa" 2>&1 |tee swmr_reader.out.$n
+ $rp = Start-Process -FilePath $testdir/swmr_sparse_reader.exe -NoNewWindow -PassThru -ArgumentList "-q $Nrecs_spa" 2>&1 |tee swmr_reader.out.$n
$pid_readers += $rp.id
$n += 1
}
diff --git a/test/testswmr.sh.in b/test/testswmr.sh.in
index 65bf821..771fe4a 100644
--- a/test/testswmr.sh.in
+++ b/test/testswmr.sh.in
@@ -17,8 +17,8 @@
# Albert Cheng, 2009/07/22
srcdir=@srcdir@
-bindir=@bindir@
-testdir=@testdir@
+utils_testdir=@abs_top_builddir@/@H5_UTILS_TEST_BUILDDIR@
+testdir=@abs_top_builddir@/@H5_TEST_BUILDDIR@
###############################################################################
## test parameters
@@ -38,9 +38,9 @@ nerrors=0
## definitions for message file to coordinate test runs
###############################################################################
WRITER_MESSAGE=SWMR_WRITER_MESSAGE # The message file created by writer that the open is complete
- # This should be the same as the define in "./swmr_common.h"
+ # This should be the same as the define in "test/swmr_common.h"
MESSAGE_TIMEOUT=300 # Message timeout length in secs
- # This should be the same as the define in "./h5test.h"
+ # This should be the same as the define in "test/h5test.h"
###############################################################################
## short hands and function definitions
@@ -94,24 +94,10 @@ WAIT_MESSAGE() {
## to proceed as expected.
##
###############################################################################
-# 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
+$utils_testdir/swmr_check_compat_vfd
rc=$?
if [ $rc -ne 0 ] ; then
echo
diff --git a/test/testvdsswmr.pwsh.in b/test/testvdsswmr.pwsh.in
index 4e06649..bf5aabb 100644
--- a/test/testvdsswmr.pwsh.in
+++ b/test/testvdsswmr.pwsh.in
@@ -9,13 +9,10 @@
# help@hdfgroup.org.
#
# Tests for the swmr feature using virtual datasets.
-#
-# Created:
-# Dana Robinson, November 2015
$srcdir = '@srcdir@'
-$bindir = '@bindir@'
-$testdir = '@testdir@'
+$utils_testdir=@H5_UTILS_TEST_BUILDDIR@
+$testdir=@H5_TEST_BUILDDIR@
###############################################################################
## test parameters
@@ -29,9 +26,9 @@ $nerrors = 0
## definitions for message file to coordinate test runs
###############################################################################
$WRITER_MESSAGE = 'SWMR_WRITER_MESSAGE' # The message file created by writer that the open is complete
- # This should be the same as the define in "$bindir/swmr_common.h"
+ # This should be the same as the define in "test/swmr_common.h"
$MESSAGE_TIMEOUT = 300 # Message timeout length in secs
- # This should be the same as the define in "./h5test.h"
+ # This should be the same as the define in "test/h5test.h"
# Print a line-line message left justified in a field of 70 characters
# beginning with the word "Testing".
@@ -82,27 +79,10 @@ function Wait-Message {
###############################################################################
## Main
###############################################################################
-# The build (current) directory might be different than the source directory.
-if (![System.IO.Directory]::Exists($srcdir)) {
- $srcdir = Get-Location
- Write-Output "Setting srcdir to default: $srcdir"
-}
-
-# If the bindir directory is not set just use current (.).
-if (![System.IO.Directory]::Exists($bindir)) {
- $bindir = Get-Location
- Write-Output "Setting bindir to default: $bindir"
-}
-
-# If the testdir directory is not set just use current (.).
-if (![System.IO.Directory]::Exists($testdir)) {
- $testdir = Get-Location
- Write-Output "Setting testdir to default: $testdir"
-}
# Check to see if the VFD specified by the HDF5_DRIVER environment variable
# supports SWMR.
-$testprog = Join-Path -Path $bindir -ChildPath swmr_check_compat_vfd.exe
+$testprog = Join-Path -Path $utils_testdir -ChildPath swmr_check_compat_vfd.exe
$rp = Start-Process -FilePath $testprog -PassThru -Wait -NoNewWindow
if ($rp.ExitCode -ne 0) {
Write-Output ""
@@ -124,7 +104,7 @@ Write-Output "##################################################################
# Launch the file generator
Write-Output "launch the swmr_generator"
-$rp = Start-Process -FilePath $bindir/vds_swmr_gen.exe -NoNewWindow -PassThru -Wait
+$rp = Start-Process -FilePath $testdir/vds_swmr_gen.exe -NoNewWindow -PassThru -Wait
if ($rp.ExitCode -ne 0) {
Write-Warning "generator had error"
$nerrors += 1
@@ -142,7 +122,7 @@ Write-Output "launch the $Nwriters SWMR VDS writers (1 per source)"
$pid_writers = @()
$n = 0
while ($n -lt $Nwriters) {
- $rp = Start-Process -FilePath $bindir/vds_swmr_writer.exe -NoNewWindow -PassThru -ArgumentList "$n" 2>&1 | tee swmr_writer.out.$n
+ $rp = Start-Process -FilePath $testdir/vds_swmr_writer.exe -NoNewWindow -PassThru -ArgumentList "$n" 2>&1 | tee swmr_writer.out.$n
$pid_writers += $rp.id
$n += 1
}
@@ -156,7 +136,7 @@ Write-Output "launch $Nreaders SWMR readers"
$pid_readers = @()
$n = 0
while ($n -lt $Nreaders) {
- $rp = Start-Process -FilePath $bindir/vds_swmr_reader.exe -NoNewWindow -PassThru 2>&1 | tee swmr_reader.out.$n
+ $rp = Start-Process -FilePath $testdir/vds_swmr_reader.exe -NoNewWindow -PassThru 2>&1 | tee swmr_reader.out.$n
$pid_readers += $rp.id
$n += 1
}
diff --git a/test/testvdsswmr.sh.in b/test/testvdsswmr.sh.in
index 9ca3689..399fdef 100644
--- a/test/testvdsswmr.sh.in
+++ b/test/testvdsswmr.sh.in
@@ -17,8 +17,8 @@
# Dana Robinson, November 2015
srcdir=@srcdir@
-bindir=@bindir@
-testdir=@testdir@
+utils_testdir=@abs_top_builddir@/@H5_UTILS_TEST_BUILDDIR@
+testdir=@abs_top_builddir@/@H5_TEST_BUILDDIR@
###############################################################################
## test parameters
@@ -32,9 +32,9 @@ nerrors=0
## definitions for message file to coordinate test runs
###############################################################################
WRITER_MESSAGE=SWMR_WRITER_MESSAGE # The message file created by writer that the open is complete
- # This should be the same as the define in "$bindir/swmr_common.h"
+ # This should be the same as the define in "test/swmr_common.h"
MESSAGE_TIMEOUT=300 # Message timeout length in secs
- # This should be the same as the define in "./h5test.h"
+ # This should be the same as the define in "test/h5test.h"
###############################################################################
## short hands and function definitions
@@ -80,24 +80,10 @@ WAIT_MESSAGE() {
###############################################################################
## Main
###############################################################################
-# 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
+$utils_testdir/swmr_check_compat_vfd
rc=$?
if [ $rc -ne 0 ] ; then
echo