commit:     a282b3d47a732dbaf680c3f2d71255f9abbffa26
Author:     Matthew Smith <matthew <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 28 18:51:15 2022 +0000
Commit:     Matthew Smith <matthew <AT> gentoo <DOT> org>
CommitDate: Mon Feb 28 19:42:49 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a282b3d4

media-gfx/cura: fix failing tests

Add a dependency on pytest and remove a test that either does not like
the sandbox or does not like its home directory being moved.

Closes: https://bugs.gentoo.org/693172
Signed-off-by: Matthew Smith <matthew <AT> gentoo.org>

 media-gfx/cura/cura-4.12.1.ebuild | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/media-gfx/cura/cura-4.12.1.ebuild 
b/media-gfx/cura/cura-4.12.1.ebuild
index f38aa921e53b..448cf753c799 100644
--- a/media-gfx/cura/cura-4.12.1.ebuild
+++ b/media-gfx/cura/cura-4.12.1.ebuild
@@ -18,10 +18,17 @@ 
SRC_URI="https://github.com/Ultimaker/${MY_PN}/archive/${PV}.tar.gz -> ${P}.tar.
 LICENSE="LGPL-3"
 SLOT="0"
 KEYWORDS="~amd64 ~arm64 ~x86"
-IUSE="debug +usb zeroconf"
+IUSE="debug test +usb zeroconf"
 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
 
-BDEPEND="sys-devel/gettext"
+RESTRICT="!test? ( test )"
+
+BDEPEND="${PYTHON_DEPS}
+       sys-devel/gettext
+       $(python_gen_cond_dep '
+               test? ( dev-python/pytest[${PYTHON_USEDEP}] )
+       ')
+"
 RDEPEND="${PYTHON_DEPS}
        ~dev-libs/libarcus-${PV}:=[python,${PYTHON_SINGLE_USEDEP}]
        ~dev-libs/libcharon-${PV}[${PYTHON_SINGLE_USEDEP}]
@@ -57,6 +64,9 @@ S="${WORKDIR}/${MY_PN}-${PV}"
 src_prepare() {
        sed -i -e 
"s:lib\${LIB_SUFFIX}/python\${Python3_VERSION_MAJOR}.\${Python3_VERSION_MINOR}/site-packages:$(python_get_sitedir):g"
 CMakeLists.txt || die
 
+       # Remove failing test.  Bug #693172.
+       rm -r plugins/VersionUpgrade/VersionUpgrade44to45/tests || die
+
        cmake_src_prepare
 }
 

Reply via email to