summary refs log tree commit diff
path: root/gnu/packages/algebra.scm
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2022-09-08 20:37:50 +0300
committerEfraim Flashner <efraim@flashner.co.il>2022-09-08 20:39:17 +0300
commite8bded2de72c17317d7799b699a724086f92ed7b (patch)
tree53454ca0c58f644993b3e71a01ba308d857857b5 /gnu/packages/algebra.scm
parent8d34df72cbd400b04cc4c8e2b3d9102a1f9bb013 (diff)
downloadguix-e8bded2de72c17317d7799b699a724086f92ed7b.tar.gz
gnu: eigen: Skip some tests on some architectures.
* gnu/packages/algebra.scm (eigen)[arguments]: Add a phase to skip some
tests which fail on various platforms.
(eigen-for-tensorflow, eigen-for-tensorflow-lite)[arguments]: Don't
inherit new phase.
Diffstat (limited to 'gnu/packages/algebra.scm')
-rw-r--r--gnu/packages/algebra.scm46
1 files changed, 43 insertions, 3 deletions
diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm
index d3f2549152..e5bd12eeb8 100644
--- a/gnu/packages/algebra.scm
+++ b/gnu/packages/algebra.scm
@@ -74,7 +74,8 @@
   #:use-module (guix hg-download)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
-  #:use-module (guix utils))
+  #:use-module (guix utils)
+  #:use-module (ice-9 match))
 
 
 (define-public mpfrcx
@@ -1009,10 +1010,39 @@ extends it by a set of algebraic capabilities.")
                   #t))))
     (build-system cmake-build-system)
     (arguments
-     '(;; Turn off debugging symbols to save space.
+     `(;; Turn off debugging symbols to save space.
        #:build-type "Release"
 
+       #:modules ((ice-9 match)
+                  (guix build utils)
+                  (guix build cmake-build-system))
+
        #:phases (modify-phases %standard-phases
+                  (add-after 'unpack 'disable-some-tests
+                    ;; Not all platforms are well supported by the test suite.
+                    (lambda _
+                      ,@(match (%current-system)
+                          ("i686-linux"
+                           `((substitute* "test/CMakeLists.txt"
+                               ((".*packetmath.*") ""))))
+                          ("aarch64-linux"
+                           `((substitute* "test/CMakeLists.txt"
+                               ((".*array_cwise.*") "")
+                               ((".*vectorization_logic.*") ""))))
+                          ("armhf-linux"
+                           `((substitute* "test/CMakeLists.txt"
+                               ((".*geo_quaternion.*") "")
+                               ((".*jacobisvd.*") "")
+                               ((".*packetmath.*") "")
+                               ((".*prec_inverse.*") "")
+                               ((".*qr_colpivoting.*") "")
+                               ((".*vectorization_logic.*") ""))))
+                          ("riscv64-linux"
+                           `((substitute* "test/CMakeLists.txt"
+                               ((".*array_cwise.*") "")
+                               ((".*geo_quaternion.*") ""))))
+                          (_
+                            '((display "No tests to disable on this architecture.\n"))))))
                   (replace 'check
                     (lambda* (#:key tests? #:allow-other-keys)
                       (let* ((cores  (parallel-job-count))
@@ -1101,6 +1131,11 @@ features, and more.")
                     (substitute* "unsupported/CMakeLists.txt"
                       (("add_subdirectory\\(test.*")
                        "# Do not build the tests for unsupported features.\n"))))))
+      (arguments
+       (substitute-keyword-arguments (package-arguments eigen)
+         ((#:phases phases)
+          `(modify-phases ,phases
+             (delete 'disable-some-tests)))))
       (native-inputs
        (list gcc-7)))))
 
@@ -1129,7 +1164,12 @@ features, and more.")
                  '(begin
                     (substitute* "unsupported/CMakeLists.txt"
                       (("add_subdirectory\\(test.*")
-                       "# Do not build the tests for unsupported features.\n")))))))))
+                       "# Do not build the tests for unsupported features.\n"))))))
+      (arguments
+       (substitute-keyword-arguments (package-arguments eigen)
+         ((#:phases phases)
+          `(modify-phases ,phases
+             (delete 'disable-some-tests))))))))
 
 (define-public xtensor
   (package