summaryrefslogtreecommitdiffstats
path: root/test/test_external_env.sh.in
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2022-03-10 18:22:16 (GMT)
committerGitHub <noreply@github.com>2022-03-10 18:22:16 (GMT)
commitb9470be379354af209daf8418b6c571dde99e776 (patch)
treeeabf683eef30f9ebaa65a5d706ba43fc410bd8f2 /test/test_external_env.sh.in
parentd5ddf61803f30e87bdfa629339fabf6fe1eb4a3c (diff)
downloadhdf5-b9470be379354af209daf8418b6c571dde99e776.zip
hdf5-b9470be379354af209daf8418b6c571dde99e776.tar.gz
hdf5-b9470be379354af209daf8418b6c571dde99e776.tar.bz2
Plugin test cleanup (#1479)
* Autotools plugin test cleanup * Combines filter, VFD, and VOL plugin tests * Adds VFD plugin tests to the Autotools * Implements a uniform shell script naming scheme in test/ * codespell fix * Changes after code review
Diffstat (limited to 'test/test_external_env.sh.in')
-rw-r--r--test/test_external_env.sh.in42
1 files changed, 42 insertions, 0 deletions
diff --git a/test/test_external_env.sh.in b/test/test_external_env.sh.in
new file mode 100644
index 0000000..94fbb88
--- /dev/null
+++ b/test/test_external_env.sh.in
@@ -0,0 +1,42 @@
+#! /bin/sh
+#
+# 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.
+#
+# Test for external file with environment variable: HDF5_EXTFILE_PREFIX
+
+srcdir=@srcdir@
+
+nerrors=0
+
+##############################################################################
+##############################################################################
+### T H E T E S T S ###
+##############################################################################
+##############################################################################
+
+# test for external file with HDF5_EXTFILE_PREFIX
+echo "Testing external file with HDF5_EXTFILE_PREFIX"
+TEST_NAME=external_env # The test name
+TEST_BIN=`pwd`/$TEST_NAME # The path of the test binary
+ENVCMD="env HDF5_EXTFILE_PREFIX=\${ORIGIN}" # The environment variable & value
+#
+# Run the test
+# echo "$ENVCMD $RUNSERIAL $TEST_BIN"
+$ENVCMD $RUNSERIAL $TEST_BIN
+exitcode=$?
+if [ $exitcode -eq 0 ]; then
+ echo "Test prefix for HDF5_EXTFILE_PREFIX PASSED"
+else
+ nerrors="`expr $nerrors + 1`"
+ echo "***Error encountered for HDF5_EXTFILE_PREFIX test***"
+fi
+exit $nerrors