Subject: [bug#52186] [core-updates-frozen PATCH v2 16/17] gnu: julia-geometrybasics: Fix tests on i686-linux.

From: zimoun <[email-masked]>
Date: Wed, 1 Dec 2021 16:54:41 +0100

* gnu/packages/julia-xyz (julia-geometrybasics)[arguments]<#:phases>:
Conditionally replace the incorrect type in test suite.
---
 gnu/packages/julia-xyz.scm | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm
index 02c652ce28..6638ecf726 100644
--- a/gnu/packages/julia-xyz.scm
+++ b/gnu/packages/julia-xyz.scm
@@ -1988,14 +1988,19 @@ (define-public julia-geometrybasics
            (lambda _
              (substitute* '("Project.toml"
                             "src/GeometryBasics.jl")
-               ((".*EarCut.*") ""))
-             #t))
+               ((".*EarCut.*") ""))))
          (add-after 'link-depot 'skip-incompatible-test
            (lambda _
              (substitute* "test/runtests.jl"
                (("@testset.*MetaT and heterogeneous data.*" all)
-                (string-append all "return\n")))
-             #t)))))
+                (string-append all "return\n")))))
+         ,@(if (string-prefix? "i686" (or (%current-target-system)
+                                          (%current-system)))
+               '((add-after 'unpack 'fix-tests-int32-i686
+                   (lambda _
+                     (substitute* "test/runtests.jl"
+                       (("Int64") "Int32")))))
+               '()))))
     (propagated-inputs
      `(("julia-itertools" ,julia-itertools)
        ("julia-staticarrays" ,julia-staticarrays)
-- 
2.32.0