From d5d0ed0b24eecb12f93c9b8ce65ac59fe188f60a Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Mon, 14 Oct 2019 15:09:28 +0200 Subject: tests: print MM logs only on verbose test mode Therefore, avoid needing ENABLE_TEST_MESSAGE_TRACES build symbol. --- plugins/tests/test-udev-rules.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'plugins/tests/test-udev-rules.c') diff --git a/plugins/tests/test-udev-rules.c b/plugins/tests/test-udev-rules.c index 581adcad..f6dc6f41 100644 --- a/plugins/tests/test-udev-rules.c +++ b/plugins/tests/test-udev-rules.c @@ -22,9 +22,6 @@ #define _LIBMM_INSIDE_MM #include -/* Define symbol to enable test message traces */ -#undef ENABLE_TEST_MESSAGE_TRACES - #include "mm-kernel-device-generic-rules.h" #include "mm-log.h" @@ -133,17 +130,17 @@ _mm_log (const char *loc, const char *fmt, ...) { -#if defined ENABLE_TEST_MESSAGE_TRACES - /* Dummy log function */ va_list args; gchar *msg; + if (!g_test_verbose ()) + return; + va_start (args, fmt); msg = g_strdup_vprintf (fmt, args); va_end (args); g_print ("%s\n", msg); g_free (msg); -#endif } int main (int argc, char **argv) -- cgit v1.2.3-70-g09d2