Merge lp:~mterry/libappindicator/fix-tests into lp:~cyphermox/libappindicator/fix-tests

Proposed by Michael Terry
Status: Merged
Merged at revision: 254
Proposed branch: lp:~mterry/libappindicator/fix-tests
Merge into: lp:~cyphermox/libappindicator/fix-tests
Diff against target: 160 lines (+33/-3)
5 files modified
debian/rules (+1/-0)
tests/test-libappindicator-fallback-item.c (+1/-1)
tests/test-libappindicator-fallback-watcher.c (+2/-1)
tests/test-libappindicator-status-client.c (+1/-1)
tests/test-libappindicator.c (+28/-0)
To merge this branch: bzr merge lp:~mterry/libappindicator/fix-tests
Reviewer Review Type Date Requested Status
Mathieu Trudel-Lapierre Approve
Review via email: mp+142802@code.launchpad.net

Description of the change

Works in a PPA for me.

To post a comment you must log in.
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

That the one that explodes on amd64 but not on i386, right?

review: Needs Information
Revision history for this message
Michael Terry (mterry) wrote :

Yeah.

lp:~mterry/libappindicator/fix-tests updated
254. By Michael Terry

increase another test timeout to make amd64 build

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Ack, I'm merging this i nmy branch.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/rules'
2--- debian/rules 2012-12-11 03:51:01 +0000
3+++ debian/rules 2013-01-14 15:48:27 +0000
4@@ -20,6 +20,7 @@
5 # Note: No cli here so that the pbuilder stuff works
6 clean:
7 dh_clean
8+ dh_autoreconf_clean
9
10 override_dh_autoreconf:
11 NOCONFIGURE=1 dh_autoreconf ./autogen.sh
12
13=== modified file 'tests/test-libappindicator-fallback-item.c'
14--- tests/test-libappindicator-fallback-item.c 2010-06-11 17:34:09 +0000
15+++ tests/test-libappindicator-fallback-item.c 2013-01-14 15:48:27 +0000
16@@ -138,7 +138,7 @@
17 GtkWidget * menu = gtk_menu_new();
18 app_indicator_set_menu(APP_INDICATOR(item), GTK_MENU(menu));
19
20- g_timeout_add_seconds(2, kill_func, NULL);
21+ g_timeout_add_seconds(20, kill_func, NULL);
22
23 mainloop = g_main_loop_new(NULL, FALSE);
24 g_main_loop_run(mainloop);
25
26=== modified file 'tests/test-libappindicator-fallback-watcher.c'
27--- tests/test-libappindicator-fallback-watcher.c 2010-06-11 17:35:21 +0000
28+++ tests/test-libappindicator-fallback-watcher.c 2013-01-14 15:48:27 +0000
29@@ -77,6 +77,7 @@
30 while (!has_owner && owner_count < 10000) {
31 org_freedesktop_DBus_name_has_owner(bus_proxy, "org.test", &has_owner, NULL);
32 owner_count++;
33+ g_usleep(500000);
34 }
35
36 if (owner_count == 10000) {
37@@ -104,7 +105,7 @@
38
39 /* This is the final kill function. It really shouldn't happen
40 unless we get an error. */
41- g_timeout_add(2000, kill_func, NULL);
42+ g_timeout_add_seconds(20, kill_func, NULL);
43
44 g_debug("Entering Mainloop");
45
46
47=== modified file 'tests/test-libappindicator-status-client.c'
48--- tests/test-libappindicator-status-client.c 2010-03-02 20:31:37 +0000
49+++ tests/test-libappindicator-status-client.c 2013-01-14 15:48:27 +0000
50@@ -137,7 +137,7 @@
51 dbus_bus_add_match(dbus_g_connection_get_connection(session_bus), "type='signal',interface='" NOTIFICATION_ITEM_DBUS_IFACE "',member='NewStatus'", NULL);
52
53 watchdog_hit = TRUE;
54- g_timeout_add(1000, kill_func, NULL);
55+ g_timeout_add_seconds(20, kill_func, NULL);
56
57 mainloop = g_main_loop_new(NULL, FALSE);
58 g_main_loop_run(mainloop);
59
60=== modified file 'tests/test-libappindicator.c'
61--- tests/test-libappindicator.c 2012-01-29 03:42:34 +0000
62+++ tests/test-libappindicator.c 2013-01-14 15:48:27 +0000
63@@ -28,6 +28,16 @@
64 #include <libdbusmenu-glib/menuitem.h>
65 #include <libdbusmenu-glib/server.h>
66
67+static gboolean
68+allow_warnings (const gchar *log_domain, GLogLevelFlags log_level,
69+ const gchar *message, gpointer user_data)
70+{
71+ // By default, gtest will fail a test on even a warning message.
72+ // But since some of our sub-libraries are noisy (especially at-spi2),
73+ // only fail on critical or worse.
74+ return ((log_level & G_LOG_LEVEL_MASK) <= G_LOG_LEVEL_CRITICAL);
75+}
76+
77 void
78 test_libappindicator_prop_signals_status_helper (AppIndicator * ci, gchar * status, gboolean * signalactivated)
79 {
80@@ -45,6 +55,8 @@
81 void
82 test_libappindicator_prop_signals (void)
83 {
84+ g_test_log_set_fatal_handler (allow_warnings, NULL);
85+
86 AppIndicator * ci = app_indicator_new ("test-app-indicator",
87 "indicator-messages",
88 APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
89@@ -115,6 +127,8 @@
90 void
91 test_libappindicator_init_set_props (void)
92 {
93+ g_test_log_set_fatal_handler (allow_warnings, NULL);
94+
95 AppIndicator * ci = app_indicator_new ("my-id",
96 "my-name",
97 APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
98@@ -139,6 +153,8 @@
99 void
100 test_libappindicator_init_with_props (void)
101 {
102+ g_test_log_set_fatal_handler (allow_warnings, NULL);
103+
104 AppIndicator * ci = app_indicator_new ("my-id",
105 "my-name",
106 APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
107@@ -161,6 +177,8 @@
108 void
109 test_libappindicator_init (void)
110 {
111+ g_test_log_set_fatal_handler (allow_warnings, NULL);
112+
113 AppIndicator * ci = app_indicator_new ("my-id", "my-name", APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
114 g_assert(ci != NULL);
115 g_object_unref(G_OBJECT(ci));
116@@ -170,6 +188,8 @@
117 void
118 test_libappindicator_set_label (void)
119 {
120+ g_test_log_set_fatal_handler (allow_warnings, NULL);
121+
122 AppIndicator * ci = app_indicator_new ("my-id",
123 "my-name",
124 APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
125@@ -232,6 +252,8 @@
126 void
127 test_libappindicator_set_menu (void)
128 {
129+ g_test_log_set_fatal_handler (allow_warnings, NULL);
130+
131 AppIndicator * ci = app_indicator_new ("my-id",
132 "my-name",
133 APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
134@@ -301,6 +323,8 @@
135 void
136 test_libappindicator_label_signals (void)
137 {
138+ g_test_log_set_fatal_handler (allow_warnings, NULL);
139+
140 gint label_signals_count = 0;
141 AppIndicator * ci = app_indicator_new ("my-id",
142 "my-name",
143@@ -352,6 +376,8 @@
144 void
145 test_libappindicator_desktop_menu (void)
146 {
147+ g_test_log_set_fatal_handler (allow_warnings, NULL);
148+
149 AppIndicator * ci = app_indicator_new ("my-id-desktop-menu",
150 "my-name",
151 APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
152@@ -388,6 +414,8 @@
153 void
154 test_libappindicator_desktop_menu_bad (void)
155 {
156+ g_test_log_set_fatal_handler (allow_warnings, NULL);
157+
158 AppIndicator * ci = app_indicator_new ("my-id-desktop-menu-bad",
159 "my-name",
160 APP_INDICATOR_CATEGORY_APPLICATION_STATUS);

Subscribers

People subscribed via source and target branches