summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2024-02-22 11:43:23 +0100
committerMichał Górny <mgorny@gentoo.org>2024-02-24 11:26:13 +0100
commit59b8e694310508dda05cbf7fd3677b140bd2a0f7 (patch)
tree2c0feb6c632d28915f5540735465ee25131cf599 /dev-python/reflink
parentmetadata/layout.conf: Recognize PROPERTIES=test_privileged (diff)
downloadgentoo-59b8e694310508dda05cbf7fd3677b140bd2a0f7.tar.gz
gentoo-59b8e694310508dda05cbf7fd3677b140bd2a0f7.tar.bz2
gentoo-59b8e694310508dda05cbf7fd3677b140bd2a0f7.zip
dev-python/reflink: Use PROPERTIES=test_privileged
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/reflink')
-rw-r--r--dev-python/reflink/reflink-0.2.2.ebuild19
1 files changed, 10 insertions, 9 deletions
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
}