huawei,tests: enable log traces in the tests
This commit is contained in:
@@ -132,7 +132,9 @@ test_modem_helpers_huawei_SOURCES = \
|
|||||||
test_modem_helpers_huawei_CPPFLAGS = \
|
test_modem_helpers_huawei_CPPFLAGS = \
|
||||||
-I$(top_srcdir)/plugins/huawei \
|
-I$(top_srcdir)/plugins/huawei \
|
||||||
$(PLUGIN_COMMON_COMPILER_FLAGS)
|
$(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)
|
test_modem_helpers_huawei_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
|
||||||
|
|
||||||
# MBM
|
# MBM
|
||||||
|
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include "glib.h"
|
#include "glib.h"
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
/* ^NDISSTAT / ^NDISSTATQRY response parser */
|
/* ^NDISSTAT / ^NDISSTATQRY response parser */
|
||||||
gboolean mm_huawei_parse_ndisstatqry_response (const gchar *response,
|
gboolean mm_huawei_parse_ndisstatqry_response (const gchar *response,
|
||||||
gboolean *ipv4_available,
|
gboolean *ipv4_available,
|
||||||
@@ -27,6 +28,7 @@ gboolean mm_huawei_parse_ndisstatqry_response (const gchar *response,
|
|||||||
gboolean *ipv6_connected,
|
gboolean *ipv6_connected,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
/* ^SYSINFO response parser */
|
/* ^SYSINFO response parser */
|
||||||
gboolean mm_huawei_parse_sysinfo_response (const char *reply,
|
gboolean mm_huawei_parse_sysinfo_response (const char *reply,
|
||||||
guint *out_srv_status,
|
guint *out_srv_status,
|
||||||
@@ -38,6 +40,7 @@ gboolean mm_huawei_parse_sysinfo_response (const char *reply,
|
|||||||
guint *out_sys_submode,
|
guint *out_sys_submode,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
/* ^SYSINFOEX response parser */
|
/* ^SYSINFOEX response parser */
|
||||||
gboolean mm_huawei_parse_sysinfoex_response (const char *reply,
|
gboolean mm_huawei_parse_sysinfoex_response (const char *reply,
|
||||||
guint *out_srv_status,
|
guint *out_srv_status,
|
||||||
|
@@ -17,6 +17,11 @@
|
|||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
#include <locale.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"
|
#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)
|
int main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
setlocale (LC_ALL, "");
|
setlocale (LC_ALL, "");
|
||||||
|
Reference in New Issue
Block a user