commit:     c548be5126ec1787021bad40e0eb9d878b3e781b
Author:     Tim Harder <radhermit <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 19 20:51:48 2018 +0000
Commit:     Tim Harder <radhermit <AT> gentoo <DOT> org>
CommitDate: Mon Mar 19 21:04:27 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c548be51

sys-fs/fuse: add initial support for running tests

 sys-fs/fuse/fuse-3.2.1.ebuild | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/sys-fs/fuse/fuse-3.2.1.ebuild b/sys-fs/fuse/fuse-3.2.1.ebuild
index c60d8702e86..ae8b104dbba 100644
--- a/sys-fs/fuse/fuse-3.2.1.ebuild
+++ b/sys-fs/fuse/fuse-3.2.1.ebuild
@@ -2,8 +2,9 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
+PYTHON_COMPAT=( python3_{4,5,6} )
 
-inherit meson multilib-minimal flag-o-matic
+inherit meson multilib-minimal flag-o-matic python-single-r1
 
 DESCRIPTION="An interface for filesystems implemented in userspace"
 HOMEPAGE="https://github.com/libfuse/libfuse";
@@ -12,9 +13,15 @@ 
SRC_URI="https://github.com/libfuse/libfuse/releases/download/${P}/${P}.tar.xz";
 LICENSE="GPL-2 LGPL-2.1"
 SLOT="3"
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 
~sh ~sparc ~x86"
-RESTRICT="test"
-
-DEPEND="virtual/pkgconfig"
+IUSE="test"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DEPEND="virtual/pkgconfig
+       test? (
+               ${PYTHON_DEPS}
+               dev-python/pytest[${PYTHON_USEDEP}]
+       )
+               "
 RDEPEND="sys-fs/fuse-common"
 
 DOCS=( AUTHORS ChangeLog.rst README.md doc/README.NFS doc/kernel.txt )
@@ -37,6 +44,10 @@ multilib_src_compile() {
        eninja
 }
 
+multilib_src_test() {
+       python3 -m pytest test || die
+}
+
 multilib_src_install() {
        DESTDIR="${D}" eninja install
 }

Reply via email to