From 409bc4805e2f66612f0772aa98d57d03bf9df4fa Mon Sep 17 00:00:00 2001 From: Arthur Zamarin Date: Sat, 4 Jan 2025 15:49:52 +0200 Subject: [PATCH] dev-python/pyudev: skip tests on systemd-nspawn Code is based on similar situation in glibc test suite. Signed-off-by: Arthur Zamarin --- dev-python/pyudev/pyudev-0.24.3.ebuild | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dev-python/pyudev/pyudev-0.24.3.ebuild b/dev-python/pyudev/pyudev-0.24.3.ebuild index 1e55a1e0bd840..c0751716b7685 100644 --- a/dev-python/pyudev/pyudev-0.24.3.ebuild +++ b/dev-python/pyudev/pyudev-0.24.3.ebuild @@ -72,6 +72,15 @@ python_test() { epytest tests } +src_test() { + local virt=$(systemd-detect-virt 2>/dev/null) + if [[ ${virt} == systemd-nspawn ]] ; then + ewarn "Skipping tests because in systemd-nspawn container" + else + distutils-r1_src_test + fi +} + pkg_postinst() { optfeature "PyQt5 bindings" "dev-python/pyqt5" }