Gentoo Archives: gentoo-commits

From: Alexandre Restovtsev <tetromino@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gnome:gnome-next commit in: dev-libs/glib/
Date: Thu, 29 Sep 2011 02:36:11
Message-Id: d49fe2573fb89f1ea80864edcdc5aff64efd3107.tetromino@gentoo
1 commit: d49fe2573fb89f1ea80864edcdc5aff64efd3107
2 Author: Alexandre Rostovtsev <tetromino <AT> gmail <DOT> com>
3 AuthorDate: Wed Sep 28 23:44:00 2011 +0000
4 Commit: Alexandre Restovtsev <tetromino <AT> gmail <DOT> com>
5 CommitDate: Thu Sep 29 02:19:56 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=d49fe257
7
8 dev-libs/glib: fix tests (bug #384853)
9
10 Require python-2 to run tests, and disable tests that need pygobject and
11 dbus-python to prevent circular dependencies. Fixes bug #384853.
12
13 Also, hard disable the /gdbus/connection/life-cycle test, since it fails
14 around 1/3 of the time I try to run it.
15
16 ---
17 dev-libs/glib/glib-9999.ebuild | 26 ++++++++++++++++++++++++++
18 1 files changed, 26 insertions(+), 0 deletions(-)
19
20 diff --git a/dev-libs/glib/glib-9999.ebuild b/dev-libs/glib/glib-9999.ebuild
21 index fcd1a7e..46f0e9d 100644
22 --- a/dev-libs/glib/glib-9999.ebuild
23 +++ b/dev-libs/glib/glib-9999.ebuild
24 @@ -5,6 +5,7 @@
25 EAPI="4"
26
27 inherit autotools gnome.org libtool eutils flag-o-matic multilib pax-utils virtualx
28 +# Do not inherit python.eclass to avoid python runtime dependency; #377549
29 if [[ ${PV} = 9999 ]]; then
30 inherit gnome2-live
31 fi
32 @@ -37,6 +38,7 @@ DEPEND="${RDEPEND}
33 ~app-text/docbook-xml-dtd-4.1.2 )
34 systemtap? ( >=dev-util/systemtap-1.3 )
35 test? (
36 + =dev-lang/python-2*
37 >=dev-util/gdbus-codegen-2.30.0
38 >=sys-apps/dbus-1.2.14 )
39 !<dev-util/gtk-doc-1.15-r2"
40 @@ -84,6 +86,27 @@ src_prepare() {
41 sed -i -e "/desktop-app-info\/fallback/d" gio/tests/desktop-app-info.c || die
42 sed -i -e "/desktop-app-info\/lastused/d" gio/tests/desktop-app-info.c || die
43 fi
44 +
45 + # Disable flaky gdbus/connection/life-cycle test; bug #384853
46 + sed -i -e "/connection\/life-cycle/d" gio/tests/gdbus-connection.c || die
47 +
48 + # Disable tests requiring dbus-python and pygobject; bugs #349236, #377549, #384853
49 + if ! has_version dev-python/dbus-python || ! has_version 'dev-python/pygobject:2' ; then
50 + ewarn "Some tests will be skipped due to dev-python/dbus-python or dev-python/pygobject:2"
51 + ewarn "not being present on your system, think on installing them to get these tests run."
52 + sed -i -e "/connection\/filter/d" gio/tests/gdbus-connection.c || die
53 + sed -i -e "/connection\/large_message/d" gio/tests/gdbus-connection-slow.c || die
54 + sed -i -e "/gdbus\/proxy/d" gio/tests/gdbus-proxy.c || die
55 + sed -i -e "/gdbus\/proxy-well-known-name/d" gio/tests/gdbus-proxy-well-known-name.c || die
56 + sed -i -e "/gdbus\/introspection-parser/d" gio/tests/gdbus-introspection.c || die
57 + sed -i -e "/g_test_add_func/d" gio/tests/gdbus-threading.c || die
58 + sed -i -e "/gdbus\/method-calls-in-thread/d" gio/tests/gdbus-threading.c || die
59 + # needed to prevent gdbus-threading from asserting
60 + ln -sfn $(type -P true) gio/tests/gdbus-testserver.py
61 + else
62 + # use python2 for the test server
63 + sed -i -e 's:/usr/bin/env python$:/usr/bin/env python2:' gio/tests/gdbus-testserver.py || die
64 + fi
65 fi
66
67 # gdbus-codegen is a separate package
68 @@ -92,6 +115,9 @@ src_prepare() {
69 # disable pyc compiling
70 ln -sfn $(type -P true) py-compile
71
72 + # python2 needed for gtester-report
73 + sed -e 's:/usr/bin/env python$:/usr/bin/env python2:' -i glib/gtester-report || die
74 +
75 # Needed for the punt-python-check patch, disabling timeout test
76 # Also needed to prevent croscompile failures, see bug #267603
77 # Also needed for the no-gdbus-codegen patch