Merge lp:~ted/dbus-test-runner/reporting-delay into lp:dbus-test-runner/12.10
- reporting-delay
- Merge into trunk.12.10
Status: | Merged |
---|---|
Approved by: | Ted Gould |
Approved revision: | 56 |
Merged at revision: | 45 |
Proposed branch: | lp:~ted/dbus-test-runner/reporting-delay |
Merge into: | lp:dbus-test-runner/12.10 |
Diff against target: |
392 lines (+73/-39) 11 files modified
libdbustest/Makefile.am (+1/-1) libdbustest/bustle.c (+21/-8) libdbustest/process.c (+27/-8) libdbustest/service.c (+5/-5) libdbustest/task.c (+1/-1) src/Makefile.am (+1/-1) src/dbus-test-runner.c (+7/-7) tests/Makefile.am (+5/-6) tests/test-bustle-data-check.sh (+3/-0) tests/test-bustle-list.sh (+1/-1) tests/test-bustle.reference (+1/-1) |
To merge this branch: | bzr merge lp:~ted/dbus-test-runner/reporting-delay |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
jenkins (community) | continuous-integration | Approve | |
Charles Kerr (community) | Approve | ||
Review via email:
|
Commit message
Adding a clearing of the buffers to make tests pass on slow systems
Description of the change
Setting up the dispose function so that it clears the buffers when complete to make sure we get a full log out. This should hopefully make it so that the tests pass even when Jenkins is busy doing other things at the same time.
Didn't realize when I started, but the bustle test is failing in trunk. So I fixed that along the way. Which then, lead me to realize that the bustle test data test wasn't actually checking its data. So I fixed that too. End of the day, this should make the test suite in good shape.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
jenkins (martin-mrazik+qa) wrote : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Allan LeSage (allanlesage) wrote : | # |
Hey great incentive to fix a couple of failing tests not related to this MP, eh :) ?
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
jenkins (martin-mrazik+qa) wrote : | # |
FAILED: Continuous integration, rev:55
http://
Executed test runs:
FAILURE: http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Charles Kerr (charlesk) wrote : | # |
g_io_channel_
I've no opinion on -Wextra but looks like it's not hurting anything.... :)
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
jenkins (martin-mrazik+qa) wrote : | # |
FAILED: Continuous integration, rev:56
http://
Executed test runs:
FAILURE: http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
jenkins (martin-mrazik+qa) wrote : | # |
FAILED: Continuous integration, rev:56
http://
Executed test runs:
FAILURE: http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
jenkins (martin-mrazik+qa) wrote : | # |
PASSED: Continuous integration, rev:56
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Allan LeSage (allanlesage) wrote : | # |
Sorry for the spam--the "passed" result is correct :) .
Preview Diff
1 | === modified file 'libdbustest/Makefile.am' | |||
2 | --- libdbustest/Makefile.am 2012-04-20 20:08:10 +0000 | |||
3 | +++ libdbustest/Makefile.am 2012-10-02 21:09:33 +0000 | |||
4 | @@ -29,7 +29,7 @@ | |||
5 | 29 | -I$(top_srcdir) \ | 29 | -I$(top_srcdir) \ |
6 | 30 | -DDEFAULT_SESSION_CONF="\"$(datadir)/dbus-test-runner/session.conf\"" \ | 30 | -DDEFAULT_SESSION_CONF="\"$(datadir)/dbus-test-runner/session.conf\"" \ |
7 | 31 | -DG_LOG_DOMAIN=\"libdbustest\" \ | 31 | -DG_LOG_DOMAIN=\"libdbustest\" \ |
9 | 32 | -Wall -Werror | 32 | -Wall -Werror -Wextra |
10 | 33 | 33 | ||
11 | 34 | libdbustest_la_LIBADD = \ | 34 | libdbustest_la_LIBADD = \ |
12 | 35 | $(DBUS_TEST_RUNNER_LIBS) | 35 | $(DBUS_TEST_RUNNER_LIBS) |
13 | 36 | 36 | ||
14 | === modified file 'libdbustest/bustle.c' | |||
15 | --- libdbustest/bustle.c 2012-04-19 15:54:50 +0000 | |||
16 | +++ libdbustest/bustle.c 2012-10-02 21:09:33 +0000 | |||
17 | @@ -21,6 +21,7 @@ | |||
18 | 21 | #include "config.h" | 21 | #include "config.h" |
19 | 22 | #endif | 22 | #endif |
20 | 23 | 23 | ||
21 | 24 | #include <glib.h> | ||
22 | 24 | #include "dbus-test.h" | 25 | #include "dbus-test.h" |
23 | 25 | 26 | ||
24 | 26 | struct _DbusTestBustlePrivate { | 27 | struct _DbusTestBustlePrivate { |
25 | @@ -46,6 +47,12 @@ | |||
26 | 46 | static void process_run (DbusTestTask * task); | 47 | static void process_run (DbusTestTask * task); |
27 | 47 | static DbusTestTaskState get_state (DbusTestTask * task); | 48 | static DbusTestTaskState get_state (DbusTestTask * task); |
28 | 48 | static gboolean get_passed (DbusTestTask * task); | 49 | static gboolean get_passed (DbusTestTask * task); |
29 | 50 | static gboolean bustle_writes (GIOChannel * channel, | ||
30 | 51 | GIOCondition condition, | ||
31 | 52 | gpointer data); | ||
32 | 53 | static gboolean bustle_write_error (GIOChannel * channel, | ||
33 | 54 | GIOCondition condition, | ||
34 | 55 | gpointer data); | ||
35 | 49 | 56 | ||
36 | 50 | G_DEFINE_TYPE (DbusTestBustle, dbus_test_bustle, DBUS_TEST_TYPE_TASK); | 57 | G_DEFINE_TYPE (DbusTestBustle, dbus_test_bustle, DBUS_TEST_TYPE_TASK); |
37 | 51 | 58 | ||
38 | @@ -105,18 +112,24 @@ | |||
39 | 105 | } | 112 | } |
40 | 106 | 113 | ||
41 | 107 | if (bustler->priv->stdout != NULL) { | 114 | if (bustler->priv->stdout != NULL) { |
44 | 108 | g_io_channel_shutdown(bustler->priv->stdout, TRUE, NULL); | 115 | while (G_IO_IN & g_io_channel_get_buffer_condition(bustler->priv->stdout)) { |
45 | 109 | bustler->priv->stdout = NULL; | 116 | bustle_writes(bustler->priv->stdout, 0 /* unused */, bustler->priv->file); |
46 | 117 | } | ||
47 | 118 | |||
48 | 119 | g_clear_pointer(&bustler->priv->stdout, g_io_channel_unref); | ||
49 | 110 | } | 120 | } |
50 | 111 | 121 | ||
51 | 112 | if (bustler->priv->stderr != NULL) { | 122 | if (bustler->priv->stderr != NULL) { |
54 | 113 | g_io_channel_shutdown(bustler->priv->stderr, TRUE, NULL); | 123 | while (G_IO_IN & g_io_channel_get_buffer_condition(bustler->priv->stderr)) { |
55 | 114 | bustler->priv->stderr = NULL; | 124 | bustle_write_error(bustler->priv->stderr, 0 /* unused */, bustler); |
56 | 125 | } | ||
57 | 126 | |||
58 | 127 | g_clear_pointer(&bustler->priv->stderr, g_io_channel_unref); | ||
59 | 115 | } | 128 | } |
60 | 116 | 129 | ||
61 | 117 | if (bustler->priv->file != NULL) { | 130 | if (bustler->priv->file != NULL) { |
62 | 118 | g_io_channel_shutdown(bustler->priv->file, TRUE, NULL); | 131 | g_io_channel_shutdown(bustler->priv->file, TRUE, NULL); |
64 | 119 | bustler->priv->file = NULL; | 132 | g_clear_pointer(&bustler->priv->file, g_io_channel_unref); |
65 | 120 | } | 133 | } |
66 | 121 | 134 | ||
67 | 122 | G_OBJECT_CLASS (dbus_test_bustle_parent_class)->dispose (object); | 135 | G_OBJECT_CLASS (dbus_test_bustle_parent_class)->dispose (object); |
68 | @@ -165,7 +178,7 @@ | |||
69 | 165 | } | 178 | } |
70 | 166 | 179 | ||
71 | 167 | static void | 180 | static void |
73 | 168 | bustle_watcher (GPid pid, gint status, gpointer data) | 181 | bustle_watcher (GPid pid, G_GNUC_UNUSED gint status, gpointer data) |
74 | 169 | { | 182 | { |
75 | 170 | g_critical("Bustle Monitor exited abruptly!"); | 183 | g_critical("Bustle Monitor exited abruptly!"); |
76 | 171 | DbusTestBustle * bustler = DBUS_TEST_BUSTLE(data); | 184 | DbusTestBustle * bustler = DBUS_TEST_BUSTLE(data); |
77 | @@ -182,7 +195,7 @@ | |||
78 | 182 | } | 195 | } |
79 | 183 | 196 | ||
80 | 184 | static gboolean | 197 | static gboolean |
82 | 185 | bustle_write_error (GIOChannel * channel, GIOCondition condition, gpointer data) | 198 | bustle_write_error (GIOChannel * channel, G_GNUC_UNUSED GIOCondition condition, gpointer data) |
83 | 186 | { | 199 | { |
84 | 187 | gchar * line; | 200 | gchar * line; |
85 | 188 | gsize termloc; | 201 | gsize termloc; |
86 | @@ -208,7 +221,7 @@ | |||
87 | 208 | } | 221 | } |
88 | 209 | 222 | ||
89 | 210 | static gboolean | 223 | static gboolean |
91 | 211 | bustle_writes (GIOChannel * channel, GIOCondition condition, gpointer data) | 224 | bustle_writes (GIOChannel * channel, G_GNUC_UNUSED GIOCondition condition, gpointer data) |
92 | 212 | { | 225 | { |
93 | 213 | gchar * line; | 226 | gchar * line; |
94 | 214 | gsize termloc; | 227 | gsize termloc; |
95 | 215 | 228 | ||
96 | === modified file 'libdbustest/process.c' | |||
97 | --- libdbustest/process.c 2012-04-23 03:38:09 +0000 | |||
98 | +++ libdbustest/process.c 2012-10-02 21:09:33 +0000 | |||
99 | @@ -30,6 +30,7 @@ | |||
100 | 30 | GPid pid; | 30 | GPid pid; |
101 | 31 | guint io_watch; | 31 | guint io_watch; |
102 | 32 | guint watcher; | 32 | guint watcher; |
103 | 33 | GIOChannel * io_chan; | ||
104 | 33 | 34 | ||
105 | 34 | gboolean complete; | 35 | gboolean complete; |
106 | 35 | gint status; | 36 | gint status; |
107 | @@ -74,6 +75,7 @@ | |||
108 | 74 | 75 | ||
109 | 75 | self->priv->executable = NULL; | 76 | self->priv->executable = NULL; |
110 | 76 | self->priv->parameters = NULL; | 77 | self->priv->parameters = NULL; |
111 | 78 | self->priv->io_chan = NULL; | ||
112 | 77 | 79 | ||
113 | 78 | return; | 80 | return; |
114 | 79 | } | 81 | } |
115 | @@ -103,6 +105,26 @@ | |||
116 | 103 | process->priv->pid = 0; | 105 | process->priv->pid = 0; |
117 | 104 | } | 106 | } |
118 | 105 | 107 | ||
119 | 108 | if (process->priv->io_chan != NULL) { | ||
120 | 109 | GIOStatus status = G_IO_STATUS_NORMAL; | ||
121 | 110 | |||
122 | 111 | while ((G_IO_IN & g_io_channel_get_buffer_condition(process->priv->io_chan)) && status == G_IO_STATUS_NORMAL) { | ||
123 | 112 | gchar * line = NULL; | ||
124 | 113 | gsize termloc; | ||
125 | 114 | |||
126 | 115 | status = g_io_channel_read_line (process->priv->io_chan, &line, NULL, &termloc, NULL); | ||
127 | 116 | |||
128 | 117 | if (status != G_IO_STATUS_NORMAL) { | ||
129 | 118 | continue; | ||
130 | 119 | } | ||
131 | 120 | |||
132 | 121 | dbus_test_task_print(DBUS_TEST_TASK(process), line); | ||
133 | 122 | g_free(line); | ||
134 | 123 | } | ||
135 | 124 | |||
136 | 125 | g_clear_pointer(&process->priv->io_chan, g_io_channel_unref); | ||
137 | 126 | } | ||
138 | 127 | |||
139 | 106 | G_OBJECT_CLASS (dbus_test_process_parent_class)->dispose (object); | 128 | G_OBJECT_CLASS (dbus_test_process_parent_class)->dispose (object); |
140 | 107 | return; | 129 | return; |
141 | 108 | } | 130 | } |
142 | @@ -143,7 +165,7 @@ | |||
143 | 143 | } | 165 | } |
144 | 144 | 166 | ||
145 | 145 | static gboolean | 167 | static gboolean |
147 | 146 | proc_writes (GIOChannel * channel, GIOCondition condition, gpointer data) | 168 | proc_writes (GIOChannel * channel, G_GNUC_UNUSED GIOCondition condition, gpointer data) |
148 | 147 | { | 169 | { |
149 | 148 | g_return_val_if_fail(DBUS_TEST_IS_PROCESS(data), FALSE); | 170 | g_return_val_if_fail(DBUS_TEST_IS_PROCESS(data), FALSE); |
150 | 149 | DbusTestProcess * process = DBUS_TEST_PROCESS(data); | 171 | DbusTestProcess * process = DBUS_TEST_PROCESS(data); |
151 | @@ -164,8 +186,6 @@ | |||
152 | 164 | continue; | 186 | continue; |
153 | 165 | } | 187 | } |
154 | 166 | 188 | ||
155 | 167 | line[termloc] = '\0'; | ||
156 | 168 | |||
157 | 169 | dbus_test_task_print(DBUS_TEST_TASK(process), line); | 189 | dbus_test_task_print(DBUS_TEST_TASK(process), line); |
158 | 170 | g_free(line); | 190 | g_free(line); |
159 | 171 | } while (G_IO_IN & g_io_channel_get_buffer_condition(channel)); | 191 | } while (G_IO_IN & g_io_channel_get_buffer_condition(channel)); |
160 | @@ -190,7 +210,7 @@ | |||
161 | 190 | argv = g_new0(gchar *, g_list_length(process->priv->parameters) + 2); | 210 | argv = g_new0(gchar *, g_list_length(process->priv->parameters) + 2); |
162 | 191 | 211 | ||
163 | 192 | argv[0] = process->priv->executable; | 212 | argv[0] = process->priv->executable; |
165 | 193 | int i; | 213 | guint i; |
166 | 194 | for (i = 0; i < g_list_length(process->priv->parameters); i++) { | 214 | for (i = 0; i < g_list_length(process->priv->parameters); i++) { |
167 | 195 | argv[i + 1] = (gchar *)g_list_nth(process->priv->parameters, i)->data; | 215 | argv[i + 1] = (gchar *)g_list_nth(process->priv->parameters, i)->data; |
168 | 196 | } | 216 | } |
169 | @@ -224,13 +244,12 @@ | |||
170 | 224 | g_free(message); | 244 | g_free(message); |
171 | 225 | } | 245 | } |
172 | 226 | 246 | ||
176 | 227 | GIOChannel * iochan = g_io_channel_unix_new(proc_stdout); | 247 | process->priv->io_chan = g_io_channel_unix_new(proc_stdout); |
177 | 228 | g_io_channel_set_buffer_size(iochan, 10 * 1024 * 1024); /* 10 MB should be enough for anyone */ | 248 | g_io_channel_set_buffer_size(process->priv->io_chan, 10 * 1024 * 1024); /* 10 MB should be enough for anyone */ |
178 | 229 | process->priv->io_watch = g_io_add_watch(iochan, | 249 | process->priv->io_watch = g_io_add_watch(process->priv->io_chan, |
179 | 230 | G_IO_IN, /* conditions */ | 250 | G_IO_IN, /* conditions */ |
180 | 231 | proc_writes, /* func */ | 251 | proc_writes, /* func */ |
181 | 232 | process); /* func data */ | 252 | process); /* func data */ |
182 | 233 | g_io_channel_unref(iochan); | ||
183 | 234 | 253 | ||
184 | 235 | process->priv->watcher = g_child_watch_add(process->priv->pid, proc_watcher, process); | 254 | process->priv->watcher = g_child_watch_add(process->priv->pid, proc_watcher, process); |
185 | 236 | 255 | ||
186 | 237 | 256 | ||
187 | === modified file 'libdbustest/service.c' | |||
188 | --- libdbustest/service.c 2012-04-23 03:39:53 +0000 | |||
189 | +++ libdbustest/service.c 2012-10-02 21:09:33 +0000 | |||
190 | @@ -106,7 +106,7 @@ | |||
191 | 106 | } | 106 | } |
192 | 107 | 107 | ||
193 | 108 | static void | 108 | static void |
195 | 109 | task_unref (gpointer data, gpointer user_data) | 109 | task_unref (gpointer data, G_GNUC_UNUSED gpointer user_data) |
196 | 110 | { | 110 | { |
197 | 111 | DbusTestTask * task = DBUS_TEST_TASK(data); | 111 | DbusTestTask * task = DBUS_TEST_TASK(data); |
198 | 112 | 112 | ||
199 | @@ -190,7 +190,7 @@ | |||
200 | 190 | } | 190 | } |
201 | 191 | 191 | ||
202 | 192 | DbusTestService * | 192 | DbusTestService * |
204 | 193 | dbus_test_service_new (const gchar * address) | 193 | dbus_test_service_new (G_GNUC_UNUSED const gchar * address) |
205 | 194 | { | 194 | { |
206 | 195 | DbusTestService * service = g_object_new(DBUS_TEST_TYPE_SERVICE, | 195 | DbusTestService * service = g_object_new(DBUS_TEST_TYPE_SERVICE, |
207 | 196 | NULL); | 196 | NULL); |
208 | @@ -296,7 +296,7 @@ | |||
209 | 296 | } | 296 | } |
210 | 297 | 297 | ||
211 | 298 | static void | 298 | static void |
213 | 299 | task_starter (gpointer data, gpointer user_data) | 299 | task_starter (gpointer data, G_GNUC_UNUSED gpointer user_data) |
214 | 300 | { | 300 | { |
215 | 301 | DbusTestTask * task = DBUS_TEST_TASK(data); | 301 | DbusTestTask * task = DBUS_TEST_TASK(data); |
216 | 302 | 302 | ||
217 | @@ -341,7 +341,7 @@ | |||
218 | 341 | } | 341 | } |
219 | 342 | 342 | ||
220 | 343 | static void | 343 | static void |
222 | 344 | dbus_watcher (GPid pid, gint status, gpointer data) | 344 | dbus_watcher (GPid pid, G_GNUC_UNUSED gint status, gpointer data) |
223 | 345 | { | 345 | { |
224 | 346 | DbusTestService * service = DBUS_TEST_SERVICE(data); | 346 | DbusTestService * service = DBUS_TEST_SERVICE(data); |
225 | 347 | g_critical("DBus Daemon exited abruptly!"); | 347 | g_critical("DBus Daemon exited abruptly!"); |
226 | @@ -495,7 +495,7 @@ | |||
227 | 495 | } | 495 | } |
228 | 496 | 496 | ||
229 | 497 | static void | 497 | static void |
231 | 498 | task_state_changed (DbusTestTask * task, DbusTestTaskState state, gpointer user_data) | 498 | task_state_changed (G_GNUC_UNUSED DbusTestTask * task, G_GNUC_UNUSED DbusTestTaskState state, gpointer user_data) |
232 | 499 | { | 499 | { |
233 | 500 | g_return_if_fail(DBUS_TEST_IS_SERVICE(user_data)); | 500 | g_return_if_fail(DBUS_TEST_IS_SERVICE(user_data)); |
234 | 501 | DbusTestService * service = DBUS_TEST_SERVICE(user_data); | 501 | DbusTestService * service = DBUS_TEST_SERVICE(user_data); |
235 | 502 | 502 | ||
236 | === modified file 'libdbustest/task.c' | |||
237 | --- libdbustest/task.c 2012-04-19 15:54:50 +0000 | |||
238 | +++ libdbustest/task.c 2012-10-02 21:09:33 +0000 | |||
239 | @@ -258,7 +258,7 @@ | |||
240 | 258 | } | 258 | } |
241 | 259 | 259 | ||
242 | 260 | static void | 260 | static void |
244 | 261 | wait_for_found (GDBusConnection * connection, const gchar * name, const gchar * name_owner, gpointer user_data) | 261 | wait_for_found (G_GNUC_UNUSED GDBusConnection * connection, G_GNUC_UNUSED const gchar * name, G_GNUC_UNUSED const gchar * name_owner, gpointer user_data) |
245 | 262 | { | 262 | { |
246 | 263 | g_return_if_fail(DBUS_TEST_IS_TASK(user_data)); | 263 | g_return_if_fail(DBUS_TEST_IS_TASK(user_data)); |
247 | 264 | DbusTestTask * task = DBUS_TEST_TASK(user_data); | 264 | DbusTestTask * task = DBUS_TEST_TASK(user_data); |
248 | 265 | 265 | ||
249 | === modified file 'src/Makefile.am' | |||
250 | --- src/Makefile.am 2012-04-17 20:29:51 +0000 | |||
251 | +++ src/Makefile.am 2012-10-02 21:09:33 +0000 | |||
252 | @@ -6,7 +6,7 @@ | |||
253 | 6 | $(COVERAGE_CFLAGS) \ | 6 | $(COVERAGE_CFLAGS) \ |
254 | 7 | -I$(top_srcdir) \ | 7 | -I$(top_srcdir) \ |
255 | 8 | -DDEFAULT_SESSION_CONF="\"$(datadir)/dbus-test-runner/session.conf\"" \ | 8 | -DDEFAULT_SESSION_CONF="\"$(datadir)/dbus-test-runner/session.conf\"" \ |
257 | 9 | -Wall -Werror | 9 | -Wall -Werror -Wextra |
258 | 10 | dbus_test_runner_LDADD = $(DBUS_TEST_RUNNER_LIBS) \ | 10 | dbus_test_runner_LDADD = $(DBUS_TEST_RUNNER_LIBS) \ |
259 | 11 | $(top_builddir)/libdbustest/libdbustest.la | 11 | $(top_builddir)/libdbustest/libdbustest.la |
260 | 12 | dbus_test_runner_LDFLAGS = $(COVERAGE_LDFLAGS) | 12 | dbus_test_runner_LDFLAGS = $(COVERAGE_LDFLAGS) |
261 | 13 | 13 | ||
262 | === modified file 'src/dbus-test-runner.c' | |||
263 | --- src/dbus-test-runner.c 2012-04-18 21:46:08 +0000 | |||
264 | +++ src/dbus-test-runner.c 2012-10-02 21:09:33 +0000 | |||
265 | @@ -31,7 +31,7 @@ | |||
266 | 31 | #define NAME_SET "dbus-test-runner-name-set" | 31 | #define NAME_SET "dbus-test-runner-name-set" |
267 | 32 | 32 | ||
268 | 33 | static gboolean | 33 | static gboolean |
270 | 34 | option_task (const gchar * arg, const gchar * value, gpointer data, GError ** error) | 34 | option_task (G_GNUC_UNUSED const gchar * arg, const gchar * value, G_GNUC_UNUSED gpointer data, G_GNUC_UNUSED GError ** error) |
271 | 35 | { | 35 | { |
272 | 36 | if (last_task != NULL) { | 36 | if (last_task != NULL) { |
273 | 37 | g_object_unref(last_task); | 37 | g_object_unref(last_task); |
274 | @@ -44,7 +44,7 @@ | |||
275 | 44 | } | 44 | } |
276 | 45 | 45 | ||
277 | 46 | static gboolean | 46 | static gboolean |
279 | 47 | option_taskname (const gchar * arg, const gchar * value, gpointer data, GError ** error) | 47 | option_taskname (G_GNUC_UNUSED const gchar * arg, const gchar * value, G_GNUC_UNUSED gpointer data, GError ** error) |
280 | 48 | { | 48 | { |
281 | 49 | if (last_task == NULL) { | 49 | if (last_task == NULL) { |
282 | 50 | g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, "No task to put the name %s on.", value); | 50 | g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, "No task to put the name %s on.", value); |
283 | @@ -62,7 +62,7 @@ | |||
284 | 62 | } | 62 | } |
285 | 63 | 63 | ||
286 | 64 | static gboolean | 64 | static gboolean |
288 | 65 | option_noreturn (const gchar * arg, const gchar * value, gpointer data, GError ** error) | 65 | option_noreturn (G_GNUC_UNUSED const gchar * arg, G_GNUC_UNUSED const gchar * value, G_GNUC_UNUSED gpointer data, GError ** error) |
289 | 66 | { | 66 | { |
290 | 67 | if (last_task == NULL) { | 67 | if (last_task == NULL) { |
291 | 68 | g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, "No task to put adjust return on."); | 68 | g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, "No task to put adjust return on."); |
292 | @@ -79,7 +79,7 @@ | |||
293 | 79 | } | 79 | } |
294 | 80 | 80 | ||
295 | 81 | static gboolean | 81 | static gboolean |
297 | 82 | option_invert (const gchar * arg, const gchar * value, gpointer data, GError ** error) | 82 | option_invert (G_GNUC_UNUSED const gchar * arg, G_GNUC_UNUSED const gchar * value, G_GNUC_UNUSED gpointer data, GError ** error) |
298 | 83 | { | 83 | { |
299 | 84 | if (last_task == NULL) { | 84 | if (last_task == NULL) { |
300 | 85 | g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, "No task to put adjust return on."); | 85 | g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, "No task to put adjust return on."); |
301 | @@ -96,7 +96,7 @@ | |||
302 | 96 | } | 96 | } |
303 | 97 | 97 | ||
304 | 98 | static gboolean | 98 | static gboolean |
306 | 99 | option_param (const gchar * arg, const gchar * value, gpointer data, GError ** error) | 99 | option_param (G_GNUC_UNUSED const gchar * arg, const gchar * value, G_GNUC_UNUSED gpointer data, GError ** error) |
307 | 100 | { | 100 | { |
308 | 101 | if (last_task == NULL) { | 101 | if (last_task == NULL) { |
309 | 102 | g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, "No task to put adjust return on."); | 102 | g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, "No task to put adjust return on."); |
310 | @@ -108,7 +108,7 @@ | |||
311 | 108 | } | 108 | } |
312 | 109 | 109 | ||
313 | 110 | static gboolean | 110 | static gboolean |
315 | 111 | option_wait (const gchar * arg, const gchar * value, gpointer data, GError ** error) | 111 | option_wait (G_GNUC_UNUSED const gchar * arg, const gchar * value, G_GNUC_UNUSED gpointer data, GError ** error) |
316 | 112 | { | 112 | { |
317 | 113 | if (last_task == NULL) { | 113 | if (last_task == NULL) { |
318 | 114 | g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, "No task to add a wait on %s for.", value); | 114 | g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE, "No task to add a wait on %s for.", value); |
319 | @@ -125,7 +125,7 @@ | |||
320 | 125 | } | 125 | } |
321 | 126 | 126 | ||
322 | 127 | static gboolean | 127 | static gboolean |
324 | 128 | max_wait_hit (gpointer user_data) | 128 | max_wait_hit (G_GNUC_UNUSED gpointer user_data) |
325 | 129 | { | 129 | { |
326 | 130 | g_warning("Timing out at maximum wait of %d seconds.", max_wait); | 130 | g_warning("Timing out at maximum wait of %d seconds.", max_wait); |
327 | 131 | dbus_test_service_stop(service); | 131 | dbus_test_service_stop(service); |
328 | 132 | 132 | ||
329 | === modified file 'tests/Makefile.am' | |||
330 | --- tests/Makefile.am 2012-06-21 14:28:38 +0000 | |||
331 | +++ tests/Makefile.am 2012-10-02 21:09:33 +0000 | |||
332 | @@ -147,10 +147,7 @@ | |||
333 | 147 | @chmod +x $@ | 147 | @chmod +x $@ |
334 | 148 | XFAIL_TESTS += test-no-tasks | 148 | XFAIL_TESTS += test-no-tasks |
335 | 149 | 149 | ||
340 | 150 | # This test is failing on Jenkins for an unknown reason, we're disabiling | 150 | TESTS += test-output |
337 | 151 | # to unblock Jenkins. Result tracked in LP: #1010739 | ||
338 | 152 | |||
339 | 153 | # TESTS += test-output | ||
341 | 154 | test-output: Makefile.am | 151 | test-output: Makefile.am |
342 | 155 | @echo "#!/bin/sh -e" > $@ | 152 | @echo "#!/bin/sh -e" > $@ |
343 | 156 | @echo "$(DBUS_RUNNER) --task cat --parameter \"$(top_srcdir)/src/dbus-test-runner.c\" --task-name \"cat1\" --task cat --parameter \"$(top_srcdir)/src/dbus-test-runner.c\" --task-name \"cat2\" > testcat.output.txt" >> $@ | 153 | @echo "$(DBUS_RUNNER) --task cat --parameter \"$(top_srcdir)/src/dbus-test-runner.c\" --task-name \"cat1\" --task cat --parameter \"$(top_srcdir)/src/dbus-test-runner.c\" --task-name \"cat2\" > testcat.output.txt" >> $@ |
344 | @@ -173,7 +170,7 @@ | |||
345 | 173 | test-bustle: Makefile.am test-bustle.reference | 170 | test-bustle: Makefile.am test-bustle.reference |
346 | 174 | @echo "#!/bin/sh -e" > $@ | 171 | @echo "#!/bin/sh -e" > $@ |
347 | 175 | @echo $(DBUS_RUNNER) --bustle-data \"$(builddir)/test-bustle.bustle\" --task $(srcdir)/test-bustle-list.sh >> $@ | 172 | @echo $(DBUS_RUNNER) --bustle-data \"$(builddir)/test-bustle.bustle\" --task $(srcdir)/test-bustle-list.sh >> $@ |
349 | 176 | @echo "grep ^mc \"$(builddir)/test-bustle.bustle\" | grep ":1.1" | grep "ListNames" | cut -f 5-9 > test-bustle.filtered" >> $@ | 173 | @echo "grep ^sig \"$(builddir)/test-bustle.bustle\" | grep ":1.1" | grep "com.launchpad.dbustestrunner" | cut -f 5-9 > test-bustle.filtered" >> $@ |
350 | 177 | @echo "diff \"$(srcdir)/test-bustle.reference\" \"$(builddir)/test-bustle.filtered\"" >> $@ | 174 | @echo "diff \"$(srcdir)/test-bustle.reference\" \"$(builddir)/test-bustle.filtered\"" >> $@ |
351 | 178 | @chmod +x $@ | 175 | @chmod +x $@ |
352 | 179 | DISTCLEANFILES += test-bustle.bustle test-bustle.filtered | 176 | DISTCLEANFILES += test-bustle.bustle test-bustle.filtered |
353 | @@ -216,7 +213,8 @@ | |||
354 | 216 | @echo "--task $(srcdir)/test-bustle-list.sh \\" >> $@ | 213 | @echo "--task $(srcdir)/test-bustle-list.sh \\" >> $@ |
355 | 217 | @echo "--task $(srcdir)/test-bustle-list.sh \\" >> $@ | 214 | @echo "--task $(srcdir)/test-bustle-list.sh \\" >> $@ |
356 | 218 | @echo "--task $(srcdir)/test-bustle-list.sh \\" >> $@ | 215 | @echo "--task $(srcdir)/test-bustle-list.sh \\" >> $@ |
358 | 219 | @echo "--task $(srcdir)/test-bustle-list.sh \\" >> $@ | 216 | @echo "--task $(srcdir)/test-bustle-list.sh" >> $@ |
359 | 217 | @echo "$(srcdir)/test-bustle-data-check.sh \"$(builddir)/test-bustle-data.bustle\" 12" >> $@ | ||
360 | 220 | @chmod +x $@ | 218 | @chmod +x $@ |
361 | 221 | DISTCLEANFILES += test-bustle-data.bustle | 219 | DISTCLEANFILES += test-bustle-data.bustle |
362 | 222 | 220 | ||
363 | @@ -310,4 +308,5 @@ | |||
364 | 310 | EXTRA_DIST = \ | 308 | EXTRA_DIST = \ |
365 | 311 | delayrm.sh \ | 309 | delayrm.sh \ |
366 | 312 | test-bustle.reference \ | 310 | test-bustle.reference \ |
367 | 311 | test-bustle-data-check.sh \ | ||
368 | 313 | test-bustle-list.sh | 312 | test-bustle-list.sh |
369 | 314 | 313 | ||
370 | === added file 'tests/test-bustle-data-check.sh' | |||
371 | --- tests/test-bustle-data-check.sh 1970-01-01 00:00:00 +0000 | |||
372 | +++ tests/test-bustle-data-check.sh 2012-10-02 21:09:33 +0000 | |||
373 | @@ -0,0 +1,3 @@ | |||
374 | 1 | #!/bin/bash -e | ||
375 | 2 | |||
376 | 3 | [ `grep ^sig $1 | grep dbustestrunner | wc -l` -eq $2 ] | ||
377 | 0 | 4 | ||
378 | === modified file 'tests/test-bustle-list.sh' | |||
379 | --- tests/test-bustle-list.sh 2011-01-28 14:58:51 +0000 | |||
380 | +++ tests/test-bustle-list.sh 2012-10-02 21:09:33 +0000 | |||
381 | @@ -1,3 +1,3 @@ | |||
382 | 1 | #!/bin/sh | 1 | #!/bin/sh |
383 | 2 | sleep 1 | 2 | sleep 1 |
385 | 3 | dbus-send --session --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.ListNames | 3 | gdbus emit --session --object-path /test/dbustestrunner/signal --signal com.launchpad.dbustestrunner.signal |
386 | 4 | 4 | ||
387 | === modified file 'tests/test-bustle.reference' | |||
388 | --- tests/test-bustle.reference 2009-12-08 05:22:06 +0000 | |||
389 | +++ tests/test-bustle.reference 2012-10-02 21:09:33 +0000 | |||
390 | @@ -1,1 +1,1 @@ | |||
392 | 1 | :1.1 org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus ListNames | 1 | :1.1 /test/dbustestrunner/signal com.launchpad.dbustestrunner signal |
FAILED: Continuous integration, rev:52 jenkins. qa.ubuntu. com/job/ dbus-test- runner- ci/1/ jenkins. qa.ubuntu. com/job/ dbus-test- runner- ci/./label= precise/ 1/console
http://
Executed test runs:
FAILURE: http://