diff mbox series

[bug#61493,2/2] gnu: hwloc: Skip failing test on non-x86 systems.

Message ID cddb11f082e86b39a3b3ecbc5815b6a8a72a2c36.1676319305.git.simon@simonsouth.net
State New
Headers show
Series gnu: hwloc: Skip failing test on non-x86 systems. | expand

Commit Message

Simon South Feb. 13, 2023, 9:01 p.m. UTC
* gnu/packages/mpi.scm (hwloc-2)[arguments]<#:phases>: Rename
"skip-test-that-requires-/sys" phase to "skip-tests-that-require-/sys" and
expand to skip additional test requiring /sys on non-x86 systems.
---
 gnu/packages/mpi.scm | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/mpi.scm b/gnu/packages/mpi.scm
index febd0b4124..22d47b966c 100644
--- a/gnu/packages/mpi.scm
+++ b/gnu/packages/mpi.scm
@@ -164,10 +164,19 @@  (define-public hwloc-2
                (substitute* "tests/hwloc/linux-libnuma.c"
                  (("numa_available\\(\\)")
                   "-1"))))
-           (add-before 'check 'skip-test-that-requires-/sys
+           (add-before 'check 'skip-tests-that-require-/sys
              (lambda _
                ;; 'test-gather-topology.sh' requires /sys as of 2.9.0; skip it.
-               (setenv "HWLOC_TEST_GATHER_TOPOLOGY" "0")))
+               (setenv "HWLOC_TEST_GATHER_TOPOLOGY" "0")
+
+               ;; 'hwloc_backends' also requires /sys on non-x86 systems, for
+               ;; which hwloc lacks a topology backend not reliant on the
+               ;; operating system; skip it also on these machines.
+               (substitute* "tests/hwloc/hwloc_backends.c"
+                 ,@(if (not (target-x86?))
+                       '((("putenv\\(\\(char \\*\\) \"HWLOC_L" all)
+                          (string-append "exit (77);\n" all)))
+                       '()))))
            (add-before 'check 'skip-test-that-fails-on-qemu
              (lambda _
                ;; Skip test that fails on emulated hardware due to QEMU bug: