summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-01-27 14:32:51 +0100
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-05-12 12:30:42 +0200
commitb9dcc1eca8a124d5991bafa434950cc0938df694 (patch)
tree5740355570cb0410b2037fc0f5f9e5c5dfb0d946
parentbcf76973898c6bfc180067fc5beb814d9289172a (diff)
tests/lib/util: add tp_tests_init
-rw-r--r--tests/lib/util.c11
-rw-r--r--tests/lib/util.h3
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/lib/util.c b/tests/lib/util.c
index 27b4c1e5..fc2ecdb0 100644
--- a/tests/lib/util.c
+++ b/tests/lib/util.c
@@ -289,3 +289,14 @@ tp_tests_abort_after (guint sec)
alarm (sec + 2);
#endif
}
+
+void
+tp_tests_init (int *argc,
+ char ***argv)
+{
+ g_type_init ();
+ tp_tests_abort_after (10);
+ tp_debug_set_flags ("all");
+
+ g_test_init (argc, argv, NULL);
+}
diff --git a/tests/lib/util.h b/tests/lib/util.h
index 7eab77dc..689cf91f 100644
--- a/tests/lib/util.h
+++ b/tests/lib/util.h
@@ -54,4 +54,7 @@ void tp_tests_result_ready_cb (GObject *object,
void tp_tests_abort_after (guint sec);
+void tp_tests_init (int *argc,
+ char ***argv);
+
#endif /* #ifndef __TP_TESTS_LIB_UTIL_H__ */