summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.co.uk>2011-05-03 20:24:47 -0400
committerNicolas Dufresne <nicolas.dufresne@collabora.co.uk>2011-05-03 20:31:44 -0400
commitb39ef3ec0ba73c2aca1b422c0e40672dabb9b009 (patch)
treee35c020440cc8b3cfe5f4fad129aead63eaa034e
parent9199c84267a438c99c0bac5f83119cbc14024bad (diff)
downloadtelepathy-logger-b39ef3ec0ba73c2aca1b422c0e40672dabb9b009.tar.gz
Add debug trace support
-rw-r--r--tests/dbus/test-tpl-log-store-xml.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/dbus/test-tpl-log-store-xml.c b/tests/dbus/test-tpl-log-store-xml.c
index b68126a..a25d855 100644
--- a/tests/dbus/test-tpl-log-store-xml.c
+++ b/tests/dbus/test-tpl-log-store-xml.c
@@ -1,11 +1,19 @@
#include "telepathy-logger/log-store-xml.c"
+#include "lib/util.h"
+
+#include "telepathy-logger/debug-internal.h"
#include "telepathy-logger/log-manager-internal.h"
#include "telepathy-logger/log-store-internal.h"
-#include "lib/util.h"
+#include <telepathy-glib/debug-sender.h>
#include <glib.h>
+/* it was defined in telepathy-logger/log-store-xml.c */
+#undef DEBUG_FLAG
+#define DEBUG_FLAG TPL_DEBUG_TESTSUITE
+
+
typedef struct
{
gchar *tmp_basedir;
@@ -50,6 +58,12 @@ setup (XmlTestCaseFixture* fixture,
fixture->bus = tp_tests_dbus_daemon_dup_or_die ();
g_assert (fixture->bus != NULL);
+
+ tp_debug_divert_messages (g_getenv ("TPL_LOGFILE"));
+
+#ifdef ENABLE_DEBUG
+ _tpl_debug_set_flags_from_env ();
+#endif /* ENABLE_DEBUG */
}