all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: zimoun <zimon.toutoune@gmail.com>
Cc: 52078-done@debbugs.gnu.org
Subject: bug#52078: [PATCH 1/2] gnu: julia: Disable broken tests.
Date: Thu, 25 Nov 2021 01:43:39 -0500	[thread overview]
Message-ID: <8735nkbuqs.fsf_-_@gmail.com> (raw)
In-Reply-To: <20211125012443.21840-3-zimon.toutoune@gmail.com> (zimoun's message of "Thu, 25 Nov 2021 02:24:43 +0100")

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




      reply	other threads:[~2021-11-25  6:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-24 14:19 [bug#52078] [PATCH 1/2] gnu: julia: Disable broken tests zimoun
2021-11-24 14:20 ` [bug#52078] [PATCH 2/2] gnu: julia: Allow parallel tests zimoun
2021-11-25  1:24 ` [bug#52078] [PATCH v2 1/3] gnu: julia: Disable broken tests zimoun
2021-11-25  1:24   ` [bug#52078] [PATCH v2 2/3] gnu: julia: Allow parallel tests zimoun
2021-11-25  1:24   ` [bug#52078] [PATCH v2 3/3] build: julia-build-system: Allow parallel tests for package zimoun
2021-11-25  6:43     ` Maxim Cournoyer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8735nkbuqs.fsf_-_@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=52078-done@debbugs.gnu.org \
    --cc=zimon.toutoune@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.