From 1b9b228c410c6e9105198045da375f67e49554ee Mon Sep 17 00:00:00 2001 From: Thomas Egerer Date: Thu, 13 Feb 2014 08:55:13 +0100 Subject: [PATCH] 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 --- src/libstrongswan/tests/tests.c | 10 ++++++++-- 1 file 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; }