diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-07-24 02:11:45 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-07-24 02:11:45 +0100 |
commit | b49088575eb777ced2551f484da86317332d6087 (patch) | |
tree | bf9a151cf2d61956340d555659ffc098ee1da466 /sys-apps/selinux-python/selinux-python-9999.ebuild | |
parent | 514d1bbe260df2521fe60f1a3ec87cfcfde1a829 (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.ebuild | 32 |
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}" \ |