aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/tests/tests.c
diff options
context:
space:
mode:
authorThomas Egerer <thomas.egerer@secunet.com>2014-02-13 08:55:13 +0100
committerMartin Willi <martin@revosec.ch>2014-04-30 17:22:48 +0200
commit1b9b228c410c6e9105198045da375f67e49554ee (patch)
tree38d0513c0ce74721e9441d0626083ceea54c6ff5 /src/libstrongswan/tests/tests.c
parentf406a5bf72342b7ae66ef0373d08830955f287b3 (diff)
downloadstrongswan-1b9b228c410c6e9105198045da375f67e49554ee.tar.bz2
strongswan-1b9b228c410c6e9105198045da375f67e49554ee.tar.xz
unit-tests: Support strongswan.conf defined plugin list and base directory
tests.load and tests.plugindir to allow the specification of the plugins to be loaded and the directory to load them from. Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
Diffstat (limited to 'src/libstrongswan/tests/tests.c')
-rw-r--r--src/libstrongswan/tests/tests.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/libstrongswan/tests/tests.c b/src/libstrongswan/tests/tests.c
index 9f2adfd15..d95ddd9d5 100644
--- a/src/libstrongswan/tests/tests.c
+++ b/src/libstrongswan/tests/tests.c
@@ -35,8 +35,14 @@ static bool test_runner_init(bool init)
{
if (init)
{
- plugin_loader_add_plugindirs(PLUGINDIR, PLUGINS);
- if (!lib->plugins->load(lib->plugins, PLUGINS))
+ char *plugins, *plugindir;
+
+ plugins = lib->settings->get_str(lib->settings,
+ "tests.load", PLUGINS);
+ plugindir = lib->settings->get_str(lib->settings,
+ "tests.plugindir", PLUGINDIR);
+ plugin_loader_add_plugindirs(plugindir, plugins);
+ if (!lib->plugins->load(lib->plugins, plugins))
{
return FALSE;
}