dev-python/pyudev: skip tests on systemd-nspawn

Code is based on similar situation in glibc test suite.

Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
This commit is contained in:
Arthur Zamarin 2025-01-04 15:49:52 +02:00
parent 8e80d77266
commit 409bc4805e
No known key found for this signature in database
GPG Key ID: 02A0AF503D120504

View File

@ -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"
}