commit:     871b34ba2c69100bc6dd590f4eb5cf113dace65b
Author:     Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
AuthorDate: Tue Sep  6 22:04:01 2016 +0000
Commit:     Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
CommitDate: Tue Sep  6 22:04:01 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=871b34ba

app-admin/packagekit-base: enable unittests

Restrict to those that currently work, maybe we can improve things from here.

Package-Manager: portage-2.3.0

 app-admin/packagekit-base/packagekit-base-1.1.1.ebuild | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/app-admin/packagekit-base/packagekit-base-1.1.1.ebuild 
b/app-admin/packagekit-base/packagekit-base-1.1.1.ebuild
index 054d4e7..e350cd3 100644
--- a/app-admin/packagekit-base/packagekit-base-1.1.1.ebuild
+++ b/app-admin/packagekit-base/packagekit-base-1.1.1.ebuild
@@ -59,12 +59,24 @@ RDEPEND="${CDEPEND}
 
 S="${WORKDIR}/${MY_P}"
 
-RESTRICT="test"
-
 src_prepare() {
        # Fixes QA Notices: https://github.com/gentoo/gentoo/pull/1760 and 
https://github.com/hughsie/PackageKit/issues/143
        eapply "${FILESDIR}/${P}-cache-qafix.patch"
 
+       # Disable unittests not working with portage backend
+       # console: requires terminal input
+       sed -e 's:^\(.*/packagekit-glib2/control\)://\1:' \
+               -e 's:^\(.*/packagekit-glib2/transaction-list\)://\1:' \
+               -e 's:^\(.*/packagekit-glib2/client"\)://\1:' \
+               -e 's:^\(.*/packagekit-glib2/package-sack\)://\1:' \
+               -e 's:^\(.*/packagekit-glib2/task\)://\1:' \
+               -e 's:^\(.*/packagekit-glib2/console\)://\1:' \
+               -i lib/packagekit-glib2/pk-test-daemon.c || die
+       sed -e 's:^\(.*/packagekit/spawn\)://\1:' \
+           -e 's:^\(.*/packagekit/transaction-db\)://\1:' \
+           -e 's:^\(.*/packagekit/backend\)://\1:' \
+               -i src/pk-self-test.c || die
+
        eapply_user
        use vala && vala_src_prepare
 }
@@ -89,9 +101,9 @@ src_configure() {
                $(use_enable networkmanager) \
                $(use_enable systemd) \
                $(use_enable test daemon-tests) \
+               $(use_enable test local) \
                $(use_enable vala) \
                --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
-               #$(use_enable test local)
 }
 
 src_install() {

Reply via email to