diff mbox series

[bug#52078,v2,1/3] gnu: julia: Disable broken tests.

Message ID 20211125012443.21840-1-zimon.toutoune@gmail.com
State Accepted
Headers show
Series [bug#52078,v2,1/3] gnu: julia: Disable broken tests. | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Simon Tournier Nov. 25, 2021, 1:24 a.m. UTC
* gnu/packages/julia.scm (julia)[arguments]: Disable broken tests.
---
 gnu/packages/julia.scm | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)


base-commit: c70eadeaed9367e45be3797a17d3a34e5f8f67cd
diff mbox series

Patch

diff --git a/gnu/packages/julia.scm b/gnu/packages/julia.scm
index aff7e1a66f..649ffb8ee4 100644
--- a/gnu/packages/julia.scm
+++ b/gnu/packages/julia.scm
@@ -358,8 +358,8 @@  (define-public julia
              ;; Dates/io tests fail on master when networking is unavailable
              ;; https://github.com/JuliaLang/julia/issues/34655
              (substitute* "stdlib/Dates/test/io.jl"
-               (("\"Dates.Date") "\"Date")
-               (("\"Dates.Time") "\"Time"))
+               (("using Dates") "import Dates
+using Dates: @dateformat_str, Date, DateTime, DateFormat, Time"))
              ;; Upstream bug I found when packaging
              ;; https://github.com/JuliaLang/julia/issues/35785
              (substitute* "test/file.jl"
@@ -382,7 +382,18 @@  (define-public julia
              ;(setenv "LC_ALL" "en_US.utf8")
              (substitute* "test/cmdlineargs.jl"
                (("test v\\[3") "test_broken v[3")
-               (("test isempty\\(v\\[3") "test_broken isempty(v[3"))))
+               (("test isempty\\(v\\[3") "test_broken isempty(v[3"))
+             ;; These tests randomly fails because they depend on CPU.
+             (substitute* "stdlib/LinearAlgebra/test/matmul.jl"
+               ;; Fixed in v1.6.4
+               ;; https://github.com/JuliaLang/julia/blob/v1.6.4/stdlib/LinearAlgebra/test/matmul.jl#L155
+               (("@test mul\\!\\(C, vf, transpose\\(vf\\), 2, 3\\) == 2vf\\*vf' \\.\\+ 3C0")
+                "@test mul!(C, vf, transpose(vf), 2, 3) ≈ 2vf*vf' .+ 3C0"))
+             (substitute* "test/math.jl"
+               ;; @test_broken cannot be used because if the test randomly
+               ;; passes, then it also raises an error.
+               (("@test isinf\\(log1p\\(-one\\(T\\)\\)\\)")
+                " "))))
          (add-before 'install 'symlink-libraries
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let ((link