diff options
| author | Michael Biebl <biebl@debian.org> | 2015-12-24 00:24:58 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2015-12-24 00:24:58 +0100 |
| commit | 54f6333410ffd570e62717d9e77c5c987175e397 (patch) | |
| tree | d0698cc29d0f53c0b6d2c68d35ee2e9d72153948 /src/platform/tests/monitor.c | |
| parent | a6ece1a2aa19a6268335c87d4fdef20123dd04a5 (diff) | |
Imported Upstream version 1.0.10 upstream/1.0.10
Diffstat (limited to 'src/platform/tests/monitor.c')
| -rw-r--r-- | src/platform/tests/monitor.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/platform/tests/monitor.c b/src/platform/tests/monitor.c index 9aff1047..f1058db8 100644 --- a/src/platform/tests/monitor.c +++ b/src/platform/tests/monitor.c @@ -3,10 +3,13 @@ #include <stdlib.h> #include <syslog.h> -#include "nm-fake-platform.h" #include "nm-linux-platform.h" #include "nm-logging.h" +#include "nm-test-utils.h" + +NMTST_DEFINE (); + int main (int argc, char **argv) { @@ -16,15 +19,16 @@ main (int argc, char **argv) g_type_init (); #endif + if (!g_getenv ("G_MESSAGES_DEBUG")) + g_setenv ("G_MESSAGES_DEBUG", "all", TRUE); + + nmtst_init_with_logging (&argc, &argv, "DEBUG", "ALL"); + + nm_log_info (LOGD_PLATFORM, "platform monitor start"); + loop = g_main_loop_new (NULL, FALSE); - nm_logging_setup ("debug", NULL, NULL, NULL); - openlog (G_LOG_DOMAIN, LOG_CONS | LOG_PERROR, LOG_DAEMON); - - g_assert (argc <= 2); - if (argc > 1 && !g_strcmp0 (argv[1], "--fake")) - nm_fake_platform_setup (); - else - nm_linux_platform_setup (); + + nm_linux_platform_setup (); g_main_loop_run (loop); |