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 <[email protected]>
This commit is contained in:
Thomas Egerer
2014-04-30 17:22:48 +02:00
committed by Martin Willi
parent f406a5bf72
commit 1b9b228c41
+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;
}