diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2021-10-25 14:27:44 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-25 14:27:44 (GMT) |
commit | 9d296c30e57105eedd3fd747c32d4ec1c9c2494d (patch) | |
tree | cf9729e211bc34514cb06041e0fdd27a97d287c6 /test/test_usecases.sh.in | |
parent | 8124798cba9292ecdbf4211e3eecbdd40b2bdda2 (diff) | |
download | hdf5-9d296c30e57105eedd3fd747c32d4ec1c9c2494d.zip hdf5-9d296c30e57105eedd3fd747c32d4ec1c9c2494d.tar.gz hdf5-9d296c30e57105eedd3fd747c32d4ec1c9c2494d.tar.bz2 |
1.10 Merge Move test utilities to utils/test folder #1109 (#1111)
* Merge Move test utilities to utils/test folder #1109
* Merge Correct shell tests and c++ flag warning
* Fix typo
Diffstat (limited to 'test/test_usecases.sh.in')
-rw-r--r-- | test/test_usecases.sh.in | 32 |
1 files changed, 26 insertions, 6 deletions
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 |