From 59b8e694310508dda05cbf7fd3677b140bd2a0f7 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Thu, 22 Feb 2024 11:43:23 +0100 Subject: dev-python/reflink: Use PROPERTIES=test_privileged MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- dev-python/reflink/reflink-0.2.2.ebuild | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'dev-python/reflink') diff --git a/dev-python/reflink/reflink-0.2.2.ebuild b/dev-python/reflink/reflink-0.2.2.ebuild index 83e0653fe4a1..df133fc37b1f 100644 --- a/dev-python/reflink/reflink-0.2.2.ebuild +++ b/dev-python/reflink/reflink-0.2.2.ebuild @@ -18,6 +18,9 @@ HOMEPAGE=" LICENSE="MIT" SLOT="0" KEYWORDS="~amd64 ~ppc64 ~x86" +# The test suite mounts a btrfs volume on a loopback device. +PROPERTIES="test_privileged" +RESTRICT="test" RDEPEND=" $(python_gen_cond_dep ' @@ -41,15 +44,13 @@ src_prepare() { } src_test() { - rm -rf reflink || die - - if [[ ${EUID} != 0 ]]; then - ewarn "Tests require root permissions (FEATURES=-userpriv)" - elif [[ ! -c /dev/loop-control ]]; then + if [[ ! -c /dev/loop-control ]]; then die "Tests require /dev/loop-control" - else - local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 - addwrite /dev - distutils-r1_src_test fi + + rm -rf reflink || die + + local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 + addwrite /dev + distutils-r1_src_test } -- cgit v1.2.3-65-gdbad