From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 18AE013933E for ; Mon, 19 Jul 2021 22:21:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6BB68E09F1; Mon, 19 Jul 2021 22:21:42 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2337BE09F0 for ; Mon, 19 Jul 2021 22:21:42 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 06D4F335D7C for ; Mon, 19 Jul 2021 22:21:41 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 632665C4 for ; Mon, 19 Jul 2021 22:21:39 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1626733288.b49e9b2821afc2f102fd44879871718c31080c04.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/selinux-python/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-apps/selinux-python/selinux-python-3.2.ebuild sys-apps/selinux-python/selinux-python-9999.ebuild X-VCS-Directories: sys-apps/selinux-python/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: b49e9b2821afc2f102fd44879871718c31080c04 X-VCS-Branch: master Date: Mon, 19 Jul 2021 22:21:39 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 4f2cb7e1-c770-4ad8-be7e-b5118851d9f4 X-Archives-Hash: 2796d844e982a0626f874e79690b5e9d commit: b49e9b2821afc2f102fd44879871718c31080c04 Author: Jonathan Davies protonmail com> AuthorDate: Wed Jul 7 13:16:06 2021 +0000 Commit: Sam James gentoo org> CommitDate: Mon Jul 19 22:21:28 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b49e9b28 sys-apps/selinux-python: Fixed tests, thanks to Arie Artrip. Closes: https://bugs.gentoo.org/715924 Closes: https://bugs.gentoo.org/741930 Signed-off-by: Jonathan Davies protonmail.com> Closes: https://github.com/gentoo/gentoo/pull/21550 Signed-off-by: Sam James gentoo.org> sys-apps/selinux-python/selinux-python-3.2.ebuild | 23 ++++++++++++++++++++++ sys-apps/selinux-python/selinux-python-9999.ebuild | 23 ++++++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/sys-apps/selinux-python/selinux-python-3.2.ebuild b/sys-apps/selinux-python/selinux-python-3.2.ebuild index df7cfa14c51..bd9f2e663d8 100644 --- a/sys-apps/selinux-python/selinux-python-3.2.ebuild +++ b/sys-apps/selinux-python/selinux-python-3.2.ebuild @@ -7,6 +7,8 @@ PYTHON_REQ_USE="xml" inherit python-r1 toolchain-funcs +IUSE="test" +RESTRICT="!test? ( test )" REQUIRED_USE="${PYTHON_REQUIRED_USE}" DESCRIPTION="SELinux core utilities" @@ -29,6 +31,7 @@ DEPEND=">=sys-libs/libselinux-${PV}:=[python] >=sys-libs/libsepol-${PV}:= >=app-admin/setools-4.2.0[${PYTHON_USEDEP}] >=sys-process/audit-1.5.1[python,${PYTHON_USEDEP}] + test? ( >=sys-apps/secilc-${PV} ) ${PYTHON_DEPS}" RDEPEND="${DEPEND}" @@ -49,6 +52,26 @@ src_compile() { python_foreach_impl building } +src_test() { + testing() { + # The different subprojects have some interproject dependencies: + # - audit2allow depens on sepolgen + # - chcat depends on semanage + # and maybe others. + # Add all the modules of the individual subprojects to the + # PYTHONPATH, so they get actually found and used. In + # particular, already installed versions on the system are not + # used. + for dir in audit2allow chcat semanage sepolgen/src sepolicy ; do + PYTHONPATH="${BUILD_DIR}/${dir}:${PYTHONPATH}" + done + PYTHONPATH=${PYTHONPATH} \ + emake -C "${BUILD_DIR}" \ + test + } + python_foreach_impl testing +} + src_install() { installation() { emake -C "${BUILD_DIR}" \ diff --git a/sys-apps/selinux-python/selinux-python-9999.ebuild b/sys-apps/selinux-python/selinux-python-9999.ebuild index 2d1cc6d2b32..52abfe44946 100644 --- a/sys-apps/selinux-python/selinux-python-9999.ebuild +++ b/sys-apps/selinux-python/selinux-python-9999.ebuild @@ -7,6 +7,8 @@ PYTHON_REQ_USE="xml" inherit python-r1 toolchain-funcs +IUSE="test" +RESTRICT="!test? ( test )" REQUIRED_USE="${PYTHON_REQUIRED_USE}" DESCRIPTION="SELinux core utilities" @@ -29,6 +31,7 @@ DEPEND=">=sys-libs/libselinux-${PV}:=[python] >=sys-libs/libsepol-${PV}:= >=app-admin/setools-4.2.0[${PYTHON_USEDEP}] >=sys-process/audit-1.5.1[python,${PYTHON_USEDEP}] + test? ( >=sys-apps/secilc-${PV} ) ${PYTHON_DEPS}" RDEPEND="${DEPEND}" @@ -49,6 +52,26 @@ src_compile() { python_foreach_impl building } +src_test() { + testing() { + # The different subprojects have some interproject dependencies: + # - audit2allow depens on sepolgen + # - chcat depends on semanage + # and maybe others. + # Add all the modules of the individual subprojects to the + # PYTHONPATH, so they get actually found and used. In + # particular, already installed versions on the system are not + # used. + for dir in audit2allow chcat semanage sepolgen/src sepolicy ; do + PYTHONPATH="${BUILD_DIR}/${dir}:${PYTHONPATH}" + done + PYTHONPATH=${PYTHONPATH} \ + emake -C "${BUILD_DIR}" \ + test + } + python_foreach_impl testing +} + src_install() { installation() { emake -C "${BUILD_DIR}" \