summaryrefslogtreecommitdiff
path: root/sys-apps/selinux-python/selinux-python-9999.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-07-24 02:11:45 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-07-24 02:11:45 +0100
commitb49088575eb777ced2551f484da86317332d6087 (patch)
treebf9a151cf2d61956340d555659ffc098ee1da466 /sys-apps/selinux-python/selinux-python-9999.ebuild
parent514d1bbe260df2521fe60f1a3ec87cfcfde1a829 (diff)
gentoo resync : 24.07.2021
Diffstat (limited to 'sys-apps/selinux-python/selinux-python-9999.ebuild')
-rw-r--r--sys-apps/selinux-python/selinux-python-9999.ebuild32
1 files changed, 29 insertions, 3 deletions
diff --git a/sys-apps/selinux-python/selinux-python-9999.ebuild b/sys-apps/selinux-python/selinux-python-9999.ebuild
index 2d1cc6d2b32b..8e1f90984a8b 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"
@@ -24,14 +26,18 @@ fi
LICENSE="GPL-2"
SLOT="0"
-DEPEND=">=sys-libs/libselinux-${PV}:=[python]
+RDEPEND=">=sys-libs/libselinux-${PV}:=[python]
>=sys-libs/libsemanage-${PV}:=[python(+)]
>=sys-libs/libsepol-${PV}:=
>=app-admin/setools-4.2.0[${PYTHON_USEDEP}]
>=sys-process/audit-1.5.1[python,${PYTHON_USEDEP}]
${PYTHON_DEPS}"
-
-RDEPEND="${DEPEND}"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ test? (
+ ${RDEPEND}
+ >=sys-apps/secilc-${PV}
+ )"
src_prepare() {
default
@@ -49,6 +55,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}" \