summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2020-10-30 05:34:20 -0700
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2020-10-30 05:44:29 -0700
commit7e9282e743a89208086317d097a8ebf70b845d59 (patch)
treedaeb02413ee42fce34b53ae81c72de3e90235416 /sys-apps/systemd-tmpfiles
parentnet-libs/libmediawiki: Set ECM_TEST=true (diff)
downloadgentoo-7e9282e743a89208086317d097a8ebf70b845d59.tar.gz
gentoo-7e9282e743a89208086317d097a8ebf70b845d59.tar.bz2
gentoo-7e9282e743a89208086317d097a8ebf70b845d59.zip
sys-apps/systemd-tmpfiles: improve src_test, enable tests on musl
it no longer compiles full systemd Package-Manager: Portage-3.0.8, Repoman-3.0.2 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'sys-apps/systemd-tmpfiles')
-rw-r--r--sys-apps/systemd-tmpfiles/systemd-tmpfiles-246.ebuild26
1 files changed, 14 insertions, 12 deletions
diff --git a/sys-apps/systemd-tmpfiles/systemd-tmpfiles-246.ebuild b/sys-apps/systemd-tmpfiles/systemd-tmpfiles-246.ebuild
index 81f82626e0fb..f47e1b24c1e0 100644
--- a/sys-apps/systemd-tmpfiles/systemd-tmpfiles-246.ebuild
+++ b/sys-apps/systemd-tmpfiles/systemd-tmpfiles-246.ebuild
@@ -4,7 +4,8 @@
EAPI=7
MINKV="3.11"
-inherit meson
+PYTHON_COMPAT=( python3_{7..9} )
+inherit meson python-any-r1
DESCRIPTION="Creates, deletes and cleans up volatile and temporary files and directories"
HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd"
@@ -14,11 +15,13 @@ SRC_URI="https://github.com/systemd/systemd/archive/v${PV}.tar.gz -> systemd-${P
LICENSE="BSD-2 GPL-2 LGPL-2.1 MIT public-domain"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
DEPEND="
- >=sys-kernel/linux-headers-${MINKV}
sys-apps/acl:0=
>=sys-apps/util-linux-2.30:0=
+ >=sys-kernel/linux-headers-${MINKV}
sys-libs/libcap:0=
"
RDEPEND="${DEPEND}
@@ -36,14 +39,15 @@ BDEPEND="
>=sys-apps/coreutils-8.16
sys-devel/m4
virtual/pkgconfig
+ test? ( ${PYTHON_DEPS} )
"
-# test pass, but some unrelated efi parts that
-# are impossible to skip fail to build
-RESTRICT="elibc_musl? ( test )"
-
S="${WORKDIR}/systemd-${PV}"
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
src_prepare() {
# musl patchset from:
# http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-core/systemd/systemd
@@ -137,8 +141,8 @@ src_configure() {
systemd_disable_options=( ${systemd_disable_options[@]/%/=false} )
local emesonargs=(
- -Dtmpfiles=true
-Dacl=true
+ -Dtmpfiles=true
-Dstandalone-binaries=true # this and below option does the magic
-Dstatic-libsystemd=true
-Dsysvinit-path=''
@@ -181,11 +185,9 @@ src_install() {
}
src_test() {
- # selection of relevant tests
- # unfortunately full suite will be built to run tests, but we still
- # install just what we need and not a bit more.
- local tests=( test-{acl-util,tmpfiles,chase-symlinks,path} )
- meson_src_test "${tests[@]}"
+ # 'meson test' will compile full systemd, but we can still outsmart it
+ "${EPYTHON}" src/test/test-systemd-tmpfiles.py \
+ "${BUILD_DIR}"/systemd-tmpfiles.standalone || die
}
# adapted from opentmpfiles ebuild