summaryrefslogtreecommitdiff
path: root/src/tests/eldbus
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@samsung.com>2013-12-23 11:42:12 +0900
committerCedric BAIL <cedric.bail@samsung.com>2013-12-23 11:42:12 +0900
commitc255849fdc8227f8204e405a9a1421ed4371d4c3 (patch)
tree0f4f6663487aacf65508fbaa0604f51103a4235c /src/tests/eldbus
parent0a6ce62bb247031aa4139d0b69506ed2ea2cba0d (diff)
eldbus: fix tests to properly take into account the presence of ecore system module.
Ecore system module may use dbus, so when you init ecore, it may init eldbus a few more time (depending on the module that are present on your system). This result in eldbus_init returning a valid init, but different from 1. This patch update the test to take that into account.
Diffstat (limited to 'src/tests/eldbus')
-rw-r--r--src/tests/eldbus/eldbus_test_eldbus_init.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/tests/eldbus/eldbus_test_eldbus_init.c b/src/tests/eldbus/eldbus_test_eldbus_init.c
index efe92cdfaf..f530d4c3ba 100644
--- a/src/tests/eldbus/eldbus_test_eldbus_init.c
+++ b/src/tests/eldbus/eldbus_test_eldbus_init.c
@@ -23,10 +23,9 @@ START_TEST(eldbus_test_eldbus)
23 int ret; 23 int ret;
24 24
25 ret = eldbus_init(); 25 ret = eldbus_init();
26 fail_if(ret != 1); 26 fail_if(ret < 1);
27 27
28 ret = eldbus_shutdown(); 28 ret = eldbus_shutdown();
29 fail_if(ret != 0);
30} 29}
31END_TEST 30END_TEST
32 31
@@ -37,7 +36,7 @@ START_TEST(eldbus_test_eldbus_main_loop)
37 36
38 ecore_init(); 37 ecore_init();
39 ret = eldbus_init(); 38 ret = eldbus_init();
40 fail_if(ret != 1); 39 fail_if(ret < 1);
41 40
42 timer = ecore_timer_add(0.1, _quit_cb, NULL); 41 timer = ecore_timer_add(0.1, _quit_cb, NULL);
43 fail_if(timer == NULL); 42 fail_if(timer == NULL);
@@ -45,7 +44,6 @@ START_TEST(eldbus_test_eldbus_main_loop)
45 ecore_main_loop_begin(); 44 ecore_main_loop_begin();
46 45
47 ret = eldbus_shutdown(); 46 ret = eldbus_shutdown();
48 fail_if(ret != 0);
49 47
50 ecore_shutdown(); 48 ecore_shutdown();
51 49
@@ -67,7 +65,7 @@ START_TEST(eldbus_test_eldbus_conn)
67 ecore_init(); 65 ecore_init();
68 66
69 ret = eldbus_init(); 67 ret = eldbus_init();
70 fail_if(ret != 1); 68 fail_if(ret < 1);
71 69
72 /* 70 /*
73 * let's use connection type == system, so it works without a session, 71 * let's use connection type == system, so it works without a session,
@@ -80,7 +78,6 @@ START_TEST(eldbus_test_eldbus_conn)
80 eldbus_connection_unref(conn); 78 eldbus_connection_unref(conn);
81 79
82 ret = eldbus_shutdown(); 80 ret = eldbus_shutdown();
83 fail_if(ret != 0);
84 81
85 ecore_shutdown(); 82 ecore_shutdown();
86 83
@@ -96,7 +93,7 @@ START_TEST(eldbus_test_eldbus_conn_object)
96 ecore_init(); 93 ecore_init();
97 94
98 ret = eldbus_init(); 95 ret = eldbus_init();
99 fail_if(ret != 1); 96 fail_if(ret < 1);
100 97
101 /* 98 /*
102 * let's use connection type == system, so it works without a D-Bus session. 99 * let's use connection type == system, so it works without a D-Bus session.
@@ -114,7 +111,6 @@ START_TEST(eldbus_test_eldbus_conn_object)
114 eldbus_connection_unref(conn); 111 eldbus_connection_unref(conn);
115 112
116 ret = eldbus_shutdown(); 113 ret = eldbus_shutdown();
117 fail_if(ret != 0);
118 114
119 ecore_shutdown(); 115 ecore_shutdown();
120 116