summaryrefslogtreecommitdiff
path: root/src/libcharon/tests/libcharon_tests.c
diff options
context:
space:
mode:
authorYves-Alexis Perez <corsac@debian.org>2016-10-20 16:18:38 +0200
committerYves-Alexis Perez <corsac@debian.org>2016-10-20 16:18:38 +0200
commit25663e04c3ab01ef8dc9f906608282319cfea2db (patch)
treea0ca5e70f66d74dbe552c996a4f3a285cdfc35e4 /src/libcharon/tests/libcharon_tests.c
parentbf372706c469764d59e9f29c39e3ecbebd72b8d2 (diff)
downloadvyos-strongswan-25663e04c3ab01ef8dc9f906608282319cfea2db.tar.gz
vyos-strongswan-25663e04c3ab01ef8dc9f906608282319cfea2db.zip
New upstream version 5.5.1
Diffstat (limited to 'src/libcharon/tests/libcharon_tests.c')
-rw-r--r--src/libcharon/tests/libcharon_tests.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/libcharon/tests/libcharon_tests.c b/src/libcharon/tests/libcharon_tests.c
index e25e5434f..1ef13e978 100644
--- a/src/libcharon/tests/libcharon_tests.c
+++ b/src/libcharon/tests/libcharon_tests.c
@@ -32,6 +32,22 @@ static test_configuration_t tests[] = {
{ .suite = NULL, }
};
+static void initialize_logging()
+{
+ int level = LEVEL_SILENT;
+ char *verbosity;
+
+ verbosity = getenv("TESTS_VERBOSITY");
+ if (verbosity)
+ {
+ level = atoi(verbosity);
+ }
+ lib->settings->set_int(lib->settings, "%s.filelog.stderr.default",
+ lib->settings->get_int(lib->settings, "%s.filelog.stderr.default",
+ level, lib->ns), lib->ns);
+ charon->load_loggers(charon, NULL, TRUE);
+}
+
static bool test_runner_init(bool init)
{
if (init)
@@ -39,6 +55,7 @@ static bool test_runner_init(bool init)
char *plugins, *plugindir;
libcharon_init();
+ initialize_logging();
plugins = getenv("TESTS_PLUGINS") ?:
lib->settings->get_str(lib->settings,