commit:     14c8cc90697d632e0d67fb3c8c8781d31cd8fda1
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 26 16:31:10 2020 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Fri Jun 26 16:35:59 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=14c8cc90

dev-python/pyopencl-2019.1.2: disable tests

They fail if there are no OpenCL platforms available and even if there
is one, they mostly get skipped unless the user 'portage' is granted
additional permissions in order to be able to talk to the GPU (which I
am pretty sure is a bad idea). Just don't bother.

Closes: https://bugs.gentoo.org/729742
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 dev-python/pyopencl/pyopencl-2019.1.2.ebuild | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/dev-python/pyopencl/pyopencl-2019.1.2.ebuild 
b/dev-python/pyopencl/pyopencl-2019.1.2.ebuild
index 73b273d25bb..fbc6d6a6474 100644
--- a/dev-python/pyopencl/pyopencl-2019.1.2.ebuild
+++ b/dev-python/pyopencl/pyopencl-2019.1.2.ebuild
@@ -28,7 +28,13 @@ RDEPEND="
        >=virtual/opencl-2"
 DEPEND="${RDEPEND}"
 
-distutils_enable_tests pytest
+# The test suite fails if there are no OpenCL platforms available, and
+# even if there is one (which requires the presence of both an OpenCL
+# runtime *and* hardware supported by it - simply emerging any runtime
+# is not enough) the vast majority of tests end up skipped because by
+# default the portage user hasn't got sufficient privileges to talk
+# to the GPU.
+RESTRICT="test"
 
 python_configure_all() {
        local myconf=()
@@ -41,11 +47,6 @@ python_configure_all() {
                "${myconf[@]}"
 }
 
-python_test() {
-       cd "${S}/test" || die
-       pytest -vv || die "Testsuite failed under ${EPYTHON}"
-}
-
 python_install_all() {
        if use examples; then
                dodoc -r examples

Reply via email to