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

Proposed by Mathieu Trudel-Lapierre
Status: Merged
Merged at revision: 248
Proposed branch: lp:~cyphermox/libappindicator/fix-tests
Merge into: lp:libappindicator/13.04
Diff against target: 623 lines (+65/-271)
15 files modified
acinclude.m4 (+1/-6)
autogen.sh (+1/-0)
configure.ac (+1/-1)
debian/changelog (+3/-2)
debian/rules (+9/-3)
docs/reference/Makefile.am (+10/-12)
docs/reference/tmpl/libappindicator-unused.sgml (+0/-42)
gtk-doc.local.make (+0/-194)
tests/Makefile.am (+8/-0)
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 (+1/-3)
tests/test-libappindicator.c (+28/-0)
tests/test-simple-app.c (+0/-2)
To merge this branch: bzr merge lp:~cyphermox/libappindicator/fix-tests
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Didier Roche-Tolomelli Needs Fixing
Review via email: mp+139140@code.launchpad.net

Description of the change

Fix tests for gtkdoc; based on Charles' excellent work already (https://code.launchpad.net/~charlesk/libappindicator/lp-1083425/+merge/137267)

Addresses the tests being commented out and fixed DOC_SOURCE_DIR to correctly point to the right code directory given build with an "external" build dir (because of the parallel gtk2 and gtk3 builds).

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

This looks good to me. However, looking at configure in the pbuilder, it seems there is one python extension build-dep missing:

