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:
committed by
Martin Willi
parent
f406a5bf72
commit
1b9b228c41
@@ -35,8 +35,14 @@ static bool test_runner_init(bool init)
|
|||||||
{
|
{
|
||||||
if (init)
|
if (init)
|
||||||
{
|
{
|
||||||
plugin_loader_add_plugindirs(PLUGINDIR, PLUGINS);
|
char *plugins, *plugindir;
|
||||||
if (!lib->plugins->load(lib->plugins, PLUGINS))
|
|
||||||
|
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;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user