emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#52078: closed ([PATCH 1/2] gnu: julia: Disable broken tests.)


From: GNU bug Tracking System
Subject: bug#52078: closed ([PATCH 1/2] gnu: julia: Disable broken tests.)
Date: Thu, 25 Nov 2021 06:44:02 +0000

Your message dated Thu, 25 Nov 2021 01:43:39 -0500
with message-id <8735nkbuqs.fsf_-_@gmail.com>
and subject line Re: bug#52078: [PATCH 1/2] gnu: julia: Disable broken tests.
has caused the debbugs.gnu.org bug report #52078,
regarding [PATCH 1/2] gnu: julia: Disable broken tests.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
52078: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=52078
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH 1/2] gnu: julia: Disable broken tests. Date: Wed, 24 Nov 2021 15:19:07 +0100
* gnu/packages/julia.scm (julia)[arguments]: Disable broken tests.
---
 gnu/packages/julia.scm | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/julia.scm b/gnu/packages/julia.scm
index aff7e1a66f..0d4dd2b7f2 100644
--- a/gnu/packages/julia.scm
+++ b/gnu/packages/julia.scm
@@ -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

base-commit: 6605d9ba356f7975e75c0664d9ef02bb7bc9cc1e
-- 
2.32.0




--- End Message ---
--- Begin Message --- Subject: Re: bug#52078: [PATCH 1/2] gnu: julia: Disable broken tests. Date: Thu, 25 Nov 2021 01:43:39 -0500 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Hello Simon,

zimoun <zimon.toutoune@gmail.com> writes:

> The tests are defined by the script 'test/runtests.jl' from packages and the
> parallelism depends on the implementation of this script.  Therefore, 'julia'
> is launched using local worker processes accordingly with 'parallel?'.
>
> * guix/build/julia-build-system.scm (check): Set JULIA_CPU_THREADS, add
> options '--procs'.
> * guix/build-system/julia.scm (julia-build): Add 'parallel-tests?'.
> ---
>  guix/build-system/julia.scm       | 3 +++
>  guix/build/julia-build-system.scm | 9 ++++++++-
>  2 files changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/guix/build-system/julia.scm b/guix/build-system/julia.scm
> index 2998663df1..6261f8a55a 100644
> --- a/guix/build-system/julia.scm
> +++ b/guix/build-system/julia.scm
> @@ -2,6 +2,7 @@
>  ;;; Copyright © 2019 Nicolò Balzarotti <nicolo@nixo.xyz>
>  ;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
>  ;;; Copyright © 2021 Jean-Baptiste Volatier <jbv@pm.me>
> +;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -79,6 +80,7 @@ (define private-keywords
>  (define* (julia-build name inputs
>                        #:key source
>                        (tests? #t)
> +                      (parallel-tests? #t)
>                        (phases '%standard-phases)
>                        (outputs '("out"))
>                        (search-paths '())
> @@ -98,6 +100,7 @@ (define builder
>                         #:source #+source
>                         #:system #$system
>                         #:tests? #$tests?
> +                       #:parallel-tests? #$parallel-tests?
>                         #:phases #$phases
>                         #:outputs #$(outputs->gexp outputs)
>                         #:search-paths '#$(sexp->gexp
> diff --git a/guix/build/julia-build-system.scm 
> b/guix/build/julia-build-system.scm
> index 41c69665c6..f0dc419c17 100644
> --- a/guix/build/julia-build-system.scm
> +++ b/guix/build/julia-build-system.scm
> @@ -1,6 +1,7 @@
>  ;;; GNU Guix --- Functional package management for GNU
>  ;;; Copyright © 2019, 2020 Nicolò Balzarotti <nicolo@nixo.xyz>
>  ;;; Copyright © 2021 Jean-Baptiste Volatier <jbv@pm.me>
> +;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -103,11 +104,15 @@ (define* (precompile #:key source inputs outputs 
> julia-package-name
>    #t)
>  
>  (define* (check #:key tests? source inputs outputs julia-package-name
> +                parallel-tests?
>                  #:allow-other-keys)
>    (when tests?
>      (let* ((out (assoc-ref outputs "out"))
>             (package (or julia-package-name (project.toml->name 
> "Project.toml")))
> -           (builddir (string-append out "/share/julia/")))
> +           (builddir (string-append out "/share/julia/"))
> +           (jobs (if parallel-tests?
> +                     (number->string (parallel-job-count))
> +                     "1")))
>        ;; With a patch, SOURCE_DATE_EPOCH is honored
>        (setenv "SOURCE_DATE_EPOCH" "1")
>        (setenv "JULIA_DEPOT_PATH" builddir)
> @@ -115,8 +120,10 @@ (define* (check #:key tests? source inputs outputs 
> julia-package-name
>                (string-append builddir "loadpath/" ":"
>                               (or (getenv "JULIA_LOAD_PATH")
>                                   "")))
> +      (setenv "JULIA_CPU_THREADS" jobs)
>        (setenv "HOME" "/tmp")
>        (invoke "julia" "--depwarn=yes"
> +              (string-append "--procs=" jobs)
>                (string-append builddir "loadpath/"
>                               package "/test/runtests.jl"))))
>    #t)

I've applied this series as of commit
905b090582e5c03ef4fb183fda0a1ababf5cb284.  Thanks for the great hacking
session (and result :-)).

Closing.

Maxim


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]