From effd665a42d8cd01fd72549150fb1fd029ad8d3f Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Fri, 30 Nov 2012 11:09:57 -0600 Subject: update our use of gtk-doc from 1.9 to 1.18. --- autogen.sh | 1 + configure.ac | 2 +- docs/reference/Makefile.am | 20 ++- docs/reference/tmpl/libappindicator-unused.sgml | 42 ----- gtk-doc.local.make | 194 ------------------------ 5 files changed, 11 insertions(+), 248 deletions(-) delete mode 100644 docs/reference/tmpl/libappindicator-unused.sgml delete mode 100644 gtk-doc.local.make diff --git a/autogen.sh b/autogen.sh index 2058d34..56ee12f 100755 --- a/autogen.sh +++ b/autogen.sh @@ -7,6 +7,7 @@ which gnome-autogen.sh || { exit 1 } +gtkdocize || exit 1 USE_GNOME2_MACROS=1 \ USE_COMMON_DOC_BUILD=yes \ gnome-autogen.sh --enable-gtk-doc $@ diff --git a/configure.ac b/configure.ac index ee03390..db9d859 100644 --- a/configure.ac +++ b/configure.ac @@ -33,7 +33,7 @@ PKG_PROG_PKG_CONFIG # GTK Doc ########################### -GTK_DOC_CHECK([1.9]) +GTK_DOC_CHECK([1.14],[--flavour no-tmpl]) ########################### diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am index 8f87b34..f3c7fa7 100644 --- a/docs/reference/Makefile.am +++ b/docs/reference/Makefile.am @@ -102,7 +102,7 @@ GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_srcdir)/src -I$(top_srcdir)/src $(LIBRARY_ GTKDOC_LIBS=$(top_builddir)/src/$(APPINDICATORLIB) $(LIBRARY_LIBS) # This includes the standard gtk-doc make rules, copied by gtkdocize. -include $(top_srcdir)/gtk-doc.local.make +include $(top_srcdir)/gtk-doc.make # Other files to distribute # e.g. EXTRA_DIST += version.xml.in @@ -113,13 +113,11 @@ EXTRA_DIST += version.xml.in libappindicator-docs.sgml.in # for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt #DISTCLEANFILES += -# Comment this out if you want your docs-status tested during 'make check' -TESTS = gtkdoc-in-srcdir - -gtkdoc-in-srcdir: Makefile.am - @echo "#!/bin/sh" > $@ - @echo "cd \"$(srcdir)\"" >> $@ - @echo "$(GTKDOC_CHECK)" >> $@ - @chmod +x $@ -DISTCLEANFILES = gtkdoc-in-srcdir - +# Comment this out if you want 'make check' to test you doc status +# and run some sanity checks +if ENABLE_GTK_DOC + TESTS_ENVIRONMENT = cd $(srcdir) && \ + DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \ + SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir) +#TESTS = $(GTKDOC_CHECK) +endif diff --git a/docs/reference/tmpl/libappindicator-unused.sgml b/docs/reference/tmpl/libappindicator-unused.sgml deleted file mode 100644 index 789a03f..0000000 --- a/docs/reference/tmpl/libappindicator-unused.sgml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - -@appindicator: the object which received the signal. -@arg1: - - - - - - - - - - - - - - - - - - -@self: -@Returns: - - - - - - -@self: -@accessible_desc: - diff --git a/gtk-doc.local.make b/gtk-doc.local.make deleted file mode 100644 index 3dcda60..0000000 --- a/gtk-doc.local.make +++ /dev/null @@ -1,194 +0,0 @@ -# -*- mode: makefile -*- - -#################################### -# Everything below here is generic # -#################################### - -if GTK_DOC_USE_LIBTOOL -GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -GTKDOC_RUN = $(LIBTOOL) --mode=execute -else -GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -GTKDOC_RUN = sh -c -endif - -# We set GPATH here; this gives us semantics for GNU make -# which are more like other make's VPATH, when it comes to -# whether a source that is a target of one rule is then -# searched for in VPATH/GPATH. -# -GPATH = $(srcdir) - -TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) - -EXTRA_DIST = \ - $(content_files) \ - $(HTML_IMAGES) \ - $(DOC_MAIN_SGML_FILE) - -DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \ - $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp - -SCANOBJ_FILES = \ - $(DOC_MODULE).args \ - $(DOC_MODULE).hierarchy \ - $(DOC_MODULE).interfaces \ - $(DOC_MODULE).prerequisites \ - $(DOC_MODULE).signals - -REPORT_FILES = \ - $(DOC_MODULE)-undocumented.txt \ - $(DOC_MODULE)-undeclared.txt \ - $(DOC_MODULE)-unused.txt - -CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) - -if ENABLE_GTK_DOC -all-local: html-build.stamp -else -all-local: -endif - -docs: html-build.stamp - -$(REPORT_FILES): sgml-build.stamp - -#### scan #### - -scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) - @echo 'gtk-doc: Scanning header files' - @-chmod -R u+w $(srcdir) - cd $(srcdir) && \ - gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES) - if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \ - 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) ; \ - else \ - cd $(srcdir) ; \ - for i in $(SCANOBJ_FILES) ; do \ - test -f $$i || touch $$i ; \ - done \ - fi - touch scan-build.stamp - -$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp - @true - -#### templates #### - -tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt - @echo 'gtk-doc: Rebuilding template files' - @-chmod -R u+w $(srcdir) - cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) - touch tmpl-build.stamp - -tmpl.stamp: tmpl-build.stamp - @true - -tmpl/*.sgml: - @true - - -#### xml #### - -sgml-build.stamp: tmpl.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) - @echo 'gtk-doc: Building XML' - @-chmod -R u+w $(srcdir) - cd $(srcdir) && \ - 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) - touch sgml-build.stamp - -sgml.stamp: sgml-build.stamp - @true - -#### html #### - -html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) - @echo 'gtk-doc: Building HTML' - @-chmod -R u+w $(srcdir) - rm -rf $(srcdir)/html - mkdir $(srcdir)/html - mkhtml_options=""; \ - gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ - if test "$(?)" = "0"; then \ - mkhtml_options=--path="$(srcdir)"; \ - fi - cd $(srcdir)/html && gtkdoc-mkhtml $(mkhtml_options) $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) - test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html ) - @echo 'gtk-doc: Fixing cross-references' - cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) - touch html-build.stamp - -############## - -clean-local: - rm -f *~ *.bak - rm -rf .libs - -distclean-local: - cd $(srcdir) && \ - rm -rf xml $(REPORT_FILES) \ - $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt - -maintainer-clean-local: clean - cd $(srcdir) && rm -rf xml html - -install-data-local: - installfiles=`echo $(srcdir)/html/*`; \ - if test "$$installfiles" = '$(srcdir)/html/*'; \ - then echo '-- Nothing to install' ; \ - else \ - if test -n "$(DOC_MODULE_VERSION)"; then \ - installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ - else \ - installdir="$(DESTDIR)$(TARGET_DIR)"; \ - fi; \ - $(mkinstalldirs) $${installdir} ; \ - for i in $$installfiles; do \ - echo '-- Installing '$$i ; \ - $(INSTALL_DATA) $$i $${installdir}; \ - done; \ - if test -n "$(DOC_MODULE_VERSION)"; then \ - mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ - $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ - mv -f $${installdir}/$(DOC_MODULE).devhelp \ - $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp; \ - fi; \ - ! which gtkdoc-rebase >/dev/null 2>&1 || \ - gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir} ; \ - fi - -uninstall-local: - if test -n "$(DOC_MODULE_VERSION)"; then \ - installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ - else \ - installdir="$(DESTDIR)$(TARGET_DIR)"; \ - fi; \ - rm -rf $${installdir} - -# -# Require gtk-doc when making dist -# -if ENABLE_GTK_DOC -dist-check-gtkdoc: -else -dist-check-gtkdoc: - @echo "*** gtk-doc must be installed and enabled in order to make dist" - @false -endif - -dist-hook: dist-check-gtkdoc dist-hook-local - mkdir $(distdir)/tmpl - mkdir $(distdir)/xml - mkdir $(distdir)/html - -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl - -cp $(srcdir)/xml/*.xml $(distdir)/xml - -cp $(srcdir)/html/* $(distdir)/html - -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/ - -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/ - cd $(distdir) && rm -f $(DISTCLEANFILES) - ! which gtkdoc-rebase >/dev/null 2>&1 || \ - gtkdoc-rebase --online --relative --html-dir=$(distdir)/html - -.PHONY : dist-hook-local docs -- cgit v1.2.3 From 35683feaeda793ac2951140bcd5b4b2163cab647 Mon Sep 17 00:00:00 2001 From: Mathieu Trudel-Lapierre Date: Thu, 6 Dec 2012 10:23:51 -0500 Subject: Temporarily disable gtk-doc completeness tests until they can be fixed. --- debian/changelog | 2 +- debian/rules | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 7643608..4bad68e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,7 +15,7 @@ libappindicator (12.10.1-0ubuntu1) UNRELEASED; urgency=low - Add and export DPKG_GENSYMBOLS_CHECK_LEVEL. - Override dh_autoreconf to run autogen.sh and not call configure. - Override dh_auto_test to run tests per-flavor. - - Temporarily disable tests. + - Temporarily disable gtk-doc completeness tests until they can be fixed. * debian/*.install: - Update paths for multiarch and for use with dh9 (remove debian/tmp...) diff --git a/debian/rules b/debian/rules index c4f16bc..ae06afc 100755 --- a/debian/rules +++ b/debian/rules @@ -72,14 +72,21 @@ override_dh_install: override_dh_auto_test: $(FLAVORS:%=dotest-%) dotest-%: - #dh_auto_test --builddirectory=build/$* + # + # Not running the gtk-doc tests to check that the documentation is complete... + # + dh_auto_test --builddirectory=build/$* -- -C tests + dotest-gtk2: $(PY_VERSIONS:%=dotestgtk2-%) # GTK2 flavor test was run on a per-python-version basis. dotestgtk2-%: - #PYTHON=`which $*` \ - # dh_auto_test --builddirectory=build/gtk2 + # + # Not running the gtk-doc tests to check that the documentation is complete... + # + PYTHON=`which $*` \ + dh_auto_test --builddirectory=build/gtk2 -- -C tests override_dh_auto_clean: dh_auto_clean -- cgit v1.2.3 From db9a00b33653e9ebc1820b2ffa7a89836466d5a6 Mon Sep 17 00:00:00 2001 From: Mathieu Trudel-Lapierre Date: Thu, 6 Dec 2012 10:30:29 -0500 Subject: Add reference to the bug we're waiting for a fix for; re: gtk-doc completeness, missing links and undocumented symbols --- debian/rules | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/rules b/debian/rules index ae06afc..fe79c71 100755 --- a/debian/rules +++ b/debian/rules @@ -74,6 +74,7 @@ override_dh_auto_test: $(FLAVORS:%=dotest-%) dotest-%: # # Not running the gtk-doc tests to check that the documentation is complete... + # See bug (LP: #1083425) # dh_auto_test --builddirectory=build/$* -- -C tests @@ -84,6 +85,7 @@ dotest-gtk2: $(PY_VERSIONS:%=dotestgtk2-%) dotestgtk2-%: # # Not running the gtk-doc tests to check that the documentation is complete... + # See bug (LP: #1083425) # PYTHON=`which $*` \ dh_auto_test --builddirectory=build/gtk2 -- -C tests -- cgit v1.2.3 From 06056540ac3d9f8f11d13bb9d5cb6a5f8d62584d Mon Sep 17 00:00:00 2001 From: Mathieu Trudel-Lapierre Date: Fri, 7 Dec 2012 17:57:05 -0500 Subject: Re-enable docs --- debian/rules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/rules b/debian/rules index fe79c71..62f99e4 100755 --- a/debian/rules +++ b/debian/rules @@ -76,7 +76,7 @@ dotest-%: # Not running the gtk-doc tests to check that the documentation is complete... # See bug (LP: #1083425) # - dh_auto_test --builddirectory=build/$* -- -C tests + dh_auto_test --builddirectory=build/$* -- dotest-gtk2: $(PY_VERSIONS:%=dotestgtk2-%) @@ -88,7 +88,7 @@ dotestgtk2-%: # See bug (LP: #1083425) # PYTHON=`which $*` \ - dh_auto_test --builddirectory=build/gtk2 -- -C tests + dh_auto_test --builddirectory=build/gtk2 -- override_dh_auto_clean: dh_auto_clean -- cgit v1.2.3 From 8aad2505fc5e0e92fbf704bee635d5672f071eb5 Mon Sep 17 00:00:00 2001 From: Mathieu Trudel-Lapierre Date: Mon, 10 Dec 2012 22:51:01 -0500 Subject: Remove entry about disabling tests for documentation: they're fixed. --- debian/changelog | 1 - debian/rules | 8 -------- 2 files changed, 9 deletions(-) diff --git a/debian/changelog b/debian/changelog index 6c9ef81..3b8c5b0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,7 +15,6 @@ libappindicator (12.10.1-0ubuntu1) UNRELEASED; urgency=low - Add and export DPKG_GENSYMBOLS_CHECK_LEVEL. - Override dh_autoreconf to run autogen.sh and not call configure. - Override dh_auto_test to run tests per-flavor. - - Temporarily disable gtk-doc completeness tests until they can be fixed. * debian/*.install: - Update paths for multiarch and for use with dh9 (remove debian/tmp...) * Fix gtkdoc tests and building of the documentation given a separate build diff --git a/debian/rules b/debian/rules index 62f99e4..4637722 100755 --- a/debian/rules +++ b/debian/rules @@ -72,10 +72,6 @@ override_dh_install: override_dh_auto_test: $(FLAVORS:%=dotest-%) dotest-%: - # - # Not running the gtk-doc tests to check that the documentation is complete... - # See bug (LP: #1083425) - # dh_auto_test --builddirectory=build/$* -- @@ -83,10 +79,6 @@ dotest-gtk2: $(PY_VERSIONS:%=dotestgtk2-%) # GTK2 flavor test was run on a per-python-version basis. dotestgtk2-%: - # - # Not running the gtk-doc tests to check that the documentation is complete... - # See bug (LP: #1083425) - # PYTHON=`which $*` \ dh_auto_test --builddirectory=build/gtk2 -- -- cgit v1.2.3 From 59a0f715f324fb45001364a5876a6fd0b51a107a Mon Sep 17 00:00:00 2001 From: Mathieu Trudel-Lapierre Date: Tue, 11 Dec 2012 11:32:17 -0500 Subject: Properly retrieve the path to python headers. --- acinclude.m4 | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 3e98bd3..a6b9ebe 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -228,12 +228,7 @@ AC_DEFUN([AM_CHECK_PYTHON_HEADERS], [AC_REQUIRE([AM_PATH_PYTHON]) AC_MSG_CHECKING(for headers required to compile python extensions) dnl deduce PYTHON_INCLUDES -py_prefix=`$PYTHON -c "import sys; print sys.prefix"` -py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` -PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" -if test "$py_prefix" != "$py_exec_prefix"; then - PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}" -fi +PYTHON_INCLUDES="$PYTHON_INCLUDES `python-config --includes`" AC_SUBST(PYTHON_INCLUDES) dnl check if the headers exist: save_CPPFLAGS="$CPPFLAGS" -- cgit v1.2.3 From b598e7cb3fc5491d93debde743f5e67037dfb6f1 Mon Sep 17 00:00:00 2001 From: Mathieu Trudel-Lapierre Date: Tue, 8 Jan 2013 10:33:31 -0500 Subject: More traces --- debian/changelog | 2 +- debian/rules | 4 ++++ tests/Makefile.am | 8 ++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 3b8c5b0..52eed2c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -libappindicator (12.10.1-0ubuntu1) UNRELEASED; urgency=low +libappindicator (12.10.9-0ubuntu1~mtrudel1) raring; urgency=low * debian/control: - Update style: use trailing commas at the end of dependency lists. diff --git a/debian/rules b/debian/rules index 4637722..5da5273 100755 --- a/debian/rules +++ b/debian/rules @@ -72,6 +72,8 @@ override_dh_install: override_dh_auto_test: $(FLAVORS:%=dotest-%) dotest-%: + ps -ef + env dh_auto_test --builddirectory=build/$* -- @@ -79,6 +81,8 @@ dotest-gtk2: $(PY_VERSIONS:%=dotestgtk2-%) # GTK2 flavor test was run on a per-python-version basis. dotestgtk2-%: + ps -ef + env PYTHON=`which $*` \ dh_auto_test --builddirectory=build/gtk2 -- diff --git a/tests/Makefile.am b/tests/Makefile.am index a65f320..4d3be1c 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -137,6 +137,8 @@ test_libappindicator_fallback_item_LDADD = \ test-libappindicator-fallback: test-libappindicator-fallback-watcher test-libappindicator-fallback-item Makefile.am @echo "#!/bin/bash" > $@ + @echo export DISPLAY= >> $@ + @echo killall at-spi2-registryd >> $@ @echo . $(srcdir)/run-xvfb.sh >> $@ @echo $(DBUS_RUNNER) --task ./test-libappindicator-fallback-watcher --task-name Watcher --ignore-return --task ./test-libappindicator-fallback-item --task-name Item >> $@ @chmod +x $@ @@ -152,6 +154,8 @@ HTML_REPORT = libappindicator-check-results.html libappindicator-tests: libappindicator-tests-gtester Makefile.am @echo "#!/bin/bash" > $@ + @echo export DISPLAY= >> $@ + @echo killall at-spi2-registryd >> $@ @echo . $(srcdir)/run-xvfb.sh >> $@ @echo export UBUNTU_MENUPROXY= >> $@ @echo $(DBUS_RUNNER) --task ./libappindicator-tests-gtester >> $@ @@ -170,6 +174,8 @@ DBUS_RUNNER=dbus-test-runner --dbus-config /usr/share/dbus-test-runner/session.c test-libappindicator-dbus: test-libappindicator-dbus-client test-libappindicator-dbus-server Makefile.am @echo "#!/bin/bash" > test-libappindicator-dbus + @echo export DISPLAY= >> $@ + @echo killall at-spi2-registryd >> $@ @echo . $(srcdir)/run-xvfb.sh >> $@ @echo $(DBUS_RUNNER) --task ./test-libappindicator-dbus-client --task-name Client --task ./test-libappindicator-dbus-server --task-name Server --ignore-return >> test-libappindicator-dbus @chmod +x test-libappindicator-dbus @@ -179,6 +185,8 @@ XFAIL_TESTS = test-libappindicator-dbus test-libappindicator-status: test-libappindicator-status-client test-libappindicator-status-server Makefile.am @echo "#!/bin/bash" > test-libappindicator-status + @echo export DISPLAY= >> $@ + @echo killall at-spi2-registryd >> $@ @echo . $(srcdir)/run-xvfb.sh >> $@ @echo $(DBUS_RUNNER) --task ./test-libappindicator-status-client --task-name Client --task ./test-libappindicator-status-server --task-name Server --ignore-return >> test-libappindicator-status @chmod +x test-libappindicator-status -- cgit v1.2.3 From 616555a9509f3b1f313ea3056e30c48737eeb908 Mon Sep 17 00:00:00 2001 From: Michael Terry Date: Thu, 10 Jan 2013 17:18:55 -0500 Subject: some packaging fixes to make tests more resistant to timing issues and warnings from sub-libraries --- debian/rules | 1 + tests/test-libappindicator-fallback-item.c | 2 +- tests/test-libappindicator-fallback-watcher.c | 3 ++- tests/test-libappindicator.c | 28 +++++++++++++++++++++++++++ 4 files changed, 32 insertions(+), 2 deletions(-) diff --git a/debian/rules b/debian/rules index 4637722..8512858 100755 --- a/debian/rules +++ b/debian/rules @@ -20,6 +20,7 @@ CFLAGS += -fPIC # Note: No cli here so that the pbuilder stuff works clean: dh_clean + dh_autoreconf_clean override_dh_autoreconf: NOCONFIGURE=1 dh_autoreconf ./autogen.sh diff --git a/tests/test-libappindicator-fallback-item.c b/tests/test-libappindicator-fallback-item.c index 418b779..c87ef8c 100644 --- a/tests/test-libappindicator-fallback-item.c +++ b/tests/test-libappindicator-fallback-item.c @@ -138,7 +138,7 @@ main (int argc, char ** argv) GtkWidget * menu = gtk_menu_new(); app_indicator_set_menu(APP_INDICATOR(item), GTK_MENU(menu)); - g_timeout_add_seconds(2, kill_func, NULL); + g_timeout_add_seconds(20, kill_func, NULL); mainloop = g_main_loop_new(NULL, FALSE); g_main_loop_run(mainloop); diff --git a/tests/test-libappindicator-fallback-watcher.c b/tests/test-libappindicator-fallback-watcher.c index 5494082..f337150 100644 --- a/tests/test-libappindicator-fallback-watcher.c +++ b/tests/test-libappindicator-fallback-watcher.c @@ -77,6 +77,7 @@ main (int argv, char ** argc) while (!has_owner && owner_count < 10000) { org_freedesktop_DBus_name_has_owner(bus_proxy, "org.test", &has_owner, NULL); owner_count++; + g_usleep(500000); } if (owner_count == 10000) { @@ -104,7 +105,7 @@ main (int argv, char ** argc) /* This is the final kill function. It really shouldn't happen unless we get an error. */ - g_timeout_add(2000, kill_func, NULL); + g_timeout_add_seconds(20, kill_func, NULL); g_debug("Entering Mainloop"); diff --git a/tests/test-libappindicator.c b/tests/test-libappindicator.c index 7afd3ba..0c69fde 100644 --- a/tests/test-libappindicator.c +++ b/tests/test-libappindicator.c @@ -28,6 +28,16 @@ with this program. If not, see . #include #include +static gboolean +allow_warnings (const gchar *log_domain, GLogLevelFlags log_level, + const gchar *message, gpointer user_data) +{ + // By default, gtest will fail a test on even a warning message. + // But since some of our sub-libraries are noisy (especially at-spi2), + // only fail on critical or worse. + return ((log_level & G_LOG_LEVEL_MASK) <= G_LOG_LEVEL_CRITICAL); +} + void test_libappindicator_prop_signals_status_helper (AppIndicator * ci, gchar * status, gboolean * signalactivated) { @@ -45,6 +55,8 @@ test_libappindicator_prop_signals_helper (AppIndicator * ci, gboolean * signalac void test_libappindicator_prop_signals (void) { + g_test_log_set_fatal_handler (allow_warnings, NULL); + AppIndicator * ci = app_indicator_new ("test-app-indicator", "indicator-messages", APP_INDICATOR_CATEGORY_APPLICATION_STATUS); @@ -115,6 +127,8 @@ test_libappindicator_prop_signals (void) void test_libappindicator_init_set_props (void) { + g_test_log_set_fatal_handler (allow_warnings, NULL); + AppIndicator * ci = app_indicator_new ("my-id", "my-name", APP_INDICATOR_CATEGORY_APPLICATION_STATUS); @@ -139,6 +153,8 @@ test_libappindicator_init_set_props (void) void test_libappindicator_init_with_props (void) { + g_test_log_set_fatal_handler (allow_warnings, NULL); + AppIndicator * ci = app_indicator_new ("my-id", "my-name", APP_INDICATOR_CATEGORY_APPLICATION_STATUS); @@ -161,6 +177,8 @@ test_libappindicator_init_with_props (void) void test_libappindicator_init (void) { + g_test_log_set_fatal_handler (allow_warnings, NULL); + AppIndicator * ci = app_indicator_new ("my-id", "my-name", APP_INDICATOR_CATEGORY_APPLICATION_STATUS); g_assert(ci != NULL); g_object_unref(G_OBJECT(ci)); @@ -170,6 +188,8 @@ test_libappindicator_init (void) void test_libappindicator_set_label (void) { + g_test_log_set_fatal_handler (allow_warnings, NULL); + AppIndicator * ci = app_indicator_new ("my-id", "my-name", APP_INDICATOR_CATEGORY_APPLICATION_STATUS); @@ -232,6 +252,8 @@ test_libappindicator_set_label (void) void test_libappindicator_set_menu (void) { + g_test_log_set_fatal_handler (allow_warnings, NULL); + AppIndicator * ci = app_indicator_new ("my-id", "my-name", APP_INDICATOR_CATEGORY_APPLICATION_STATUS); @@ -301,6 +323,8 @@ label_signals_check (void) void test_libappindicator_label_signals (void) { + g_test_log_set_fatal_handler (allow_warnings, NULL); + gint label_signals_count = 0; AppIndicator * ci = app_indicator_new ("my-id", "my-name", @@ -352,6 +376,8 @@ test_libappindicator_label_signals (void) void test_libappindicator_desktop_menu (void) { + g_test_log_set_fatal_handler (allow_warnings, NULL); + AppIndicator * ci = app_indicator_new ("my-id-desktop-menu", "my-name", APP_INDICATOR_CATEGORY_APPLICATION_STATUS); @@ -388,6 +414,8 @@ test_libappindicator_desktop_menu (void) void test_libappindicator_desktop_menu_bad (void) { + g_test_log_set_fatal_handler (allow_warnings, NULL); + AppIndicator * ci = app_indicator_new ("my-id-desktop-menu-bad", "my-name", APP_INDICATOR_CATEGORY_APPLICATION_STATUS); -- cgit v1.2.3 From c5aca6545eac6999a9c0a74ede4674366d712941 Mon Sep 17 00:00:00 2001 From: Michael Terry Date: Mon, 14 Jan 2013 10:46:51 -0500 Subject: increase another test timeout to make amd64 build --- tests/test-libappindicator-status-client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-libappindicator-status-client.c b/tests/test-libappindicator-status-client.c index 9e39ed8..811882b 100644 --- a/tests/test-libappindicator-status-client.c +++ b/tests/test-libappindicator-status-client.c @@ -137,7 +137,7 @@ main (gint argc, gchar * argv[]) dbus_bus_add_match(dbus_g_connection_get_connection(session_bus), "type='signal',interface='" NOTIFICATION_ITEM_DBUS_IFACE "',member='NewStatus'", NULL); watchdog_hit = TRUE; - g_timeout_add(1000, kill_func, NULL); + g_timeout_add_seconds(20, kill_func, NULL); mainloop = g_main_loop_new(NULL, FALSE); g_main_loop_run(mainloop); -- cgit v1.2.3 From 6a86412258be37bb971c41b8f0ebd0a19a1463d2 Mon Sep 17 00:00:00 2001 From: Mathieu Trudel-Lapierre Date: Wed, 16 Jan 2013 14:53:52 -0500 Subject: Remove deprecated calls to g_type_init() --- tests/test-libappindicator-dbus-client.c | 2 -- tests/test-libappindicator-fallback-watcher.c | 2 -- tests/test-libappindicator-status-client.c | 2 -- tests/test-simple-app.c | 2 -- 4 files changed, 8 deletions(-) diff --git a/tests/test-libappindicator-dbus-client.c b/tests/test-libappindicator-dbus-client.c index 9a51792..18c6946 100644 --- a/tests/test-libappindicator-dbus-client.c +++ b/tests/test-libappindicator-dbus-client.c @@ -204,8 +204,6 @@ dbus_filter (DBusConnection * connection, DBusMessage * message, void * user_dat gint main (gint argc, gchar * argv[]) { - g_type_init(); - GError * error = NULL; DBusGConnection * session_bus = dbus_g_bus_get(DBUS_BUS_SESSION, &error); if (error != NULL) { diff --git a/tests/test-libappindicator-fallback-watcher.c b/tests/test-libappindicator-fallback-watcher.c index f337150..2648902 100644 --- a/tests/test-libappindicator-fallback-watcher.c +++ b/tests/test-libappindicator-fallback-watcher.c @@ -58,8 +58,6 @@ kill_func (gpointer userdata) int main (int argv, char ** argc) { - g_type_init(); - g_debug("Waiting to init."); diff --git a/tests/test-libappindicator-status-client.c b/tests/test-libappindicator-status-client.c index 811882b..50e9c08 100644 --- a/tests/test-libappindicator-status-client.c +++ b/tests/test-libappindicator-status-client.c @@ -109,8 +109,6 @@ kill_func (gpointer userdata) gint main (gint argc, gchar * argv[]) { - g_type_init(); - GError * error = NULL; DBusGConnection * session_bus = dbus_g_bus_get(DBUS_BUS_SESSION, &error); if (error != NULL) { diff --git a/tests/test-simple-app.c b/tests/test-simple-app.c index d60d9b9..843466d 100644 --- a/tests/test-simple-app.c +++ b/tests/test-simple-app.c @@ -31,8 +31,6 @@ static GMainLoop * mainloop = NULL; int main (int argc, char ** argv) { - g_type_init(); - DbusmenuServer * dms = dbusmenu_server_new("/menu"); DbusmenuMenuitem * dmi = dbusmenu_menuitem_new(); dbusmenu_menuitem_property_set(dmi, "label", "Bob"); -- cgit v1.2.3