unit-tests: Add a TESTS_PLUGINS environment variable
This is often more convenient than specifying plugins in a configuration file.
This commit is contained in:
@@ -69,10 +69,14 @@ struct test_configuration_t {
|
|||||||
*
|
*
|
||||||
* - TESTS_VERBOSITY: Numerical loglevel for debug log
|
* - TESTS_VERBOSITY: Numerical loglevel for debug log
|
||||||
* - TESTS_STRONGSWAN_CONF: Specify a path to a custom strongswan.conf
|
* - TESTS_STRONGSWAN_CONF: Specify a path to a custom strongswan.conf
|
||||||
|
* - TESTS_PLUGINS: Specify an explicit list of plugins to load
|
||||||
* - TESTS_SUITES: Run specific test suites only
|
* - TESTS_SUITES: Run specific test suites only
|
||||||
* - TESTS_SUITES_EXCLUDE: Don't run specific test suites
|
* - TESTS_SUITES_EXCLUDE: Don't run specific test suites
|
||||||
* - TESTS_REDUCED_KEYLENGTHS: Test minimal keylengths for public key tests only
|
* - TESTS_REDUCED_KEYLENGTHS: Test minimal keylengths for public key tests only
|
||||||
*
|
*
|
||||||
|
* Please note that TESTS_PLUGINS actually must be implemented by the init
|
||||||
|
* callback function, as plugin loading is delegated.
|
||||||
|
*
|
||||||
* @param name name of test runner
|
* @param name name of test runner
|
||||||
* @param config test suite constructors with dependencies
|
* @param config test suite constructors with dependencies
|
||||||
* @param init_cb init/deinit callback
|
* @param init_cb init/deinit callback
|
||||||
|
|||||||
@@ -37,7 +37,8 @@ static bool test_runner_init(bool init)
|
|||||||
{
|
{
|
||||||
char *plugins, *plugindir;
|
char *plugins, *plugindir;
|
||||||
|
|
||||||
plugins = lib->settings->get_str(lib->settings,
|
plugins = getenv("TESTS_PLUGINS") ?:
|
||||||
|
lib->settings->get_str(lib->settings,
|
||||||
"tests.load", PLUGINS);
|
"tests.load", PLUGINS);
|
||||||
plugindir = lib->settings->get_str(lib->settings,
|
plugindir = lib->settings->get_str(lib->settings,
|
||||||
"tests.plugindir", PLUGINDIR);
|
"tests.plugindir", PLUGINDIR);
|
||||||
|
|||||||
Reference in New Issue
Block a user