From: Thomas Egerer Date: Thu, 13 Feb 2014 07:55:13 +0000 (+0100) Subject: unit-tests: Support strongswan.conf defined plugin list and base directory X-Git-Tag: 5.2.0dr2~13^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b9b228c410c6e9105198045da375f67e49554ee;p=thirdparty%2Fstrongswan.git 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 --- diff --git a/src/libstrongswan/tests/tests.c b/src/libstrongswan/tests/tests.c index 9f2adfd157..d95ddd9d55 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; }