diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2013-11-03 19:13:48 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2013-11-10 20:21:46 +0100 |
commit | e30b3920d6309c7f265bacfa6c1e0915d1f13281 (patch) | |
tree | 3a09f021c803caa74026ad2ef614a13d4432aa09 | |
parent | 3d4c143b40285b1ce6d5d0b502ddea50245a6ae5 (diff) | |
download | ModemManager-e30b3920d6309c7f265bacfa6c1e0915d1f13281.tar.gz |
huawei,tests: enable log traces in the tests
-rw-r--r-- | plugins/Makefile.am | 4 | ||||
-rw-r--r-- | plugins/huawei/mm-modem-helpers-huawei.h | 3 | ||||
-rw-r--r-- | plugins/huawei/tests/test-modem-helpers-huawei.c | 25 |
3 files changed, 31 insertions, 1 deletions
diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 478ea78d1..5c3a8b0dc 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -132,7 +132,9 @@ test_modem_helpers_huawei_SOURCES = \ test_modem_helpers_huawei_CPPFLAGS = \ -I$(top_srcdir)/plugins/huawei \ $(PLUGIN_COMMON_COMPILER_FLAGS) -test_modem_helpers_huawei_LDADD = $(top_builddir)/libmm-glib/libmm-glib.la +test_modem_helpers_huawei_LDADD = \ + $(top_builddir)/libmm-glib/libmm-glib.la \ + $(top_builddir)/src/libmodem-helpers.la test_modem_helpers_huawei_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) # MBM diff --git a/plugins/huawei/mm-modem-helpers-huawei.h b/plugins/huawei/mm-modem-helpers-huawei.h index 7a8ab3fe2..f0f1356be 100644 --- a/plugins/huawei/mm-modem-helpers-huawei.h +++ b/plugins/huawei/mm-modem-helpers-huawei.h @@ -19,6 +19,7 @@ #include "glib.h" +/*****************************************************************************/ /* ^NDISSTAT / ^NDISSTATQRY response parser */ gboolean mm_huawei_parse_ndisstatqry_response (const gchar *response, gboolean *ipv4_available, @@ -27,6 +28,7 @@ gboolean mm_huawei_parse_ndisstatqry_response (const gchar *response, gboolean *ipv6_connected, GError **error); +/*****************************************************************************/ /* ^SYSINFO response parser */ gboolean mm_huawei_parse_sysinfo_response (const char *reply, guint *out_srv_status, @@ -38,6 +40,7 @@ gboolean mm_huawei_parse_sysinfo_response (const char *reply, guint *out_sys_submode, GError **error); +/*****************************************************************************/ /* ^SYSINFOEX response parser */ gboolean mm_huawei_parse_sysinfoex_response (const char *reply, guint *out_srv_status, diff --git a/plugins/huawei/tests/test-modem-helpers-huawei.c b/plugins/huawei/tests/test-modem-helpers-huawei.c index 9dc6fb620..e5bb9e72b 100644 --- a/plugins/huawei/tests/test-modem-helpers-huawei.c +++ b/plugins/huawei/tests/test-modem-helpers-huawei.c @@ -17,6 +17,11 @@ #include <glib-object.h> #include <locale.h> +#include <ModemManager.h> +#define _LIBMM_INSIDE_MM +#include <libmm-glib.h> + +#include "mm-log.h" #include "mm-modem-helpers-huawei.h" /*****************************************************************************/ @@ -246,6 +251,26 @@ test_sysinfoex (void) /*****************************************************************************/ +void +_mm_log (const char *loc, + const char *func, + guint32 level, + const char *fmt, + ...) +{ +#if defined ENABLE_TEST_MESSAGE_TRACES + /* Dummy log function */ + va_list args; + gchar *msg; + + 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) { setlocale (LC_ALL, ""); |