diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-08-07 12:37:21 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-08-07 12:37:21 +0100 |
commit | b8c7370a682e4e29cda623222d17a790c01c3642 (patch) | |
tree | f6caa14689bd00a5760eadaa381ff41e50ef3c1b /net-wireless/blueman/blueman-9999.ebuild | |
parent | 8a4997a7e2d1e36c089d4d76935b5a902d98d3d0 (diff) |
gentoo auto-resync : 07:08:2024 - 12:37:20
Diffstat (limited to 'net-wireless/blueman/blueman-9999.ebuild')
-rw-r--r-- | net-wireless/blueman/blueman-9999.ebuild | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/net-wireless/blueman/blueman-9999.ebuild b/net-wireless/blueman/blueman-9999.ebuild index bec135aa318c..697c7faeab72 100644 --- a/net-wireless/blueman/blueman-9999.ebuild +++ b/net-wireless/blueman/blueman-9999.ebuild @@ -39,6 +39,11 @@ DEPEND=" BDEPEND=" $(python_gen_cond_dep ' dev-python/cython[${PYTHON_USEDEP}] + test? ( + dev-python/python-dbusmock[${PYTHON_USEDEP}] + media-libs/libpulse + >=net-misc/networkmanager-0.8[introspection] + ) ') virtual/pkgconfig nls? ( sys-devel/gettext ) @@ -80,6 +85,8 @@ RDEPEND=" ) " +distutils_enable_tests unittest + pkg_pretend() { if use network; then local CONFIG_CHECK=" @@ -127,6 +134,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 |