summaryrefslogtreecommitdiff
path: root/src/tests/test-ip6-config.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2014-04-24 21:01:58 +0200
committerThomas Haller <thaller@redhat.com>2014-06-05 18:12:58 +0200
commit8ce1eb3837df095cdd33d5595fb5ee8553e45a97 (patch)
tree80090f9069885a81e57f0a4d60a18ff97ddcf9d5 /src/tests/test-ip6-config.c
parentae863a69545fcfd995cdda661d216149efddd284 (diff)
downloadNetworkManager-8ce1eb3837df095cdd33d5595fb5ee8553e45a97.tar.gz
nmtst: add new mode where tests assert against logged messages (assert_messages)
In this mode, nmtst itself will not log anything and not set the logging level. Also, it will set g_log_set_always_fatal(). This is for tests that want to assert against all logged messages via g_test_expect_message(). In this mode also setting the logging level via NMTST_DEBUG variable has no effect. The test is expected to manage the logging level itself and changing the logging level might interfere with the test. As a showcase, move keyfile/tests/test-keyfile.c to nmtst. Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'src/tests/test-ip6-config.c')
-rw-r--r--src/tests/test-ip6-config.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tests/test-ip6-config.c b/src/tests/test-ip6-config.c
index 8d376aa3ac..75fe28eef6 100644
--- a/src/tests/test-ip6-config.c
+++ b/src/tests/test-ip6-config.c
@@ -24,6 +24,7 @@
#include "nm-ip6-config.h"
+#include "nm-logging.h"
#include "nm-test-utils.h"
static NMIP6Config *
@@ -324,7 +325,7 @@ NMTST_DEFINE();
int
main (int argc, char **argv)
{
- nmtst_init (&argc, &argv, NULL, NULL);
+ nmtst_init_with_logging (&argc, &argv, NULL, "ALL");
g_test_add_func ("/ip6-config/subtract", test_subtract);
g_test_add_func ("/ip6-config/compare-with-source", test_compare_with_source);