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>
This commit is contained in:
Thomas Egerer authored and Martin Willi committed 2014-04-30 17:22:48 +02:00
1 parent f406a5bf72
commit 1b9b228c41
1 file changed
+8 -2
+8 -2
View File
@@ -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;
}