summaryrefslogtreecommitdiff
path: root/tests/debug.c
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2011-04-28 14:05:57 +0100
committerJonny Lamb <jonny.lamb@collabora.co.uk>2011-04-28 16:08:12 +0100
commit243c0b73d7ed3db43d13e37828bd28cb10c16cd6 (patch)
treebf4b4e584c17bfb04cbcda15663eaea945b0baf6 /tests/debug.c
parentc1790e71e42d774923b7c8273ea617a22b69acdb (diff)
downloadtelepathy-salut-243c0b73d7ed3db43d13e37828bd28cb10c16cd6.tar.gz
src: remove annoying salut- prefix
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Diffstat (limited to 'tests/debug.c')
-rw-r--r--tests/debug.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/debug.c b/tests/debug.c
new file mode 100644
index 00000000..9a03bcd8
--- /dev/null
+++ b/tests/debug.c
@@ -0,0 +1,40 @@
+#include "config.h"
+
+#include <glib.h>
+
+#include <telepathy-glib/run.h>
+#include <telepathy-glib/debug.h>
+
+#include "connection-manager.h"
+#include "dummy-discovery-client.h"
+#include "debug.h"
+
+static TpBaseConnectionManager *
+salut_create_connection_manager (void)
+{
+ return TP_BASE_CONNECTION_MANAGER (
+ g_object_new (SALUT_TYPE_CONNECTION_MANAGER,
+ "backend-type", SALUT_TYPE_DUMMY_DISCOVERY_CLIENT,
+ NULL));
+}
+
+int
+main (int argc, char **argv)
+{
+ g_type_init ();
+ g_set_prgname ("telepathy-salut");
+
+#ifdef ENABLE_DEBUG
+ tp_debug_divert_messages (g_getenv ("SALUT_LOGFILE"));
+ debug_set_flags_from_env ();
+
+ if (g_getenv ("SALUT_PERSIST"))
+ tp_debug_set_persistent (TRUE);
+#endif
+
+ return tp_run_connection_manager ("telepathy-salut", VERSION,
+ salut_create_connection_manager,
+ argc, argv);
+}
+
+