public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH 1/2] metadata/layout.conf: Recognize PROPERTIES=test_privileged
@ 2024-02-22 10:44 Michał Górny
  2024-02-22 10:44 ` [gentoo-dev] [PATCH 2/2] dev-python/reflink: Use PROPERTIES=test_privileged Michał Górny
  0 siblings, 1 reply; 2+ messages in thread
From: Michał Górny @ 2024-02-22 10:44 UTC (permalink / raw)
  To: gentoo-dev; +Cc: Michał Górny

Bug: https://bugs.gentoo.org/924585
Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
 metadata/layout.conf | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

PR: https://github.com/gentoo/gentoo/pull/35487

diff --git a/metadata/layout.conf b/metadata/layout.conf
index fff2d6072f99..5fb0b20d5f8a 100644
--- a/metadata/layout.conf
+++ b/metadata/layout.conf
@@ -1,11 +1,11 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # For details on this file, see the layout.conf section of the
 # portage(5) man page.
 
 # Allow specific PROPERTIES and RESTRICT values in ebuilds.
-properties-allowed = interactive live test_network
+properties-allowed = interactive live test_network test_privileged
 restrict-allowed = binchecks bindist fetch installsources mirror preserve-libs splitdebug strip test userpriv
 
 # manifest-hashes specify hashes used for new/updated entries
-- 
2.43.2



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-dev] [PATCH 2/2] dev-python/reflink: Use PROPERTIES=test_privileged
  2024-02-22 10:44 [gentoo-dev] [PATCH 1/2] metadata/layout.conf: Recognize PROPERTIES=test_privileged Michał Górny
@ 2024-02-22 10:44 ` Michał Górny
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2024-02-22 10:44 UTC (permalink / raw)
  To: gentoo-dev; +Cc: Michał Górny

Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
 dev-python/reflink/reflink-0.2.2.ebuild | 18 +++++++++---------
 1 file changed, 9 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..7c9681db2505 100644
--- a/dev-python/reflink/reflink-0.2.2.ebuild
+++ b/dev-python/reflink/reflink-0.2.2.ebuild
@@ -18,6 +18,8 @@ HOMEPAGE="
 LICENSE="MIT"
 SLOT="0"
 KEYWORDS="~amd64 ~ppc64 ~x86"
+PROPERTIES="test_privileged"
+RESTRICT="test"
 
 RDEPEND="
 	$(python_gen_cond_dep '
@@ -41,15 +43,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
 }
-- 
2.43.2



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-22 10:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-22 10:44 [gentoo-dev] [PATCH 1/2] metadata/layout.conf: Recognize PROPERTIES=test_privileged Michał Górny
2024-02-22 10:44 ` [gentoo-dev] [PATCH 2/2] dev-python/reflink: Use PROPERTIES=test_privileged Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox