summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-04-21 15:02:43 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-04-21 15:02:43 (GMT)
commitae1144f8826dcecc68ec923bb7261f2a8153735c (patch)
treec60e4f11bfad27b388de0bf28ad354ab5c1ba9a7 /test
parent4e11e6dd375c26f2dcd35a5b55c7e7fd76069891 (diff)
downloadhdf5-ae1144f8826dcecc68ec923bb7261f2a8153735c.zip
hdf5-ae1144f8826dcecc68ec923bb7261f2a8153735c.tar.gz
hdf5-ae1144f8826dcecc68ec923bb7261f2a8153735c.tar.bz2
HDFFV-9655 fix compile and test
Diffstat (limited to 'test')
-rw-r--r--test/CMakeTests.cmake6
-rw-r--r--test/test_plugin.sh.in33
2 files changed, 27 insertions, 12 deletions
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake
index f372acf..959fe64 100644
--- a/test/CMakeTests.cmake
+++ b/test/CMakeTests.cmake
@@ -996,6 +996,12 @@ set_tests_properties (H5PLUGIN-plugin PROPERTIES
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}
)
+add_test (NAME H5PLUGIN-pluginRelative COMMAND $<TARGET_FILE:plugin>)
+set_tests_properties (H5PLUGIN-pluginRelative PROPERTIES
+ ENVIRONMENT "HDF5_PLUGIN_PATH=@/../testdir1${CMAKE_SEP}@/../testdir2;srcdir=${HDF5_TEST_BINARY_DIR}"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}
+)
+
##############################################################################
### S W M R T E S T S
##############################################################################
diff --git a/test/test_plugin.sh.in b/test/test_plugin.sh.in
index 1cd87e3..1e6d9d9 100644
--- a/test/test_plugin.sh.in
+++ b/test/test_plugin.sh.in
@@ -1,16 +1,16 @@
#! /bin/sh
#
-# Copyright by The HDF Group.
-# 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 files COPYING and Copyright.html. COPYING can be found at the root
-# of the source code distribution tree; Copyright.html can be found at the
-# root level of an installed copy of the electronic document set and is
-# linked from the top-level documents page. It can also be found at
-# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access
-# to either file, you may request a copy from help@hdfgroup.org.
+# Copyright by The HDF Group.
+# 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 files COPYING and Copyright.html. COPYING can be found at the root
+# of the source code distribution tree; Copyright.html can be found at the
+# root level of an installed copy of the electronic document set and is
+# linked from the top-level documents page. It can also be found at
+# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access
+# to either file, you may request a copy from help@hdfgroup.org.
#
srcdir=@srcdir@
TOP_BUILDDIR=@top_builddir@
@@ -40,7 +40,7 @@ case $(uname) in
esac
PLUGIN_LIBDIR1=testdir1
PLUGIN_LIBDIR2=testdir2
-CP="cp -p" # Use -p to preserve mode,ownership,timestamps
+CP="cp -p" # Use -p to preserve mode,ownership,timestamps
RM="rm -rf"
# Print a line-line message left justified in a field of 70 characters
@@ -87,6 +87,15 @@ if [ $? != 0 ]; then
nerrors=`expr $nerrors + 1`
fi
+# setup plugin path relative to test
+ENVCMD="env HDF5_PLUGIN_PATH=@/${PLUGIN_LIBDIR1}:@/${PLUGIN_LIBDIR2}"
+
+# Run the test
+$ENVCMD $TEST_BIN
+if [ $? != 0 ]; then
+ nerrors=`expr $nerrors + 1`
+fi
+
# print results
if test $nerrors -ne 0 ; then
echo "$nerrors errors encountered"