diff options
author | Michał Górny <mgorny@gentoo.org> | 2024-07-22 21:11:02 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2024-07-22 21:11:54 +0200 |
commit | a2a6be18c8b272b9c0c4b75ea32c90e52a57afd1 (patch) | |
tree | 46f699039a00e58b3623e47ce14b12d72069ac8c /net-wireless | |
parent | app-text/aspell: Fix compilation on GCC 15 (diff) | |
download | gentoo-a2a6be18c8b272b9c0c4b75ea32c90e52a57afd1.tar.gz gentoo-a2a6be18c8b272b9c0c4b75ea32c90e52a57afd1.tar.bz2 gentoo-a2a6be18c8b272b9c0c4b75ea32c90e52a57afd1.zip |
net-wireless/blueman: Sync the live ebuild
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'net-wireless')
-rw-r--r-- | net-wireless/blueman/blueman-9999.ebuild | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/net-wireless/blueman/blueman-9999.ebuild b/net-wireless/blueman/blueman-9999.ebuild index bec135aa318c..eb7eface474e 100644 --- a/net-wireless/blueman/blueman-9999.ebuild +++ b/net-wireless/blueman/blueman-9999.ebuild @@ -39,6 +39,10 @@ DEPEND=" BDEPEND=" $(python_gen_cond_dep ' dev-python/cython[${PYTHON_USEDEP}] + test? ( + dev-python/python-dbusmock[${PYTHON_USEDEP}] + >=net-misc/networkmanager-0.8[introspection] + ) ') virtual/pkgconfig nls? ( sys-devel/gettext ) @@ -80,6 +84,8 @@ RDEPEND=" ) " +distutils_enable_tests unittest + pkg_pretend() { if use network; then local CONFIG_CHECK=" @@ -127,6 +133,27 @@ python_compile() { default } +python_test() { + local -x PYTHONPATH=module/.libs + + if [[ ! -f /dev/rfkill ]]; then + # Tests attempt to import these modules if present, but they + # require /dev/rfkill. Hide them to make the tests pass. + mv blueman/plugins/mechanism/RfKill.py{,~} || die + mv blueman/plugins/applet/KillSwitch.py{,~} || die + fi + + local failed= + nonfatal eunittest || failed=1 + + if [[ ! -f /dev/rfkill ]]; then + mv blueman/plugins/mechanism/RfKill.py{~,} || die + mv blueman/plugins/applet/KillSwitch.py{~,} || die + fi + + [[ ${failed} ]] && die "Tests failed with ${EPYTHON}" +} + python_install() { default |