tests: print MM logs only on verbose test mode

Therefore, avoid needing ENABLE_TEST_MESSAGE_TRACES build symbol.
This commit is contained in:
Aleksander Morgado
2019-10-14 15:30:27 +02:00
parent 03223fe786
commit d5d0ed0b24
20 changed files with 60 additions and 76 deletions
+3 -3
View File
@@ -71,17 +71,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)
+3 -3
View File
@@ -411,17 +411,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)
+3 -3
View File
@@ -316,17 +316,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)
+3 -3
View File
@@ -4425,17 +4425,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
}
#define TESTCASE(t, d) g_test_create_case (#t, 0, d, NULL, (GTestFixtureFunc) t, NULL)
+3 -3
View File
@@ -444,17 +444,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
}
typedef void (*TCFunc) (TestData *, gconstpointer);
+3 -3
View File
@@ -847,17 +847,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)
+3 -3
View File
@@ -511,17 +511,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)
+3 -6
View File
@@ -22,9 +22,6 @@
#define _LIBMM_INSIDE_MM
#include <libmm-glib.h>
/* Define symbol to enable test message traces */
#undef ENABLE_TEST_MESSAGE_TRACES
#include "mm-kernel-device-generic-rules.h"
#include "mm-log.h"
@@ -53,17 +50,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)