summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-01-27 14:49:03 +0100
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-05-12 12:32:31 +0200
commit665ba3f8d0f24621d795234e82dc3f1432c95b0f (patch)
treed1657ecf7448a25de20c841cfbb3d65801e38c10
parentfa8649935b8ba5c62fda3dd30209a15c5d5c67d5 (diff)
use tp_tests_init() in most tests
-rw-r--r--tests/dbus/account-channel-request.c6
-rw-r--r--tests/dbus/base-client.c5
-rw-r--r--tests/dbus/call-example.c6
-rw-r--r--tests/dbus/callable-example.c3
-rw-r--r--tests/dbus/channel-dispatch-operation.c3
-rw-r--r--tests/dbus/channel-dispatcher.c3
-rw-r--r--tests/dbus/channel-request.c3
-rw-r--r--tests/dbus/channel.c6
-rw-r--r--tests/dbus/client-channel-factory.c6
-rw-r--r--tests/dbus/client.c3
-rw-r--r--tests/dbus/cm.c3
-rw-r--r--tests/dbus/connection-interests.c3
-rw-r--r--tests/dbus/connection.c3
-rw-r--r--tests/dbus/contact-lists.c3
-rw-r--r--tests/dbus/contacts-slow-path.c6
-rw-r--r--tests/dbus/contacts.c6
-rw-r--r--tests/dbus/dbus.c6
-rw-r--r--tests/dbus/get-interface-after-invalidate.c3
-rw-r--r--tests/dbus/params-cm.c3
-rw-r--r--tests/dbus/protocol-objects.c3
-rw-r--r--tests/dbus/proxy-preparation.c1
-rw-r--r--tests/dbus/self-handle.c5
-rw-r--r--tests/dbus/simple-approver.c6
-rw-r--r--tests/dbus/simple-handler.c6
-rw-r--r--tests/dbus/simple-observer.c6
-rw-r--r--tests/dbus/stream-tube.c6
-rw-r--r--tests/dbus/text-channel.c6
-rw-r--r--tests/dtmf-player.c3
28 files changed, 28 insertions, 94 deletions
diff --git a/tests/dbus/account-channel-request.c b/tests/dbus/account-channel-request.c
index 20e05ecc..7d673d9c 100644
--- a/tests/dbus/account-channel-request.c
+++ b/tests/dbus/account-channel-request.c
@@ -955,11 +955,7 @@ int
main (int argc,
char **argv)
{
- g_type_init ();
- tp_tests_abort_after (10);
- tp_debug_set_flags ("all");
-
- g_test_init (&argc, &argv, NULL);
+ tp_tests_init (&argc, &argv);
g_test_bug_base ("http://bugs.freedesktop.org/show_bug.cgi?id=");
/* Request and handle tests */
diff --git a/tests/dbus/base-client.c b/tests/dbus/base-client.c
index df89f14b..6e3c2581 100644
--- a/tests/dbus/base-client.c
+++ b/tests/dbus/base-client.c
@@ -1218,11 +1218,8 @@ int
main (int argc,
char **argv)
{
- g_type_init ();
- tp_tests_abort_after (5);
- tp_debug_set_flags ("all");
+ tp_tests_init (&argc, &argv);
- g_test_init (&argc, &argv, NULL);
g_test_bug_base ("http://bugs.freedesktop.org/show_bug.cgi?id=");
g_test_add ("/base-client/basics", Test, NULL, setup, test_basics, teardown);
diff --git a/tests/dbus/call-example.c b/tests/dbus/call-example.c
index ccbe981a..0e3cfb7a 100644
--- a/tests/dbus/call-example.c
+++ b/tests/dbus/call-example.c
@@ -1085,12 +1085,10 @@ int
main (int argc,
char **argv)
{
- tp_tests_abort_after (10);
- g_set_prgname ("call-example");
- g_test_init (&argc, &argv, NULL);
+ tp_tests_init (&argc, &argv);
g_test_bug_base ("http://bugs.freedesktop.org/show_bug.cgi?id=");
+ g_set_prgname ("call-example");
- g_type_init ();
future_cli_init ();
g_test_add ("/call/basics", Test, NULL, setup, test_basics, teardown);
diff --git a/tests/dbus/callable-example.c b/tests/dbus/callable-example.c
index 8ee33618..b3703f5f 100644
--- a/tests/dbus/callable-example.c
+++ b/tests/dbus/callable-example.c
@@ -1548,8 +1548,7 @@ int
main (int argc,
char **argv)
{
- tp_tests_abort_after (10);
- g_test_init (&argc, &argv, NULL);
+ tp_tests_init (&argc, &argv);
g_test_bug_base ("http://bugs.freedesktop.org/show_bug.cgi?id=");
g_test_add ("/callable/basics", Test, NULL, setup, test_basics, teardown);
diff --git a/tests/dbus/channel-dispatch-operation.c b/tests/dbus/channel-dispatch-operation.c
index c0689552..4f7f9e27 100644
--- a/tests/dbus/channel-dispatch-operation.c
+++ b/tests/dbus/channel-dispatch-operation.c
@@ -783,8 +783,7 @@ int
main (int argc,
char **argv)
{
- tp_tests_abort_after (10);
- g_test_init (&argc, &argv, NULL);
+ tp_tests_init (&argc, &argv);
g_test_bug_base ("http://bugs.freedesktop.org/show_bug.cgi?id=");
g_test_add ("/cdo/new", Test, NULL, setup, test_new, teardown);
diff --git a/tests/dbus/channel-dispatcher.c b/tests/dbus/channel-dispatcher.c
index 3e60e901..e84ba805 100644
--- a/tests/dbus/channel-dispatcher.c
+++ b/tests/dbus/channel-dispatcher.c
@@ -65,8 +65,7 @@ int
main (int argc,
char **argv)
{
- tp_tests_abort_after (10);
- g_test_init (&argc, &argv, NULL);
+ tp_tests_init (&argc, &argv);
g_test_bug_base ("http://bugs.freedesktop.org/show_bug.cgi?id=");
g_test_add ("/cd/new", Test, NULL, setup, test_new, teardown);
diff --git a/tests/dbus/channel-request.c b/tests/dbus/channel-request.c
index ad3e2ff6..7aba2e29 100644
--- a/tests/dbus/channel-request.c
+++ b/tests/dbus/channel-request.c
@@ -368,8 +368,7 @@ int
main (int argc,
char **argv)
{
- tp_tests_abort_after (10);
- g_test_init (&argc, &argv, NULL);
+ tp_tests_init (&argc, &argv);
g_test_bug_base ("http://bugs.freedesktop.org/show_bug.cgi?id=");
g_test_add ("/cr/new", Test, NULL, setup, test_new, teardown);
diff --git a/tests/dbus/channel.c b/tests/dbus/channel.c
index d7b2932a..fab026ae 100644
--- a/tests/dbus/channel.c
+++ b/tests/dbus/channel.c
@@ -416,11 +416,7 @@ int
main (int argc,
char **argv)
{
- tp_tests_abort_after (10);
- g_type_init ();
- tp_debug_set_flags ("all");
-
- g_test_init (&argc, &argv, NULL);
+ tp_tests_init (&argc, &argv);
g_test_bug_base ("http://bugs.freedesktop.org/show_bug.cgi?id=");
g_test_add ("/channel/leave/contact/unprepared/no-reason", Test, NULL, setup,
diff --git a/tests/dbus/client-channel-factory.c b/tests/dbus/client-channel-factory.c
index fecf98a6..e68ec0cc 100644
--- a/tests/dbus/client-channel-factory.c
+++ b/tests/dbus/client-channel-factory.c
@@ -250,11 +250,7 @@ int
main (int argc,
char **argv)
{
- g_type_init ();
- tp_tests_abort_after (10);
- tp_debug_set_flags ("all");
-
- g_test_init (&argc, &argv, NULL);
+ tp_tests_init (&argc, &argv);
g_test_bug_base ("http://bugs.freedesktop.org/show_bug.cgi?id=");
g_test_add ("/client-channel-factory/basic/creation", Test, NULL, setup,
diff --git a/tests/dbus/client.c b/tests/dbus/client.c
index e06a3d26..4b88ddae 100644
--- a/tests/dbus/client.c
+++ b/tests/dbus/client.c
@@ -66,8 +66,7 @@ int
main (int argc,
char **argv)
{
- tp_tests_abort_after (10);
- g_test_init (&argc, &argv, NULL);
+ tp_tests_init (&argc, &argv);
g_test_bug_base ("http://bugs.freedesktop.org/show_bug.cgi?id=");
g_test_add ("/client/new", Test, NULL, setup, test_new, teardown);
diff --git a/tests/dbus/cm.c b/tests/dbus/cm.c
index 60e67570..ca0d1ad9 100644
--- a/tests/dbus/cm.c
+++ b/tests/dbus/cm.c
@@ -1017,8 +1017,7 @@ int
main (int argc,
char **argv)
{
- tp_tests_abort_after (10);
- g_test_init (&argc, &argv, NULL);
+ tp_tests_init (&argc, &argv);
g_test_bug_base ("http://bugs.freedesktop.org/show_bug.cgi?id=");
g_test_add_func ("/cm/valid-name", test_valid_name);
diff --git a/tests/dbus/connection-interests.c b/tests/dbus/connection-interests.c
index 7655f39b..75d65ae3 100644
--- a/tests/dbus/connection-interests.c
+++ b/tests/dbus/connection-interests.c
@@ -392,8 +392,7 @@ int
main (int argc,
char **argv)
{
- tp_tests_abort_after (5);
- g_test_init (&argc, &argv, NULL);
+ tp_tests_init (&argc, &argv);
g_test_add ("/conn/interest", Test, NULL, setup, test_interest, teardown);
g_test_add ("/conn/interested-client", Test, NULL, setup,
diff --git a/tests/dbus/connection.c b/tests/dbus/connection.c
index 95584161..b4dc04e9 100644
--- a/tests/dbus/connection.c
+++ b/tests/dbus/connection.c
@@ -399,8 +399,7 @@ int
main (int argc,
char **argv)
{
- tp_tests_abort_after (10);
- g_test_init (&argc, &argv, NULL);
+ tp_tests_init (&argc, &argv);
g_test_add ("/conn/prepare", Test, NULL, setup, test_prepare, teardown);
g_test_add ("/conn/fail_to_prepare", Test, NULL, setup, test_fail_to_prepare,
diff --git a/tests/dbus/contact-lists.c b/tests/dbus/contact-lists.c
index b741e88e..61fa2232 100644
--- a/tests/dbus/contact-lists.c
+++ b/tests/dbus/contact-lists.c
@@ -2319,8 +2319,7 @@ int
main (int argc,
char **argv)
{
- tp_tests_abort_after (60);
- g_test_init (&argc, &argv, NULL);
+ tp_tests_init (&argc, &argv);
g_test_add ("/contact-lists/nothing",
Test, NULL, setup, test_nothing, teardown);
diff --git a/tests/dbus/contacts-slow-path.c b/tests/dbus/contacts-slow-path.c
index 18cdb459..bb291ec3 100644
--- a/tests/dbus/contacts-slow-path.c
+++ b/tests/dbus/contacts-slow-path.c
@@ -1299,11 +1299,7 @@ int
main (int argc,
char **argv)
{
- g_type_init ();
- tp_debug_set_flags ("all");
- tp_tests_abort_after (10);
- g_set_prgname ("contacts-slow-path");
- g_test_init (&argc, &argv, NULL);
+ tp_tests_init (&argc, &argv);
g_test_bug_base ("http://bugs.freedesktop.org/show_bug.cgi?id=");
g_test_add ("/contacts-slow-path/by-handle", Fixture, NULL, setup,
diff --git a/tests/dbus/contacts.c b/tests/dbus/contacts.c
index 7a22bd03..54c6ad38 100644
--- a/tests/dbus/contacts.c
+++ b/tests/dbus/contacts.c
@@ -2306,11 +2306,7 @@ int
main (int argc,
char **argv)
{
- g_type_init ();
- tp_debug_set_flags ("all");
- tp_tests_abort_after (10);
- g_set_prgname ("contacts");
- g_test_init (&argc, &argv, NULL);
+ tp_tests_init (&argc, &argv);
g_test_bug_base ("http://bugs.freedesktop.org/show_bug.cgi?id=");
#define ADD(x) \
diff --git a/tests/dbus/dbus.c b/tests/dbus/dbus.c
index a347f418..da7525fb 100644
--- a/tests/dbus/dbus.c
+++ b/tests/dbus/dbus.c
@@ -332,11 +332,7 @@ int
main (int argc,
char **argv)
{
- tp_tests_abort_after (10);
- tp_debug_set_flags ("all");
-
- g_type_init ();
- g_test_init (&argc, &argv, NULL);
+ tp_tests_init (&argc, &argv);
g_test_add_func ("/dbus/validation", test_validation);
g_test_add_func ("/dbus-daemon/properties", test_properties);
diff --git a/tests/dbus/get-interface-after-invalidate.c b/tests/dbus/get-interface-after-invalidate.c
index 9027d4ac..36abe354 100644
--- a/tests/dbus/get-interface-after-invalidate.c
+++ b/tests/dbus/get-interface-after-invalidate.c
@@ -34,8 +34,7 @@ int
main (int argc,
char **argv)
{
- tp_tests_abort_after (10);
- g_test_init (&argc, &argv, NULL);
+ tp_tests_init (&argc, &argv);
g_test_add_func ("/test-get-interface-after-invalidate",
test_get_interface_after_invalidate);
diff --git a/tests/dbus/params-cm.c b/tests/dbus/params-cm.c
index 39132c89..280b853e 100644
--- a/tests/dbus/params-cm.c
+++ b/tests/dbus/params-cm.c
@@ -342,8 +342,7 @@ int
main (int argc,
char **argv)
{
- tp_tests_abort_after (10);
- g_test_init (&argc, &argv, NULL);
+ tp_tests_init (&argc, &argv);
g_test_bug_base ("http://bugs.freedesktop.org/show_bug.cgi?id=");
g_test_add ("/params-cm/set-params", Test, NULL, setup, test_set_params,
diff --git a/tests/dbus/protocol-objects.c b/tests/dbus/protocol-objects.c
index ecea32f3..5e499a04 100644
--- a/tests/dbus/protocol-objects.c
+++ b/tests/dbus/protocol-objects.c
@@ -431,8 +431,7 @@ int
main (int argc,
char **argv)
{
- tp_tests_abort_after (10);
- g_test_init (&argc, &argv, NULL);
+ tp_tests_init (&argc, &argv);
g_test_bug_base ("http://bugs.freedesktop.org/show_bug.cgi?id=");
g_test_add ("/protocol-objects/protocol-properties", Test, NULL, setup,
diff --git a/tests/dbus/proxy-preparation.c b/tests/dbus/proxy-preparation.c
index 584360fd..c331030a 100644
--- a/tests/dbus/proxy-preparation.c
+++ b/tests/dbus/proxy-preparation.c
@@ -372,7 +372,6 @@ main (int argc,
char **argv)
{
tp_tests_init (&argc, &argv);
-
g_test_bug_base ("http://bugs.freedesktop.org/show_bug.cgi?id=");
g_test_add ("/proxy-preparation/prepare-capabilities", Test, NULL, setup,
diff --git a/tests/dbus/self-handle.c b/tests/dbus/self-handle.c
index ccb7cdc3..ef55e095 100644
--- a/tests/dbus/self-handle.c
+++ b/tests/dbus/self-handle.c
@@ -350,11 +350,8 @@ int
main (int argc,
char **argv)
{
- tp_tests_abort_after (10);
- g_type_init ();
- tp_debug_set_flags ("all");
+ tp_tests_init (&argc, &argv);
g_set_prgname ("self-handle");
- g_test_init (&argc, &argv, NULL);
g_test_bug_base ("http://bugs.freedesktop.org/show_bug.cgi?id=");
g_test_add ("/self-handle", Fixture, NULL, setup_and_connect,
diff --git a/tests/dbus/simple-approver.c b/tests/dbus/simple-approver.c
index a1865148..1cd725e1 100644
--- a/tests/dbus/simple-approver.c
+++ b/tests/dbus/simple-approver.c
@@ -487,11 +487,7 @@ int
main (int argc,
char **argv)
{
- tp_tests_abort_after (10);
- g_type_init ();
- tp_debug_set_flags ("all");
-
- g_test_init (&argc, &argv, NULL);
+ tp_tests_init (&argc, &argv);
g_test_bug_base ("http://bugs.freedesktop.org/show_bug.cgi?id=");
g_test_add ("/simple-/properties", Test, NULL, setup, test_properties,
diff --git a/tests/dbus/simple-handler.c b/tests/dbus/simple-handler.c
index 461667cb..211c3e51 100644
--- a/tests/dbus/simple-handler.c
+++ b/tests/dbus/simple-handler.c
@@ -503,11 +503,7 @@ int
main (int argc,
char **argv)
{
- tp_tests_abort_after (10);
- g_type_init ();
- tp_debug_set_flags ("all");
-
- g_test_init (&argc, &argv, NULL);
+ tp_tests_init (&argc, &argv);
g_test_bug_base ("http://bugs.freedesktop.org/show_bug.cgi?id=");
g_test_add ("/simple-handler/properties", Test, NULL, setup, test_properties,
diff --git a/tests/dbus/simple-observer.c b/tests/dbus/simple-observer.c
index eac24e4f..1d0abb29 100644
--- a/tests/dbus/simple-observer.c
+++ b/tests/dbus/simple-observer.c
@@ -469,11 +469,7 @@ int
main (int argc,
char **argv)
{
- tp_tests_abort_after (10);
- g_type_init ();
- tp_debug_set_flags ("all");
-
- g_test_init (&argc, &argv, NULL);
+ tp_tests_init (&argc, &argv);
g_test_bug_base ("http://bugs.freedesktop.org/show_bug.cgi?id=");
g_test_add ("/simple-observer/properties", Test, NULL, setup, test_properties,
diff --git a/tests/dbus/stream-tube.c b/tests/dbus/stream-tube.c
index 534bdc42..57c2dcf4 100644
--- a/tests/dbus/stream-tube.c
+++ b/tests/dbus/stream-tube.c
@@ -1014,11 +1014,7 @@ int
main (int argc,
char **argv)
{
- tp_tests_abort_after (10);
- g_type_init ();
- tp_debug_set_flags ("all");
-
- g_test_init (&argc, &argv, NULL);
+ tp_tests_init (&argc, &argv);
g_test_bug_base ("http://bugs.freedesktop.org/show_bug.cgi?id=");
have_ipv6 = check_ipv6_support ();
diff --git a/tests/dbus/text-channel.c b/tests/dbus/text-channel.c
index 880de6bc..88f6e750 100644
--- a/tests/dbus/text-channel.c
+++ b/tests/dbus/text-channel.c
@@ -604,11 +604,7 @@ int
main (int argc,
char **argv)
{
- tp_tests_abort_after (10);
- g_type_init ();
- tp_debug_set_flags ("all");
-
- g_test_init (&argc, &argv, NULL);
+ tp_tests_init (&argc, &argv);
g_test_bug_base ("http://bugs.freedesktop.org/show_bug.cgi?id=");
g_test_add ("/text-channel/creation", Test, NULL, setup,
diff --git a/tests/dtmf-player.c b/tests/dtmf-player.c
index 4574c146..3ed49faf 100644
--- a/tests/dtmf-player.c
+++ b/tests/dtmf-player.c
@@ -302,8 +302,7 @@ main (int argc,
#define FIXTURE_TEST(x) \
g_test_add (TEST_PREFIX #x, Fixture, NULL, setup, test_ ## x, teardown)
- tp_tests_abort_after (10);
- g_test_init (&argc, &argv, NULL);
+ tp_tests_init (&argc, &argv);
g_test_bug_base ("http://bugs.freedesktop.org/show_bug.cgi?id=");
g_test_add_func (TEST_PREFIX "to_char", test_to_char);