checking for headers required to compile python extensions... not found
configure: error: could not find Python headers
dh_auto_configure: ../../configure --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --libdir=${prefix}/lib/x86_64-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --with-gtk=2 --enable-gtk-doc --disable-scrollkeeper --enable-introspection returned exit code 1
make[1]: *** [doconfiguregtk2-python2.7] Error 2
make[1]: Leaving directory `/tmp/buildd/libappindicator-12.10.1'
make: *** [build] Error 2

Once this is fixed, feel free to approve it :)

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Allan LeSage (allanlesage) wrote :

Concerning the Coverity-raring failure above, I'm going to disable that check temporarily as there are unrelated legit defects.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Allan LeSage (allanlesage) wrote :

Apologies for this spurious failure--re-approving and should be ok to land. . . .

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'acinclude.m4'
--- acinclude.m4 2009-12-12 02:23:37 +0000
+++ acinclude.m4 2013-01-17 16:23:26 +0000
@@ -228,12 +228,7 @@
228[AC_REQUIRE([AM_PATH_PYTHON])228[AC_REQUIRE([AM_PATH_PYTHON])
229AC_MSG_CHECKING(for headers required to compile python extensions)229AC_MSG_CHECKING(for headers required to compile python extensions)
230dnl deduce PYTHON_INCLUDES230dnl deduce PYTHON_INCLUDES
231py_prefix=`$PYTHON -c "import sys; print sys.prefix"`231PYTHON_INCLUDES="$PYTHON_INCLUDES `python-config --includes`"
232py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
233PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
234if test "$py_prefix" != "$py_exec_prefix"; then
235 PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
236fi
237AC_SUBST(PYTHON_INCLUDES)232AC_SUBST(PYTHON_INCLUDES)
238dnl check if the headers exist:233dnl check if the headers exist:
239save_CPPFLAGS="$CPPFLAGS"234save_CPPFLAGS="$CPPFLAGS"
240235
=== modified file 'autogen.sh'
--- autogen.sh 2010-12-02 20:37:25 +0000
+++ autogen.sh 2013-01-17 16:23:26 +0000
@@ -7,6 +7,7 @@
7 exit 17 exit 1
8}8}
99
10gtkdocize || exit 1
10USE_GNOME2_MACROS=1 \11USE_GNOME2_MACROS=1 \
11USE_COMMON_DOC_BUILD=yes \12USE_COMMON_DOC_BUILD=yes \
12gnome-autogen.sh --enable-gtk-doc $@13gnome-autogen.sh --enable-gtk-doc $@
1314
=== modified file 'configure.ac'
--- configure.ac 2012-07-11 19:19:21 +0000
+++ configure.ac 2013-01-17 16:23:26 +0000
@@ -33,7 +33,7 @@
33# GTK Doc33# GTK Doc
34###########################34###########################
3535
36GTK_DOC_CHECK([1.9])36GTK_DOC_CHECK([1.14],[--flavour no-tmpl])
3737
3838
39###########################39###########################
4040
=== modified file 'debian/changelog'
--- debian/changelog 2012-11-30 22:36:23 +0000
+++ debian/changelog 2013-01-17 16:23:26 +0000
@@ -1,4 +1,4 @@
1libappindicator (12.10.1-0ubuntu1) UNRELEASED; urgency=low1libappindicator (12.10.9-0ubuntu1~mtrudel1) raring; urgency=low
22
3 * debian/control:3 * debian/control:
4 - Update style: use trailing commas at the end of dependency lists.4 - Update style: use trailing commas at the end of dependency lists.
@@ -15,9 +15,10 @@
15 - Add and export DPKG_GENSYMBOLS_CHECK_LEVEL.15 - Add and export DPKG_GENSYMBOLS_CHECK_LEVEL.
16 - Override dh_autoreconf to run autogen.sh and not call configure.16 - Override dh_autoreconf to run autogen.sh and not call configure.
17 - Override dh_auto_test to run tests per-flavor.17 - Override dh_auto_test to run tests per-flavor.
18 - Temporarily disable tests.
19 * debian/*.install:18 * debian/*.install:
20 - Update paths for multiarch and for use with dh9 (remove debian/tmp...)19 - Update paths for multiarch and for use with dh9 (remove debian/tmp...)
20 * Fix gtkdoc tests and building of the documentation given a separate build
21 directory.
2122
22 -- Mathieu Trudel-Lapierre <mathieu-tl@ubuntu.com> Mon, 26 Nov 2012 11:02:18 -050023 -- Mathieu Trudel-Lapierre <mathieu-tl@ubuntu.com> Mon, 26 Nov 2012 11:02:18 -0500
2324
2425
=== modified file 'debian/rules'
--- debian/rules 2012-12-04 17:01:40 +0000
+++ debian/rules 2013-01-17 16:23:26 +0000
@@ -20,6 +20,7 @@
20# Note: No cli here so that the pbuilder stuff works20# Note: No cli here so that the pbuilder stuff works
21clean:21clean:
22 dh_clean22 dh_clean
23 dh_autoreconf_clean
2324
24override_dh_autoreconf:25override_dh_autoreconf:
25 NOCONFIGURE=1 dh_autoreconf ./autogen.sh26 NOCONFIGURE=1 dh_autoreconf ./autogen.sh
@@ -72,14 +73,19 @@
72override_dh_auto_test: $(FLAVORS:%=dotest-%)73override_dh_auto_test: $(FLAVORS:%=dotest-%)
7374
74dotest-%:75dotest-%:
75 #dh_auto_test --builddirectory=build/$*76 ps -ef
77 env
78 dh_auto_test --builddirectory=build/$* --
79
7680
77dotest-gtk2: $(PY_VERSIONS:%=dotestgtk2-%)81dotest-gtk2: $(PY_VERSIONS:%=dotestgtk2-%)
78 # GTK2 flavor test was run on a per-python-version basis.82 # GTK2 flavor test was run on a per-python-version basis.
7983
80dotestgtk2-%:84dotestgtk2-%:
81 #PYTHON=`which $*` \85 ps -ef
82 # dh_auto_test --builddirectory=build/gtk286 env
87 PYTHON=`which $*` \
88 dh_auto_test --builddirectory=build/gtk2 --
8389
84override_dh_auto_clean:90override_dh_auto_clean:
85 dh_auto_clean91 dh_auto_clean
8692
=== modified file 'docs/reference/Makefile.am'
--- docs/reference/Makefile.am 2011-02-11 04:03:01 +0000
+++ docs/reference/Makefile.am 2013-01-17 16:23:26 +0000
@@ -30,7 +30,7 @@
30# gtk-doc will search all .c & .h files beneath here for inline comments30# gtk-doc will search all .c & .h files beneath here for inline comments
31# documenting the functions and macros.31# documenting the functions and macros.
32# e.g. DOC_SOURCE_DIR=../../../gtk32# e.g. DOC_SOURCE_DIR=../../../gtk
33DOC_SOURCE_DIR=../../src33DOC_SOURCE_DIR=$(top_srcdir)/src
3434
35# Extra options to pass to gtkdoc-scangobj. Not normally needed.35# Extra options to pass to gtkdoc-scangobj. Not normally needed.
36SCANGOBJ_OPTIONS=--nogtkinit --type-init-func="g_type_init()"36SCANGOBJ_OPTIONS=--nogtkinit --type-init-func="g_type_init()"
@@ -102,7 +102,7 @@
102GTKDOC_LIBS=$(top_builddir)/src/$(APPINDICATORLIB) $(LIBRARY_LIBS)102GTKDOC_LIBS=$(top_builddir)/src/$(APPINDICATORLIB) $(LIBRARY_LIBS)
103103
104# This includes the standard gtk-doc make rules, copied by gtkdocize.104# This includes the standard gtk-doc make rules, copied by gtkdocize.
105include $(top_srcdir)/gtk-doc.local.make105include $(top_srcdir)/gtk-doc.make
106106
107# Other files to distribute107# Other files to distribute
108# e.g. EXTRA_DIST += version.xml.in108# e.g. EXTRA_DIST += version.xml.in
@@ -113,13 +113,11 @@
113# for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt113# for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt
114#DISTCLEANFILES +=114#DISTCLEANFILES +=
115115
116# Comment this out if you want your docs-status tested during 'make check'116# Comment this out if you want 'make check' to test you doc status
117TESTS = gtkdoc-in-srcdir117# and run some sanity checks
118118if ENABLE_GTK_DOC
119gtkdoc-in-srcdir: Makefile.am119 TESTS_ENVIRONMENT = cd $(srcdir) && \
120 @echo "#!/bin/sh" > $@120 DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \
121 @echo "cd \"$(srcdir)\"" >> $@121 SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir)
122 @echo "$(GTKDOC_CHECK)" >> $@122TESTS = $(GTKDOC_CHECK)
123 @chmod +x $@123endif
124DISTCLEANFILES = gtkdoc-in-srcdir
125
126124
=== removed directory 'docs/reference/tmpl'
=== removed file 'docs/reference/tmpl/libappindicator-unused.sgml'
--- docs/reference/tmpl/libappindicator-unused.sgml 2011-02-24 04:21:55 +0000
+++ docs/reference/tmpl/libappindicator-unused.sgml 1970-01-01 00:00:00 +0000
@@ -1,42 +0,0 @@
1<!-- ##### MACRO APP_INDICATOR_SIGNAL_NEW_ACCESSIBLE_DESC ##### -->
2<para>
3
4</para>
5
6
7<!-- ##### SIGNAL AppIndicator::new-accessible-desc ##### -->
8<para>
9
10</para>
11
12@appindicator: the object which received the signal.
13@arg1:
14
15<!-- ##### ARG AppIndicator:accessible-desc ##### -->
16<para>
17
18</para>
19
20
21<!-- ##### ARG AppIndicator:icon-path ##### -->
22<para>
23
24</para>
25
26
27<!-- ##### FUNCTION app_indicator_get_accessible_desc ##### -->
28<para>
29
30</para>
31
32@self:
33@Returns:
34
35<!-- ##### FUNCTION app_indicator_set_accessible_desc ##### -->
36<para>
37
38</para>
39
40@self:
41@accessible_desc:
42
430
=== removed file 'gtk-doc.local.make'
--- gtk-doc.local.make 2009-12-08 21:03:27 +0000
+++ gtk-doc.local.make 1970-01-01 00:00:00 +0000
@@ -1,194 +0,0 @@
1# -*- mode: makefile -*-
2
3####################################
4# Everything below here is generic #
5####################################
6
7if GTK_DOC_USE_LIBTOOL
8GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
9GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
10GTKDOC_RUN = $(LIBTOOL) --mode=execute
11else
12GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
13GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
14GTKDOC_RUN = sh -c
15endif
16
17# We set GPATH here; this gives us semantics for GNU make
18# which are more like other make's VPATH, when it comes to
19# whether a source that is a target of one rule is then
20# searched for in VPATH/GPATH.
21#
22GPATH = $(srcdir)
23
24TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
25
26EXTRA_DIST = \
27 $(content_files) \
28 $(HTML_IMAGES) \
29 $(DOC_MAIN_SGML_FILE)
30
31DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
32 $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
33
34SCANOBJ_FILES = \
35 $(DOC_MODULE).args \
36 $(DOC_MODULE).hierarchy \
37 $(DOC_MODULE).interfaces \
38 $(DOC_MODULE).prerequisites \
39 $(DOC_MODULE).signals
40
41REPORT_FILES = \
42 $(DOC_MODULE)-undocumented.txt \
43 $(DOC_MODULE)-undeclared.txt \
44 $(DOC_MODULE)-unused.txt
45
46CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS)
47
48if ENABLE_GTK_DOC
49all-local: html-build.stamp
50else
51all-local:
52endif
53
54docs: html-build.stamp
55
56$(REPORT_FILES): sgml-build.stamp
57
58#### scan ####
59
60scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
61 @echo 'gtk-doc: Scanning header files'
62 @-chmod -R u+w $(srcdir)
63 cd $(srcdir) && \
64 gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
65 if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \
66 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) ; \
67 else \
68 cd $(srcdir) ; \
69 for i in $(SCANOBJ_FILES) ; do \
70 test -f $$i || touch $$i ; \
71 done \
72 fi
73 touch scan-build.stamp
74
75$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp
76 @true
77
78#### templates ####
79
80tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
81 @echo 'gtk-doc: Rebuilding template files'
82 @-chmod -R u+w $(srcdir)
83 cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS)
84 touch tmpl-build.stamp
85
86tmpl.stamp: tmpl-build.stamp
87 @true
88
89tmpl/*.sgml:
90 @true
91
92
93#### xml ####
94
95sgml-build.stamp: tmpl.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files)
96 @echo 'gtk-doc: Building XML'
97 @-chmod -R u+w $(srcdir)
98 cd $(srcdir) && \
99 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)
100 touch sgml-build.stamp
101
102sgml.stamp: sgml-build.stamp
103 @true
104
105#### html ####
106
107html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
108 @echo 'gtk-doc: Building HTML'
109 @-chmod -R u+w $(srcdir)
110 rm -rf $(srcdir)/html
111 mkdir $(srcdir)/html
112 mkhtml_options=""; \
113 gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \
114 if test "$(?)" = "0"; then \
115 mkhtml_options=--path="$(srcdir)"; \
116 fi
117 cd $(srcdir)/html && gtkdoc-mkhtml $(mkhtml_options) $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
118 test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
119 @echo 'gtk-doc: Fixing cross-references'
120 cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
121 touch html-build.stamp
122
123##############
124
125clean-local:
126 rm -f *~ *.bak
127 rm -rf .libs
128
129distclean-local:
130 cd $(srcdir) && \
131 rm -rf xml $(REPORT_FILES) \
132 $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
133
134maintainer-clean-local: clean
135 cd $(srcdir) && rm -rf xml html
136
137install-data-local:
138 installfiles=`echo $(srcdir)/html/*`; \
139 if test "$$installfiles" = '$(srcdir)/html/*'; \
140 then echo '-- Nothing to install' ; \
141 else \
142 if test -n "$(DOC_MODULE_VERSION)"; then \
143 installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \
144 else \
145 installdir="$(DESTDIR)$(TARGET_DIR)"; \
146 fi; \
147 $(mkinstalldirs) $${installdir} ; \
148 for i in $$installfiles; do \
149 echo '-- Installing '$$i ; \
150 $(INSTALL_DATA) $$i $${installdir}; \
151 done; \
152 if test -n "$(DOC_MODULE_VERSION)"; then \
153 mv -f $${installdir}/$(DOC_MODULE).devhelp2 \
154 $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \
155 mv -f $${installdir}/$(DOC_MODULE).devhelp \
156 $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp; \
157 fi; \
158 ! which gtkdoc-rebase >/dev/null 2>&1 || \
159 gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir} ; \
160 fi
161
162uninstall-local:
163 if test -n "$(DOC_MODULE_VERSION)"; then \
164 installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \
165 else \
166 installdir="$(DESTDIR)$(TARGET_DIR)"; \
167 fi; \
168 rm -rf $${installdir}
169
170#
171# Require gtk-doc when making dist
172#
173if ENABLE_GTK_DOC
174dist-check-gtkdoc:
175else
176dist-check-gtkdoc:
177 @echo "*** gtk-doc must be installed and enabled in order to make dist"
178 @false
179endif
180
181dist-hook: dist-check-gtkdoc dist-hook-local
182 mkdir $(distdir)/tmpl
183 mkdir $(distdir)/xml
184 mkdir $(distdir)/html
185 -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
186 -cp $(srcdir)/xml/*.xml $(distdir)/xml
187 -cp $(srcdir)/html/* $(distdir)/html
188 -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/
189 -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/
190 cd $(distdir) && rm -f $(DISTCLEANFILES)
191 ! which gtkdoc-rebase >/dev/null 2>&1 || \
192 gtkdoc-rebase --online --relative --html-dir=$(distdir)/html
193
194.PHONY : dist-hook-local docs
1950
=== modified file 'tests/Makefile.am'
--- tests/Makefile.am 2011-02-11 04:14:28 +0000
+++ tests/Makefile.am 2013-01-17 16:23:26 +0000
@@ -137,6 +137,8 @@
137137
138test-libappindicator-fallback: test-libappindicator-fallback-watcher test-libappindicator-fallback-item Makefile.am138test-libappindicator-fallback: test-libappindicator-fallback-watcher test-libappindicator-fallback-item Makefile.am
139 @echo "#!/bin/bash" > $@139 @echo "#!/bin/bash" > $@
140 @echo export DISPLAY= >> $@
141 @echo killall at-spi2-registryd >> $@
140 @echo . $(srcdir)/run-xvfb.sh >> $@142 @echo . $(srcdir)/run-xvfb.sh >> $@
141 @echo $(DBUS_RUNNER) --task ./test-libappindicator-fallback-watcher --task-name Watcher --ignore-return --task ./test-libappindicator-fallback-item --task-name Item >> $@143 @echo $(DBUS_RUNNER) --task ./test-libappindicator-fallback-watcher --task-name Watcher --ignore-return --task ./test-libappindicator-fallback-item --task-name Item >> $@
142 @chmod +x $@144 @chmod +x $@
@@ -152,6 +154,8 @@
152154
153libappindicator-tests: libappindicator-tests-gtester Makefile.am155libappindicator-tests: libappindicator-tests-gtester Makefile.am
154 @echo "#!/bin/bash" > $@156 @echo "#!/bin/bash" > $@
157 @echo export DISPLAY= >> $@
158 @echo killall at-spi2-registryd >> $@
155 @echo . $(srcdir)/run-xvfb.sh >> $@159 @echo . $(srcdir)/run-xvfb.sh >> $@
156 @echo export UBUNTU_MENUPROXY= >> $@160 @echo export UBUNTU_MENUPROXY= >> $@
157 @echo $(DBUS_RUNNER) --task ./libappindicator-tests-gtester >> $@161 @echo $(DBUS_RUNNER) --task ./libappindicator-tests-gtester >> $@
@@ -170,6 +174,8 @@
170174
171test-libappindicator-dbus: test-libappindicator-dbus-client test-libappindicator-dbus-server Makefile.am175test-libappindicator-dbus: test-libappindicator-dbus-client test-libappindicator-dbus-server Makefile.am
172 @echo "#!/bin/bash" > test-libappindicator-dbus176 @echo "#!/bin/bash" > test-libappindicator-dbus
177 @echo export DISPLAY= >> $@
178 @echo killall at-spi2-registryd >> $@
173 @echo . $(srcdir)/run-xvfb.sh >> $@179 @echo . $(srcdir)/run-xvfb.sh >> $@
174 @echo $(DBUS_RUNNER) --task ./test-libappindicator-dbus-client --task-name Client --task ./test-libappindicator-dbus-server --task-name Server --ignore-return >> test-libappindicator-dbus180 @echo $(DBUS_RUNNER) --task ./test-libappindicator-dbus-client --task-name Client --task ./test-libappindicator-dbus-server --task-name Server --ignore-return >> test-libappindicator-dbus
175 @chmod +x test-libappindicator-dbus181 @chmod +x test-libappindicator-dbus
@@ -179,6 +185,8 @@
179185
180test-libappindicator-status: test-libappindicator-status-client test-libappindicator-status-server Makefile.am186test-libappindicator-status: test-libappindicator-status-client test-libappindicator-status-server Makefile.am
181 @echo "#!/bin/bash" > test-libappindicator-status187 @echo "#!/bin/bash" > test-libappindicator-status
188 @echo export DISPLAY= >> $@
189 @echo killall at-spi2-registryd >> $@
182 @echo . $(srcdir)/run-xvfb.sh >> $@190 @echo . $(srcdir)/run-xvfb.sh >> $@
183 @echo $(DBUS_RUNNER) --task ./test-libappindicator-status-client --task-name Client --task ./test-libappindicator-status-server --task-name Server --ignore-return >> test-libappindicator-status191 @echo $(DBUS_RUNNER) --task ./test-libappindicator-status-client --task-name Client --task ./test-libappindicator-status-server --task-name Server --ignore-return >> test-libappindicator-status
184 @chmod +x test-libappindicator-status192 @chmod +x test-libappindicator-status
185193
=== modified file 'tests/test-libappindicator-dbus-client.c'
--- tests/test-libappindicator-dbus-client.c 2010-12-08 16:54:16 +0000
+++ tests/test-libappindicator-dbus-client.c 2013-01-17 16:23:26 +0000
@@ -204,8 +204,6 @@
204gint204gint
205main (gint argc, gchar * argv[])205main (gint argc, gchar * argv[])
206{206{
207 g_type_init();
208
209 GError * error = NULL;207 GError * error = NULL;
210 DBusGConnection * session_bus = dbus_g_bus_get(DBUS_BUS_SESSION, &error);208 DBusGConnection * session_bus = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
211 if (error != NULL) {209 if (error != NULL) {
212210
=== modified file 'tests/test-libappindicator-fallback-item.c'
--- tests/test-libappindicator-fallback-item.c 2010-06-11 17:34:09 +0000
+++ tests/test-libappindicator-fallback-item.c 2013-01-17 16:23:26 +0000
@@ -138,7 +138,7 @@
138 GtkWidget * menu = gtk_menu_new();138 GtkWidget * menu = gtk_menu_new();
139 app_indicator_set_menu(APP_INDICATOR(item), GTK_MENU(menu));139 app_indicator_set_menu(APP_INDICATOR(item), GTK_MENU(menu));
140140
141 g_timeout_add_seconds(2, kill_func, NULL);141 g_timeout_add_seconds(20, kill_func, NULL);
142142
143 mainloop = g_main_loop_new(NULL, FALSE);143 mainloop = g_main_loop_new(NULL, FALSE);
144 g_main_loop_run(mainloop);144 g_main_loop_run(mainloop);
145145
=== modified file 'tests/test-libappindicator-fallback-watcher.c'
--- tests/test-libappindicator-fallback-watcher.c 2010-06-11 17:35:21 +0000
+++ tests/test-libappindicator-fallback-watcher.c 2013-01-17 16:23:26 +0000
@@ -58,8 +58,6 @@
58int58int
59main (int argv, char ** argc)59main (int argv, char ** argc)
60{60{
61 g_type_init();
62
63 g_debug("Waiting to init.");61 g_debug("Waiting to init.");
6462
6563
@@ -77,6 +75,7 @@
77 while (!has_owner && owner_count < 10000) {75 while (!has_owner && owner_count < 10000) {
78 org_freedesktop_DBus_name_has_owner(bus_proxy, "org.test", &has_owner, NULL);76 org_freedesktop_DBus_name_has_owner(bus_proxy, "org.test", &has_owner, NULL);
79 owner_count++;77 owner_count++;
78 g_usleep(500000);
80 }79 }
8180
82 if (owner_count == 10000) {81 if (owner_count == 10000) {
@@ -104,7 +103,7 @@
104103
105 /* This is the final kill function. It really shouldn't happen104 /* This is the final kill function. It really shouldn't happen
106 unless we get an error. */105 unless we get an error. */
107 g_timeout_add(2000, kill_func, NULL);106 g_timeout_add_seconds(20, kill_func, NULL);
108107
109 g_debug("Entering Mainloop");108 g_debug("Entering Mainloop");
110109
111110
=== modified file 'tests/test-libappindicator-status-client.c'
--- tests/test-libappindicator-status-client.c 2010-03-02 20:31:37 +0000
+++ tests/test-libappindicator-status-client.c 2013-01-17 16:23:26 +0000
@@ -109,8 +109,6 @@
109gint109gint
110main (gint argc, gchar * argv[])110main (gint argc, gchar * argv[])
111{111{
112 g_type_init();
113
114 GError * error = NULL;112 GError * error = NULL;
115 DBusGConnection * session_bus = dbus_g_bus_get(DBUS_BUS_SESSION, &error);113 DBusGConnection * session_bus = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
116 if (error != NULL) {114 if (error != NULL) {
@@ -137,7 +135,7 @@
137 dbus_bus_add_match(dbus_g_connection_get_connection(session_bus), "type='signal',interface='" NOTIFICATION_ITEM_DBUS_IFACE "',member='NewStatus'", NULL);135 dbus_bus_add_match(dbus_g_connection_get_connection(session_bus), "type='signal',interface='" NOTIFICATION_ITEM_DBUS_IFACE "',member='NewStatus'", NULL);
138136
139 watchdog_hit = TRUE;137 watchdog_hit = TRUE;
140 g_timeout_add(1000, kill_func, NULL);138 g_timeout_add_seconds(20, kill_func, NULL);
141139
142 mainloop = g_main_loop_new(NULL, FALSE);140 mainloop = g_main_loop_new(NULL, FALSE);
143 g_main_loop_run(mainloop);141 g_main_loop_run(mainloop);
144142
=== modified file 'tests/test-libappindicator.c'
--- tests/test-libappindicator.c 2012-01-29 03:42:34 +0000
+++ tests/test-libappindicator.c 2013-01-17 16:23:26 +0000
@@ -28,6 +28,16 @@
28#include <libdbusmenu-glib/menuitem.h>28#include <libdbusmenu-glib/menuitem.h>
29#include <libdbusmenu-glib/server.h>29#include <libdbusmenu-glib/server.h>
3030
31static gboolean
32allow_warnings (const gchar *log_domain, GLogLevelFlags log_level,
33 const gchar *message, gpointer user_data)
34{
35 // By default, gtest will fail a test on even a warning message.
36 // But since some of our sub-libraries are noisy (especially at-spi2),
37 // only fail on critical or worse.
38 return ((log_level & G_LOG_LEVEL_MASK) <= G_LOG_LEVEL_CRITICAL);
39}
40
31void41void
32test_libappindicator_prop_signals_status_helper (AppIndicator * ci, gchar * status, gboolean * signalactivated)42test_libappindicator_prop_signals_status_helper (AppIndicator * ci, gchar * status, gboolean * signalactivated)
33{43{
@@ -45,6 +55,8 @@
45void55void
46test_libappindicator_prop_signals (void)56test_libappindicator_prop_signals (void)
47{57{
58 g_test_log_set_fatal_handler (allow_warnings, NULL);
59
48 AppIndicator * ci = app_indicator_new ("test-app-indicator",60 AppIndicator * ci = app_indicator_new ("test-app-indicator",
49 "indicator-messages",61 "indicator-messages",
50 APP_INDICATOR_CATEGORY_APPLICATION_STATUS);62 APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
@@ -115,6 +127,8 @@
115void127void
116test_libappindicator_init_set_props (void)128test_libappindicator_init_set_props (void)
117{129{
130 g_test_log_set_fatal_handler (allow_warnings, NULL);
131
118 AppIndicator * ci = app_indicator_new ("my-id",132 AppIndicator * ci = app_indicator_new ("my-id",
119 "my-name",133 "my-name",
120 APP_INDICATOR_CATEGORY_APPLICATION_STATUS);134 APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
@@ -139,6 +153,8 @@
139void153void
140test_libappindicator_init_with_props (void)154test_libappindicator_init_with_props (void)
141{155{
156 g_test_log_set_fatal_handler (allow_warnings, NULL);
157
142 AppIndicator * ci = app_indicator_new ("my-id",158 AppIndicator * ci = app_indicator_new ("my-id",
143 "my-name",159 "my-name",
144 APP_INDICATOR_CATEGORY_APPLICATION_STATUS);160 APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
@@ -161,6 +177,8 @@
161void177void
162test_libappindicator_init (void)178test_libappindicator_init (void)
163{179{
180 g_test_log_set_fatal_handler (allow_warnings, NULL);
181
164 AppIndicator * ci = app_indicator_new ("my-id", "my-name", APP_INDICATOR_CATEGORY_APPLICATION_STATUS);182 AppIndicator * ci = app_indicator_new ("my-id", "my-name", APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
165 g_assert(ci != NULL);183 g_assert(ci != NULL);
166 g_object_unref(G_OBJECT(ci));184 g_object_unref(G_OBJECT(ci));
@@ -170,6 +188,8 @@
170void188void
171test_libappindicator_set_label (void)189test_libappindicator_set_label (void)
172{190{
191 g_test_log_set_fatal_handler (allow_warnings, NULL);
192
173 AppIndicator * ci = app_indicator_new ("my-id",193 AppIndicator * ci = app_indicator_new ("my-id",
174 "my-name",194 "my-name",
175 APP_INDICATOR_CATEGORY_APPLICATION_STATUS);195 APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
@@ -232,6 +252,8 @@
232void252void
233test_libappindicator_set_menu (void)253test_libappindicator_set_menu (void)
234{254{
255 g_test_log_set_fatal_handler (allow_warnings, NULL);
256
235 AppIndicator * ci = app_indicator_new ("my-id",257 AppIndicator * ci = app_indicator_new ("my-id",
236 "my-name",258 "my-name",
237 APP_INDICATOR_CATEGORY_APPLICATION_STATUS);259 APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
@@ -301,6 +323,8 @@
301void323void
302test_libappindicator_label_signals (void)324test_libappindicator_label_signals (void)
303{325{
326 g_test_log_set_fatal_handler (allow_warnings, NULL);
327
304 gint label_signals_count = 0;328 gint label_signals_count = 0;
305 AppIndicator * ci = app_indicator_new ("my-id",329 AppIndicator * ci = app_indicator_new ("my-id",
306 "my-name",330 "my-name",
@@ -352,6 +376,8 @@
352void376void
353test_libappindicator_desktop_menu (void)377test_libappindicator_desktop_menu (void)
354{378{
379 g_test_log_set_fatal_handler (allow_warnings, NULL);
380
355 AppIndicator * ci = app_indicator_new ("my-id-desktop-menu",381 AppIndicator * ci = app_indicator_new ("my-id-desktop-menu",
356 "my-name",382 "my-name",
357 APP_INDICATOR_CATEGORY_APPLICATION_STATUS);383 APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
@@ -388,6 +414,8 @@
388void414void
389test_libappindicator_desktop_menu_bad (void)415test_libappindicator_desktop_menu_bad (void)
390{416{
417 g_test_log_set_fatal_handler (allow_warnings, NULL);
418
391 AppIndicator * ci = app_indicator_new ("my-id-desktop-menu-bad",419 AppIndicator * ci = app_indicator_new ("my-id-desktop-menu-bad",
392 "my-name",420 "my-name",
393 APP_INDICATOR_CATEGORY_APPLICATION_STATUS);421 APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
394422
=== modified file 'tests/test-simple-app.c'
--- tests/test-simple-app.c 2010-04-29 16:31:36 +0000
+++ tests/test-simple-app.c 2013-01-17 16:23:26 +0000
@@ -31,8 +31,6 @@
31int31int
32main (int argc, char ** argv)32main (int argc, char ** argv)
33{33{
34 g_type_init();
35
36 DbusmenuServer * dms = dbusmenu_server_new("/menu");34 DbusmenuServer * dms = dbusmenu_server_new("/menu");
37 DbusmenuMenuitem * dmi = dbusmenu_menuitem_new();35 DbusmenuMenuitem * dmi = dbusmenu_menuitem_new();
38 dbusmenu_menuitem_property_set(dmi, "label", "Bob");36 dbusmenu_menuitem_property_set(dmi, "label", "Bob");

Subscribers

People subscribed via source and target branches