about summary refs log tree commit diff
path: root/src/platform/tests/monitor.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2015-12-24 00:25:15 +0100
committerMichael Biebl <biebl@debian.org>2015-12-24 00:25:15 +0100
commit95fc418c29eaf71c43ee0dddc4515580b9ec1461 (patch)
treec785190da048e63173bd573d7e8c565f3d28488d /src/platform/tests/monitor.c
parent46654959ce8acc3b92a92e931920365c3b2dab0d (diff)
parent54f6333410ffd570e62717d9e77c5c987175e397 (diff)
Merge tag 'upstream/1.0.10'
Upstream version 1.0.10
Diffstat (limited to 'src/platform/tests/monitor.c')
-rw-r--r--src/platform/tests/monitor.c22
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);