From 85fa9458a13a4d774db7031791e24807bf2da76b Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 19 May 2024 13:16:07 +0300 Subject: gnu: python-numba: Adjust test suite on several architectures. * gnu/packages/python-xyz.scm (python-numba)[arguments]: Adjust the 'disable-failing-tests phase to skip some additional tests on aarch64-linux and powerpc64le-linux. Also when building for armhf-linux accept a wider range of python platforms as being part of armhf-linux. Change-Id: If9edf9282684931a2a4cdcfed692ed3da1d4ec6e --- gnu/packages/python-xyz.scm | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'gnu') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index ddc697f71b..61167d3db5 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -27536,7 +27536,37 @@ validation testing and application logic.") ;; This one test fails because a deprecation warning is printed. (substitute* "numba/tests/test_import.py" (("def test_no_accidental_warnings") - "def disabled_test_no_accidental_warnings")))) + "def disabled_test_no_accidental_warnings")) + ;; Some tests timeout or crash on some architectures. + ,@(cond + ((target-aarch64?) + `((substitute* "numba/tests/test_sets.py" + (("def test_add_discard") + "def disabled_test_add_discard") + (("def test_isdisjoint") + "def disabled_test_isdisjoint") + (("def test_issubset") + "def disabled_test_issubset") + (("def test_issuperset") + "def disabled_test_issuperset") + (("def test_remove_error") + "def disabled_test_remove_error")))) + ((target-ppc64le?) + `((substitute* "numba/tests/test_mathlib.py" + (("def test_ldexp") + "def disabled_test_ldexp")))) + ((target-arm32?) + ;; Armhf emulation on aarch64 using armv8 machines returns + ;; 'armv8l' from platform.machine() and won't skip some tests. + ;; Fix borrowed from an upstream bug report: + ;; https://github.com/numba/numba/issues/6345#issuecomment-764993001 + `((substitute* '("numba/tests/support.py" + "numba/tests/test_dispatcher.py") + (("platform\\.machine\\(\\) == 'armv7l'") + (string-append + "platform.machine().startswith('armv') and " + "int(platform.machine()[len('armv'):-1]) >= 7"))))) + (#t '())))) (replace 'check (lambda* (#:key tests? inputs outputs #:allow-other-keys) (when tests? -- cgit v1.2.3