Merge lp:~charlesk/libappindicator/fix-test-merge into lp:libappindicator/13.04
- fix-test-merge
- Merge into trunk.13.04
Proposed by
Charles Kerr
Status: | Merged | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Approved by: | Ted Gould | ||||||||||||||||
Approved revision: | 253 | ||||||||||||||||
Merged at revision: | 248 | ||||||||||||||||
Proposed branch: | lp:~charlesk/libappindicator/fix-test-merge | ||||||||||||||||
Merge into: | lp:libappindicator/13.04 | ||||||||||||||||
Diff against target: |
789 lines (+106/-307) 18 files modified
autogen.sh (+1/-0) configure.ac (+2/-2) debian/changelog (+8/-9) debian/control (+1/-0) debian/rules (+9/-3) docs/reference/Makefile.am (+10/-12) docs/reference/tmpl/libappindicator-unused.sgml (+0/-42) gtk-doc.local.make (+0/-194) src/app-indicator.c (+10/-16) src/generate-id.c (+1/-1) tests/Makefile.am (+9/-1) tests/test-libappindicator-dbus-client.c (+0/-2) tests/test-libappindicator-fallback-item.c (+1/-1) tests/test-libappindicator-fallback-watcher.c (+2/-3) tests/test-libappindicator-status-client.c (+2/-4) tests/test-libappindicator-status-server.c (+22/-15) tests/test-libappindicator.c (+28/-0) tests/test-simple-app.c (+0/-2) |
||||||||||||||||
To merge this branch: | bzr merge lp:~charlesk/libappindicator/fix-test-merge | ||||||||||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ted Gould (community) | Approve | ||
PS Jenkins bot (community) | continuous-integration | Approve | |
Review via email:
|
Commit message
This is a continuation of ~mathieu-
Description of the change
This is a continuation of ~mathieu-
To post a comment you must log in.
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
review:
Approve
(continuous-integration)
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Ted Gould (ted) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'autogen.sh' |
2 | --- autogen.sh 2010-12-02 20:37:25 +0000 |
3 | +++ autogen.sh 2013-01-29 18:17:22 +0000 |
4 | @@ -7,6 +7,7 @@ |
5 | exit 1 |
6 | } |
7 | |
8 | +gtkdocize || exit 1 |
9 | USE_GNOME2_MACROS=1 \ |
10 | USE_COMMON_DOC_BUILD=yes \ |
11 | gnome-autogen.sh --enable-gtk-doc $@ |
12 | |
13 | === modified file 'configure.ac' |
14 | --- configure.ac 2012-07-11 19:19:21 +0000 |
15 | +++ configure.ac 2013-01-29 18:17:22 +0000 |
16 | @@ -33,7 +33,7 @@ |
17 | # GTK Doc |
18 | ########################### |
19 | |
20 | -GTK_DOC_CHECK([1.9]) |
21 | +GTK_DOC_CHECK([1.14],[--flavour no-tmpl]) |
22 | |
23 | |
24 | ########################### |
25 | @@ -42,7 +42,7 @@ |
26 | |
27 | GTK_REQUIRED_VERSION=2.18 |
28 | GTK3_REQUIRED_VERSION=2.91 |
29 | -GLIB_REQUIRED_VERSION=2.26 |
30 | +GLIB_REQUIRED_VERSION=2.35.4 |
31 | GIO_REQUIRED_VERSION=2.26 |
32 | INDICATOR_REQUIRED_VERSION=0.4.93 |
33 | DBUSMENUGTK_REQUIRED_VERSION=0.5.90 |
34 | |
35 | === modified file 'debian/changelog' |
36 | --- debian/changelog 2013-01-17 21:25:50 +0000 |
37 | +++ debian/changelog 2013-01-29 18:17:22 +0000 |
38 | @@ -1,11 +1,6 @@ |
39 | libappindicator (12.10.1-0ubuntu2) UNRELEASED; urgency=low |
40 | |
41 | - * acinclude.m4: Fix python multi-arch include issues. |
42 | - |
43 | - -- Chris J Arges <chris.j.arges@canonical.com> Thu, 17 Jan 2013 15:25:28 -0600 |
44 | - |
45 | -libappindicator (12.10.1-0ubuntu1) UNRELEASED; urgency=low |
46 | - |
47 | + [ Mathieu Trudel-Lapierre ] |
48 | * debian/control: |
49 | - Update style: use trailing commas at the end of dependency lists. |
50 | - Reorganize Build-Depends for clarity. |
51 | @@ -21,11 +16,15 @@ |
52 | - Add and export DPKG_GENSYMBOLS_CHECK_LEVEL. |
53 | - Override dh_autoreconf to run autogen.sh and not call configure. |
54 | - Override dh_auto_test to run tests per-flavor. |
55 | - - Temporarily disable tests. |
56 | * debian/*.install: |
57 | - Update paths for multiarch and for use with dh9 (remove debian/tmp...) |
58 | - |
59 | - -- Mathieu Trudel-Lapierre <mathieu-tl@ubuntu.com> Mon, 26 Nov 2012 11:02:18 -0500 |
60 | + * Fix gtkdoc tests and building of the documentation given a separate build |
61 | + directory. |
62 | + |
63 | + [ Chris J Arges ] |
64 | + * acinclude.m4: Fix python multi-arch include issues. |
65 | + |
66 | + -- Chris J Arges <chris.j.arges@canonical.com> Thu, 17 Jan 2013 15:25:28 -0600 |
67 | |
68 | libappindicator (12.10.0-0ubuntu1) quantal; urgency=low |
69 | |
70 | |
71 | === modified file 'debian/control' |
72 | --- debian/control 2012-11-27 14:51:20 +0000 |
73 | +++ debian/control 2013-01-29 18:17:22 +0000 |
74 | @@ -17,6 +17,7 @@ |
75 | xvfb, |
76 | valac-0.16, |
77 | mono-devel (>= 2.4.3), |
78 | + libglib2.0-dev (>= 2.35.4), |
79 | libgtk-3-dev (>= 2.91.3), |
80 | libgtk2.0-dev (>= 2.12.0), |
81 | python-gtk2-dev, |
82 | |
83 | === modified file 'debian/rules' |
84 | --- debian/rules 2012-12-04 17:01:40 +0000 |
85 | +++ debian/rules 2013-01-29 18:17:22 +0000 |
86 | @@ -20,6 +20,7 @@ |
87 | # Note: No cli here so that the pbuilder stuff works |
88 | clean: |
89 | dh_clean |
90 | + dh_autoreconf_clean |
91 | |
92 | override_dh_autoreconf: |
93 | NOCONFIGURE=1 dh_autoreconf ./autogen.sh |
94 | @@ -72,14 +73,19 @@ |
95 | override_dh_auto_test: $(FLAVORS:%=dotest-%) |
96 | |
97 | dotest-%: |
98 | - #dh_auto_test --builddirectory=build/$* |
99 | + ps -ef |
100 | + env |
101 | + dh_auto_test --builddirectory=build/$* -- |
102 | + |
103 | |
104 | dotest-gtk2: $(PY_VERSIONS:%=dotestgtk2-%) |
105 | # GTK2 flavor test was run on a per-python-version basis. |
106 | |
107 | dotestgtk2-%: |
108 | - #PYTHON=`which $*` \ |
109 | - # dh_auto_test --builddirectory=build/gtk2 |
110 | + ps -ef |
111 | + env |
112 | + PYTHON=`which $*` \ |
113 | + dh_auto_test --builddirectory=build/gtk2 -- |
114 | |
115 | override_dh_auto_clean: |
116 | dh_auto_clean |
117 | |
118 | === modified file 'docs/reference/Makefile.am' |
119 | --- docs/reference/Makefile.am 2011-02-11 04:03:01 +0000 |
120 | +++ docs/reference/Makefile.am 2013-01-29 18:17:22 +0000 |
121 | @@ -30,7 +30,7 @@ |
122 | # gtk-doc will search all .c & .h files beneath here for inline comments |
123 | # documenting the functions and macros. |
124 | # e.g. DOC_SOURCE_DIR=../../../gtk |
125 | -DOC_SOURCE_DIR=../../src |
126 | +DOC_SOURCE_DIR=$(top_srcdir)/src |
127 | |
128 | # Extra options to pass to gtkdoc-scangobj. Not normally needed. |
129 | SCANGOBJ_OPTIONS=--nogtkinit --type-init-func="g_type_init()" |
130 | @@ -102,7 +102,7 @@ |
131 | GTKDOC_LIBS=$(top_builddir)/src/$(APPINDICATORLIB) $(LIBRARY_LIBS) |
132 | |
133 | # This includes the standard gtk-doc make rules, copied by gtkdocize. |
134 | -include $(top_srcdir)/gtk-doc.local.make |
135 | +include $(top_srcdir)/gtk-doc.make |
136 | |
137 | # Other files to distribute |
138 | # e.g. EXTRA_DIST += version.xml.in |
139 | @@ -113,13 +113,11 @@ |
140 | # for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt |
141 | #DISTCLEANFILES += |
142 | |
143 | -# Comment this out if you want your docs-status tested during 'make check' |
144 | -TESTS = gtkdoc-in-srcdir |
145 | - |
146 | -gtkdoc-in-srcdir: Makefile.am |
147 | - @echo "#!/bin/sh" > $@ |
148 | - @echo "cd \"$(srcdir)\"" >> $@ |
149 | - @echo "$(GTKDOC_CHECK)" >> $@ |
150 | - @chmod +x $@ |
151 | -DISTCLEANFILES = gtkdoc-in-srcdir |
152 | - |
153 | +# Comment this out if you want 'make check' to test you doc status |
154 | +# and run some sanity checks |
155 | +if ENABLE_GTK_DOC |
156 | + TESTS_ENVIRONMENT = cd $(srcdir) && \ |
157 | + DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \ |
158 | + SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir) |
159 | +TESTS = $(GTKDOC_CHECK) |
160 | +endif |
161 | |
162 | === removed directory 'docs/reference/tmpl' |
163 | === removed file 'docs/reference/tmpl/libappindicator-unused.sgml' |
164 | --- docs/reference/tmpl/libappindicator-unused.sgml 2011-02-24 04:21:55 +0000 |
165 | +++ docs/reference/tmpl/libappindicator-unused.sgml 1970-01-01 00:00:00 +0000 |
166 | @@ -1,42 +0,0 @@ |
167 | -<!-- ##### MACRO APP_INDICATOR_SIGNAL_NEW_ACCESSIBLE_DESC ##### --> |
168 | -<para> |
169 | - |
170 | -</para> |
171 | - |
172 | - |
173 | -<!-- ##### SIGNAL AppIndicator::new-accessible-desc ##### --> |
174 | -<para> |
175 | - |
176 | -</para> |
177 | - |
178 | -@appindicator: the object which received the signal. |
179 | -@arg1: |
180 | - |
181 | -<!-- ##### ARG AppIndicator:accessible-desc ##### --> |
182 | -<para> |
183 | - |
184 | -</para> |
185 | - |
186 | - |
187 | -<!-- ##### ARG AppIndicator:icon-path ##### --> |
188 | -<para> |
189 | - |
190 | -</para> |
191 | - |
192 | - |
193 | -<!-- ##### FUNCTION app_indicator_get_accessible_desc ##### --> |
194 | -<para> |
195 | - |
196 | -</para> |
197 | - |
198 | -@self: |
199 | -@Returns: |
200 | - |
201 | -<!-- ##### FUNCTION app_indicator_set_accessible_desc ##### --> |
202 | -<para> |
203 | - |
204 | -</para> |
205 | - |
206 | -@self: |
207 | -@accessible_desc: |
208 | - |
209 | |
210 | === removed file 'gtk-doc.local.make' |
211 | --- gtk-doc.local.make 2009-12-08 21:03:27 +0000 |
212 | +++ gtk-doc.local.make 1970-01-01 00:00:00 +0000 |
213 | @@ -1,194 +0,0 @@ |
214 | -# -*- mode: makefile -*- |
215 | - |
216 | -#################################### |
217 | -# Everything below here is generic # |
218 | -#################################### |
219 | - |
220 | -if GTK_DOC_USE_LIBTOOL |
221 | -GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) |
222 | -GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) |
223 | -GTKDOC_RUN = $(LIBTOOL) --mode=execute |
224 | -else |
225 | -GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) |
226 | -GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) |
227 | -GTKDOC_RUN = sh -c |
228 | -endif |
229 | - |
230 | -# We set GPATH here; this gives us semantics for GNU make |
231 | -# which are more like other make's VPATH, when it comes to |
232 | -# whether a source that is a target of one rule is then |
233 | -# searched for in VPATH/GPATH. |
234 | -# |
235 | -GPATH = $(srcdir) |
236 | - |
237 | -TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) |
238 | - |
239 | -EXTRA_DIST = \ |
240 | - $(content_files) \ |
241 | - $(HTML_IMAGES) \ |
242 | - $(DOC_MAIN_SGML_FILE) |
243 | - |
244 | -DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \ |
245 | - $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp |
246 | - |
247 | -SCANOBJ_FILES = \ |
248 | - $(DOC_MODULE).args \ |
249 | - $(DOC_MODULE).hierarchy \ |
250 | - $(DOC_MODULE).interfaces \ |
251 | - $(DOC_MODULE).prerequisites \ |
252 | - $(DOC_MODULE).signals |
253 | - |
254 | -REPORT_FILES = \ |
255 | - $(DOC_MODULE)-undocumented.txt \ |
256 | - $(DOC_MODULE)-undeclared.txt \ |
257 | - $(DOC_MODULE)-unused.txt |
258 | - |
259 | -CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) |
260 | - |
261 | -if ENABLE_GTK_DOC |
262 | -all-local: html-build.stamp |
263 | -else |
264 | -all-local: |
265 | -endif |
266 | - |
267 | -docs: html-build.stamp |
268 | - |
269 | -$(REPORT_FILES): sgml-build.stamp |
270 | - |
271 | -#### scan #### |
272 | - |
273 | -scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) |
274 | - @echo 'gtk-doc: Scanning header files' |
275 | - @-chmod -R u+w $(srcdir) |
276 | - cd $(srcdir) && \ |
277 | - gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES) |
278 | - if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \ |
279 | - CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \ |
280 | - else \ |
281 | - cd $(srcdir) ; \ |
282 | - for i in $(SCANOBJ_FILES) ; do \ |
283 | - test -f $$i || touch $$i ; \ |
284 | - done \ |
285 | - fi |
286 | - touch scan-build.stamp |
287 | - |
288 | -$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp |
289 | - @true |
290 | - |
291 | -#### templates #### |
292 | - |
293 | -tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt |
294 | - @echo 'gtk-doc: Rebuilding template files' |
295 | - @-chmod -R u+w $(srcdir) |
296 | - cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) |
297 | - touch tmpl-build.stamp |
298 | - |
299 | -tmpl.stamp: tmpl-build.stamp |
300 | - @true |
301 | - |
302 | -tmpl/*.sgml: |
303 | - @true |
304 | - |
305 | - |
306 | -#### xml #### |
307 | - |
308 | -sgml-build.stamp: tmpl.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) |
309 | - @echo 'gtk-doc: Building XML' |
310 | - @-chmod -R u+w $(srcdir) |
311 | - cd $(srcdir) && \ |
312 | - gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS) |
313 | - touch sgml-build.stamp |
314 | - |
315 | -sgml.stamp: sgml-build.stamp |
316 | - @true |
317 | - |
318 | -#### html #### |
319 | - |
320 | -html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) |
321 | - @echo 'gtk-doc: Building HTML' |
322 | - @-chmod -R u+w $(srcdir) |
323 | - rm -rf $(srcdir)/html |
324 | - mkdir $(srcdir)/html |
325 | - mkhtml_options=""; \ |
326 | - gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ |
327 | - if test "$(?)" = "0"; then \ |
328 | - mkhtml_options=--path="$(srcdir)"; \ |
329 | - fi |
330 | - cd $(srcdir)/html && gtkdoc-mkhtml $(mkhtml_options) $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) |
331 | - test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html ) |
332 | - @echo 'gtk-doc: Fixing cross-references' |
333 | - cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) |
334 | - touch html-build.stamp |
335 | - |
336 | -############## |
337 | - |
338 | -clean-local: |
339 | - rm -f *~ *.bak |
340 | - rm -rf .libs |
341 | - |
342 | -distclean-local: |
343 | - cd $(srcdir) && \ |
344 | - rm -rf xml $(REPORT_FILES) \ |
345 | - $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt |
346 | - |
347 | -maintainer-clean-local: clean |
348 | - cd $(srcdir) && rm -rf xml html |
349 | - |
350 | -install-data-local: |
351 | - installfiles=`echo $(srcdir)/html/*`; \ |
352 | - if test "$$installfiles" = '$(srcdir)/html/*'; \ |
353 | - then echo '-- Nothing to install' ; \ |
354 | - else \ |
355 | - if test -n "$(DOC_MODULE_VERSION)"; then \ |
356 | - installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ |
357 | - else \ |
358 | - installdir="$(DESTDIR)$(TARGET_DIR)"; \ |
359 | - fi; \ |
360 | - $(mkinstalldirs) $${installdir} ; \ |
361 | - for i in $$installfiles; do \ |
362 | - echo '-- Installing '$$i ; \ |
363 | - $(INSTALL_DATA) $$i $${installdir}; \ |
364 | - done; \ |
365 | - if test -n "$(DOC_MODULE_VERSION)"; then \ |
366 | - mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ |
367 | - $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ |
368 | - mv -f $${installdir}/$(DOC_MODULE).devhelp \ |
369 | - $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp; \ |
370 | - fi; \ |
371 | - ! which gtkdoc-rebase >/dev/null 2>&1 || \ |
372 | - gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir} ; \ |
373 | - fi |
374 | - |
375 | -uninstall-local: |
376 | - if test -n "$(DOC_MODULE_VERSION)"; then \ |
377 | - installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ |
378 | - else \ |
379 | - installdir="$(DESTDIR)$(TARGET_DIR)"; \ |
380 | - fi; \ |
381 | - rm -rf $${installdir} |
382 | - |
383 | -# |
384 | -# Require gtk-doc when making dist |
385 | -# |
386 | -if ENABLE_GTK_DOC |
387 | -dist-check-gtkdoc: |
388 | -else |
389 | -dist-check-gtkdoc: |
390 | - @echo "*** gtk-doc must be installed and enabled in order to make dist" |
391 | - @false |
392 | -endif |
393 | - |
394 | -dist-hook: dist-check-gtkdoc dist-hook-local |
395 | - mkdir $(distdir)/tmpl |
396 | - mkdir $(distdir)/xml |
397 | - mkdir $(distdir)/html |
398 | - -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl |
399 | - -cp $(srcdir)/xml/*.xml $(distdir)/xml |
400 | - -cp $(srcdir)/html/* $(distdir)/html |
401 | - -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/ |
402 | - -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/ |
403 | - cd $(distdir) && rm -f $(DISTCLEANFILES) |
404 | - ! which gtkdoc-rebase >/dev/null 2>&1 || \ |
405 | - gtkdoc-rebase --online --relative --html-dir=$(distdir)/html |
406 | - |
407 | -.PHONY : dist-hook-local docs |
408 | |
409 | === modified file 'src/app-indicator.c' |
410 | --- src/app-indicator.c 2012-07-11 19:19:21 +0000 |
411 | +++ src/app-indicator.c 2013-01-29 18:17:22 +0000 |
412 | @@ -1886,20 +1886,14 @@ |
413 | gboolean changed = FALSE; |
414 | |
415 | if (g_strcmp0 (self->priv->attention_icon_name, icon_name) != 0) { |
416 | - if (self->priv->attention_icon_name) { |
417 | - g_free (self->priv->attention_icon_name); |
418 | - } |
419 | - |
420 | - self->priv->attention_icon_name = g_strdup(icon_name); |
421 | + g_free (self->priv->attention_icon_name); |
422 | + self->priv->attention_icon_name = g_strdup (icon_name); |
423 | changed = TRUE; |
424 | } |
425 | |
426 | if (g_strcmp0(self->priv->att_accessible_desc, icon_desc) != 0) { |
427 | - if (self->priv->att_accessible_desc) { |
428 | - g_free (self->priv->att_accessible_desc); |
429 | - } |
430 | - |
431 | - self->priv->att_accessible_desc = g_strdup(icon_name); |
432 | + g_free (self->priv->att_accessible_desc); |
433 | + self->priv->att_accessible_desc = g_strdup (icon_desc); |
434 | changed = TRUE; |
435 | } |
436 | |
437 | @@ -1910,12 +1904,12 @@ |
438 | GError * error = NULL; |
439 | |
440 | g_dbus_connection_emit_signal(self->priv->connection, |
441 | - NULL, |
442 | - self->priv->path, |
443 | - NOTIFICATION_ITEM_DBUS_IFACE, |
444 | - "NewAttentionIcon", |
445 | - NULL, |
446 | - &error); |
447 | + NULL, |
448 | + self->priv->path, |
449 | + NOTIFICATION_ITEM_DBUS_IFACE, |
450 | + "NewAttentionIcon", |
451 | + NULL, |
452 | + &error); |
453 | |
454 | if (error != NULL) { |
455 | g_warning("Unable to send signal for NewAttentionIcon: %s", error->message); |
456 | |
457 | === modified file 'src/generate-id.c' |
458 | --- src/generate-id.c 2010-12-08 17:00:54 +0000 |
459 | +++ src/generate-id.c 2013-01-29 18:17:22 +0000 |
460 | @@ -65,5 +65,5 @@ |
461 | } |
462 | } |
463 | |
464 | - return (((((category * 256) + first) * 256) + second) * 256) + third; |
465 | + return (((((category << 8) + first) << 8) + second) << 8) + third; |
466 | } |
467 | |
468 | === modified file 'tests/Makefile.am' |
469 | --- tests/Makefile.am 2011-02-11 04:14:28 +0000 |
470 | +++ tests/Makefile.am 2013-01-29 18:17:22 +0000 |
471 | @@ -137,6 +137,8 @@ |
472 | |
473 | test-libappindicator-fallback: test-libappindicator-fallback-watcher test-libappindicator-fallback-item Makefile.am |
474 | @echo "#!/bin/bash" > $@ |
475 | + @echo export DISPLAY= >> $@ |
476 | + @echo killall at-spi2-registryd >> $@ |
477 | @echo . $(srcdir)/run-xvfb.sh >> $@ |
478 | @echo $(DBUS_RUNNER) --task ./test-libappindicator-fallback-watcher --task-name Watcher --ignore-return --task ./test-libappindicator-fallback-item --task-name Item >> $@ |
479 | @chmod +x $@ |
480 | @@ -152,6 +154,8 @@ |
481 | |
482 | libappindicator-tests: libappindicator-tests-gtester Makefile.am |
483 | @echo "#!/bin/bash" > $@ |
484 | + @echo export DISPLAY= >> $@ |
485 | + @echo killall at-spi2-registryd >> $@ |
486 | @echo . $(srcdir)/run-xvfb.sh >> $@ |
487 | @echo export UBUNTU_MENUPROXY= >> $@ |
488 | @echo $(DBUS_RUNNER) --task ./libappindicator-tests-gtester >> $@ |
489 | @@ -166,10 +170,12 @@ |
490 | DISTCLEANFILES += $(XML_REPORT) $(HTML_REPORT) libappindicator-tests-gtester |
491 | |
492 | |
493 | -DBUS_RUNNER=dbus-test-runner --dbus-config /usr/share/dbus-test-runner/session.conf |
494 | +DBUS_RUNNER=dbus-test-runner -m 300 --dbus-config /usr/share/dbus-test-runner/session.conf |
495 | |
496 | test-libappindicator-dbus: test-libappindicator-dbus-client test-libappindicator-dbus-server Makefile.am |
497 | @echo "#!/bin/bash" > test-libappindicator-dbus |
498 | + @echo export DISPLAY= >> $@ |
499 | + @echo killall at-spi2-registryd >> $@ |
500 | @echo . $(srcdir)/run-xvfb.sh >> $@ |
501 | @echo $(DBUS_RUNNER) --task ./test-libappindicator-dbus-client --task-name Client --task ./test-libappindicator-dbus-server --task-name Server --ignore-return >> test-libappindicator-dbus |
502 | @chmod +x test-libappindicator-dbus |
503 | @@ -179,6 +185,8 @@ |
504 | |
505 | test-libappindicator-status: test-libappindicator-status-client test-libappindicator-status-server Makefile.am |
506 | @echo "#!/bin/bash" > test-libappindicator-status |
507 | + @echo export DISPLAY= >> $@ |
508 | + @echo killall at-spi2-registryd >> $@ |
509 | @echo . $(srcdir)/run-xvfb.sh >> $@ |
510 | @echo $(DBUS_RUNNER) --task ./test-libappindicator-status-client --task-name Client --task ./test-libappindicator-status-server --task-name Server --ignore-return >> test-libappindicator-status |
511 | @chmod +x test-libappindicator-status |
512 | |
513 | === modified file 'tests/test-libappindicator-dbus-client.c' |
514 | --- tests/test-libappindicator-dbus-client.c 2010-12-08 16:54:16 +0000 |
515 | +++ tests/test-libappindicator-dbus-client.c 2013-01-29 18:17:22 +0000 |
516 | @@ -204,8 +204,6 @@ |
517 | gint |
518 | main (gint argc, gchar * argv[]) |
519 | { |
520 | - g_type_init(); |
521 | - |
522 | GError * error = NULL; |
523 | DBusGConnection * session_bus = dbus_g_bus_get(DBUS_BUS_SESSION, &error); |
524 | if (error != NULL) { |
525 | |
526 | === modified file 'tests/test-libappindicator-fallback-item.c' |
527 | --- tests/test-libappindicator-fallback-item.c 2010-06-11 17:34:09 +0000 |
528 | +++ tests/test-libappindicator-fallback-item.c 2013-01-29 18:17:22 +0000 |
529 | @@ -138,7 +138,7 @@ |
530 | GtkWidget * menu = gtk_menu_new(); |
531 | app_indicator_set_menu(APP_INDICATOR(item), GTK_MENU(menu)); |
532 | |
533 | - g_timeout_add_seconds(2, kill_func, NULL); |
534 | + g_timeout_add_seconds(20, kill_func, NULL); |
535 | |
536 | mainloop = g_main_loop_new(NULL, FALSE); |
537 | g_main_loop_run(mainloop); |
538 | |
539 | === modified file 'tests/test-libappindicator-fallback-watcher.c' |
540 | --- tests/test-libappindicator-fallback-watcher.c 2010-06-11 17:35:21 +0000 |
541 | +++ tests/test-libappindicator-fallback-watcher.c 2013-01-29 18:17:22 +0000 |
542 | @@ -58,8 +58,6 @@ |
543 | int |
544 | main (int argv, char ** argc) |
545 | { |
546 | - g_type_init(); |
547 | - |
548 | g_debug("Waiting to init."); |
549 | |
550 | |
551 | @@ -77,6 +75,7 @@ |
552 | while (!has_owner && owner_count < 10000) { |
553 | org_freedesktop_DBus_name_has_owner(bus_proxy, "org.test", &has_owner, NULL); |
554 | owner_count++; |
555 | + g_usleep(500000); |
556 | } |
557 | |
558 | if (owner_count == 10000) { |
559 | @@ -104,7 +103,7 @@ |
560 | |
561 | /* This is the final kill function. It really shouldn't happen |
562 | unless we get an error. */ |
563 | - g_timeout_add(2000, kill_func, NULL); |
564 | + g_timeout_add_seconds(20, kill_func, NULL); |
565 | |
566 | g_debug("Entering Mainloop"); |
567 | |
568 | |
569 | === modified file 'tests/test-libappindicator-status-client.c' |
570 | --- tests/test-libappindicator-status-client.c 2010-03-02 20:31:37 +0000 |
571 | +++ tests/test-libappindicator-status-client.c 2013-01-29 18:17:22 +0000 |
572 | @@ -109,8 +109,6 @@ |
573 | gint |
574 | main (gint argc, gchar * argv[]) |
575 | { |
576 | - g_type_init(); |
577 | - |
578 | GError * error = NULL; |
579 | DBusGConnection * session_bus = dbus_g_bus_get(DBUS_BUS_SESSION, &error); |
580 | if (error != NULL) { |
581 | @@ -118,7 +116,7 @@ |
582 | return 1; |
583 | } |
584 | |
585 | - DBusGProxy * bus_proxy = dbus_g_proxy_new_for_name(session_bus, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS); |
586 | + DBusGProxy * bus_proxy = dbus_g_proxy_new_for_name(session_bus, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS); |
587 | guint nameret = 0; |
588 | |
589 | if (!org_freedesktop_DBus_request_name(bus_proxy, NOTIFICATION_WATCHER_DBUS_ADDR, 0, &nameret, &error)) { |
590 | @@ -137,7 +135,7 @@ |
591 | dbus_bus_add_match(dbus_g_connection_get_connection(session_bus), "type='signal',interface='" NOTIFICATION_ITEM_DBUS_IFACE "',member='NewStatus'", NULL); |
592 | |
593 | watchdog_hit = TRUE; |
594 | - g_timeout_add(1000, kill_func, NULL); |
595 | + g_timeout_add_seconds(20, kill_func, NULL); |
596 | |
597 | mainloop = g_main_loop_new(NULL, FALSE); |
598 | g_main_loop_run(mainloop); |
599 | |
600 | === modified file 'tests/test-libappindicator-status-server.c' |
601 | --- tests/test-libappindicator-status-server.c 2010-04-29 16:31:36 +0000 |
602 | +++ tests/test-libappindicator-status-server.c 2013-01-29 18:17:22 +0000 |
603 | @@ -22,34 +22,39 @@ |
604 | |
605 | |
606 | #include <stdlib.h> |
607 | -#include <dbus/dbus-glib.h> |
608 | -#include <dbus/dbus-glib-lowlevel.h> |
609 | #include <glib.h> |
610 | #include <app-indicator.h> |
611 | |
612 | static GMainLoop * mainloop = NULL; |
613 | static gboolean active = FALSE; |
614 | static guint toggle_count = 0; |
615 | +static GDBusConnection * connection = NULL; |
616 | + |
617 | +static gboolean |
618 | +times_up (gpointer unused G_GNUC_UNUSED) |
619 | +{ |
620 | + g_dbus_connection_flush_sync (connection, NULL, NULL); |
621 | + g_clear_object (&connection); |
622 | + |
623 | + g_main_loop_quit (mainloop); |
624 | + return G_SOURCE_REMOVE; |
625 | +} |
626 | |
627 | gboolean |
628 | toggle (gpointer userdata) |
629 | { |
630 | - if (active) { |
631 | - app_indicator_set_status (APP_INDICATOR(userdata), APP_INDICATOR_STATUS_ATTENTION); |
632 | - active = FALSE; |
633 | - } else { |
634 | - app_indicator_set_status (APP_INDICATOR(userdata), APP_INDICATOR_STATUS_ACTIVE); |
635 | - active = TRUE; |
636 | - } |
637 | - |
638 | - toggle_count++; |
639 | + const AppIndicatorStatus new_status = active ? APP_INDICATOR_STATUS_ATTENTION |
640 | + : APP_INDICATOR_STATUS_ACTIVE; |
641 | + app_indicator_set_status (APP_INDICATOR(userdata), new_status); |
642 | + ++toggle_count; |
643 | + active = !active; |
644 | |
645 | if (toggle_count == 100) { |
646 | - g_main_loop_quit(mainloop); |
647 | - return FALSE; |
648 | + g_timeout_add (100, times_up, NULL); |
649 | + return G_SOURCE_REMOVE; |
650 | } |
651 | |
652 | - return TRUE; |
653 | + return G_SOURCE_CONTINUE; |
654 | } |
655 | |
656 | gint |
657 | @@ -59,7 +64,8 @@ |
658 | |
659 | g_usleep(100000); |
660 | |
661 | - g_debug("DBus ID: %s", dbus_connection_get_server_id(dbus_g_connection_get_connection(dbus_g_bus_get(DBUS_BUS_SESSION, NULL)))); |
662 | + connection = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL); |
663 | + g_debug("DBus Name: %s", g_dbus_connection_get_unique_name (connection)); |
664 | |
665 | AppIndicator * ci = app_indicator_new ("my-id", "my-icon-name", APP_INDICATOR_CATEGORY_APPLICATION_STATUS); |
666 | app_indicator_set_attention_icon (ci, "my-attention-icon"); |
667 | @@ -76,6 +82,7 @@ |
668 | g_main_loop_run(mainloop); |
669 | |
670 | g_object_unref(G_OBJECT(ci)); |
671 | + |
672 | g_debug("Quiting"); |
673 | |
674 | return 0; |
675 | |
676 | === modified file 'tests/test-libappindicator.c' |
677 | --- tests/test-libappindicator.c 2012-01-29 03:42:34 +0000 |
678 | +++ tests/test-libappindicator.c 2013-01-29 18:17:22 +0000 |
679 | @@ -28,6 +28,16 @@ |
680 | #include <libdbusmenu-glib/menuitem.h> |
681 | #include <libdbusmenu-glib/server.h> |
682 | |
683 | +static gboolean |
684 | +allow_warnings (const gchar *log_domain, GLogLevelFlags log_level, |
685 | + const gchar *message, gpointer user_data) |
686 | +{ |
687 | + // By default, gtest will fail a test on even a warning message. |
688 | + // But since some of our sub-libraries are noisy (especially at-spi2), |
689 | + // only fail on critical or worse. |
690 | + return ((log_level & G_LOG_LEVEL_MASK) <= G_LOG_LEVEL_CRITICAL); |
691 | +} |
692 | + |
693 | void |
694 | test_libappindicator_prop_signals_status_helper (AppIndicator * ci, gchar * status, gboolean * signalactivated) |
695 | { |
696 | @@ -45,6 +55,8 @@ |
697 | void |
698 | test_libappindicator_prop_signals (void) |
699 | { |
700 | + g_test_log_set_fatal_handler (allow_warnings, NULL); |
701 | + |
702 | AppIndicator * ci = app_indicator_new ("test-app-indicator", |
703 | "indicator-messages", |
704 | APP_INDICATOR_CATEGORY_APPLICATION_STATUS); |
705 | @@ -115,6 +127,8 @@ |
706 | void |
707 | test_libappindicator_init_set_props (void) |
708 | { |
709 | + g_test_log_set_fatal_handler (allow_warnings, NULL); |
710 | + |
711 | AppIndicator * ci = app_indicator_new ("my-id", |
712 | "my-name", |
713 | APP_INDICATOR_CATEGORY_APPLICATION_STATUS); |
714 | @@ -139,6 +153,8 @@ |
715 | void |
716 | test_libappindicator_init_with_props (void) |
717 | { |
718 | + g_test_log_set_fatal_handler (allow_warnings, NULL); |
719 | + |
720 | AppIndicator * ci = app_indicator_new ("my-id", |
721 | "my-name", |
722 | APP_INDICATOR_CATEGORY_APPLICATION_STATUS); |
723 | @@ -161,6 +177,8 @@ |
724 | void |
725 | test_libappindicator_init (void) |
726 | { |
727 | + g_test_log_set_fatal_handler (allow_warnings, NULL); |
728 | + |
729 | AppIndicator * ci = app_indicator_new ("my-id", "my-name", APP_INDICATOR_CATEGORY_APPLICATION_STATUS); |
730 | g_assert(ci != NULL); |
731 | g_object_unref(G_OBJECT(ci)); |
732 | @@ -170,6 +188,8 @@ |
733 | void |
734 | test_libappindicator_set_label (void) |
735 | { |
736 | + g_test_log_set_fatal_handler (allow_warnings, NULL); |
737 | + |
738 | AppIndicator * ci = app_indicator_new ("my-id", |
739 | "my-name", |
740 | APP_INDICATOR_CATEGORY_APPLICATION_STATUS); |
741 | @@ -232,6 +252,8 @@ |
742 | void |
743 | test_libappindicator_set_menu (void) |
744 | { |
745 | + g_test_log_set_fatal_handler (allow_warnings, NULL); |
746 | + |
747 | AppIndicator * ci = app_indicator_new ("my-id", |
748 | "my-name", |
749 | APP_INDICATOR_CATEGORY_APPLICATION_STATUS); |
750 | @@ -301,6 +323,8 @@ |
751 | void |
752 | test_libappindicator_label_signals (void) |
753 | { |
754 | + g_test_log_set_fatal_handler (allow_warnings, NULL); |
755 | + |
756 | gint label_signals_count = 0; |
757 | AppIndicator * ci = app_indicator_new ("my-id", |
758 | "my-name", |
759 | @@ -352,6 +376,8 @@ |
760 | void |
761 | test_libappindicator_desktop_menu (void) |
762 | { |
763 | + g_test_log_set_fatal_handler (allow_warnings, NULL); |
764 | + |
765 | AppIndicator * ci = app_indicator_new ("my-id-desktop-menu", |
766 | "my-name", |
767 | APP_INDICATOR_CATEGORY_APPLICATION_STATUS); |
768 | @@ -388,6 +414,8 @@ |
769 | void |
770 | test_libappindicator_desktop_menu_bad (void) |
771 | { |
772 | + g_test_log_set_fatal_handler (allow_warnings, NULL); |
773 | + |
774 | AppIndicator * ci = app_indicator_new ("my-id-desktop-menu-bad", |
775 | "my-name", |
776 | APP_INDICATOR_CATEGORY_APPLICATION_STATUS); |
777 | |
778 | === modified file 'tests/test-simple-app.c' |
779 | --- tests/test-simple-app.c 2010-04-29 16:31:36 +0000 |
780 | +++ tests/test-simple-app.c 2013-01-29 18:17:22 +0000 |
781 | @@ -31,8 +31,6 @@ |
782 | int |
783 | main (int argc, char ** argv) |
784 | { |
785 | - g_type_init(); |
786 | - |
787 | DbusmenuServer * dms = dbusmenu_server_new("/menu"); |
788 | DbusmenuMenuitem * dmi = dbusmenu_menuitem_new(); |
789 | dbusmenu_menuitem_property_set(dmi, "label", "Bob"); |
PASSED: Continuous integration, rev:253 jenkins. qa.ubuntu. com/job/ libappindicator -ci/28/ jenkins. qa.ubuntu. com/job/ libappindicator -ci/./build= pbuilder, distribution= coverity- raring, flavor= amd64/28/ console jenkins. qa.ubuntu. com/job/ libappindicator -ci/./build= pbuilder, distribution= raring, flavor= i386/28/ console jenkins. qa.ubuntu. com/job/ libappindicator -ci/./build= pbuilder, distribution= coverity- raring, flavor= amd64/28/ /artifact/ results/ coverity/ NO_COVERITY_ DEFECTS. txt jenkins. qa.ubuntu. com/job/ libappindicator -ci/./build= pbuilder, distribution= raring, flavor= i386/28/ /artifact/ results/ coverity/ NO_COVERITY_ DEFECTS. txt
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
Coverity artifacts:
http://
http://
Click here to trigger a rebuild: jenkins. qa.ubuntu. com/job/ libappindicator -ci/28/ /rebuild/?
http://