From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id yNcQGCrmnmFV9wAAgWs5BA (envelope-from ) for ; Thu, 25 Nov 2021 02:26:02 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id OMWyEyrmnmGNBAAAB5/wlQ (envelope-from ) for ; Thu, 25 Nov 2021 01:26:02 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A2BA12EB86 for ; Thu, 25 Nov 2021 02:26:01 +0100 (CET) Received: from localhost ([::1]:38466 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mq3WS-00069h-Sb for larch@yhetil.org; Wed, 24 Nov 2021 20:26:00 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55608) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mq3VX-0005k8-Ri for guix-patches@gnu.org; Wed, 24 Nov 2021 20:25:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:43800) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mq3VX-0001vL-EO for guix-patches@gnu.org; Wed, 24 Nov 2021 20:25:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mq3VX-0007tf-At for guix-patches@gnu.org; Wed, 24 Nov 2021 20:25:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52078] [PATCH v2 3/3] build: julia-build-system: Allow parallel tests for package. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 25 Nov 2021 01:25:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52078 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 52078@debbugs.gnu.org Cc: maxim.cournoyer@gmail.com, zimoun Received: via spool by 52078-submit@debbugs.gnu.org id=B52078.163780350130330 (code B ref 52078); Thu, 25 Nov 2021 01:25:03 +0000 Received: (at 52078) by debbugs.gnu.org; 25 Nov 2021 01:25:01 +0000 Received: from localhost ([127.0.0.1]:55344 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mq3VU-0007t3-Vs for submit@debbugs.gnu.org; Wed, 24 Nov 2021 20:25:01 -0500 Received: from mail-wr1-f44.google.com ([209.85.221.44]:40813) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mq3VS-0007sV-SY for 52078@debbugs.gnu.org; Wed, 24 Nov 2021 20:24:59 -0500 Received: by mail-wr1-f44.google.com with SMTP id r8so7838641wra.7 for <52078@debbugs.gnu.org>; Wed, 24 Nov 2021 17:24:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Pz3KhshWLUICdhSK3E3AfXkgcII0hYjKSEn97U6OTnE=; b=qESnTDSDZabWELzz95I8d7Ht2fSx7ZfIx8ThTGxW5rqL1vA4iip3IjCGj1BiiT12gQ qLwHJy8Yqqcx8nk8KmCLWbnNKiAikR0B7idB/GbQrPezKE02DpEstpB821VgW2PyhhA6 OewKYu+nUU85uDlUwJJEMYabjtHF1pZJNr/EdqJWCTfCRNhnl4RlWC1wXT956A9H2TBq 36RHvAVGhBc4AeAH9MQPtBLywcap0KmrLOxhpbhsTzEa0TlKdt82zsxPk/heb6x0beEs 8+5Peur4hHHQEVd+qwCXGe5KxsK6UfKm4m9uL3A8jF6DTPuz0cdnFt3i/HgzP/yVhlaI ETYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Pz3KhshWLUICdhSK3E3AfXkgcII0hYjKSEn97U6OTnE=; b=1L4a1gm4mEHFM8Rrg8AKcZO098Cw42ltXsCVBw/bCBo8vxJpqjTwvIhnPzDmqB5KXT JBrwyuKm5d7245HNqoJ4npPTeyWlHpKA87gx5iuQsq2s2O2DtahSk+OkIX2w27jhwRiZ 0dAIQKOXK+/qFrJ3GszM8LUVunwQ9MQHgkiFaJ3vGSzL/5ZCcPk+0t3BTNIsektCtN5y tsj1il9j+bO4S/F48SbHN5b+P7G8+ZbHCNqi2dksfo1H9a87DtAggHUmnirnIJuAXb7l BvMuURHdBS5CuQLPvLhVZ39WzpmMJ6ghHehcE7t/N3aidanTrj0W+MW3FD0gwXOtNn4t MCAw== X-Gm-Message-State: AOAM530BxoH4o0wFUWjQh2R1WGIG7a00OFCiei+w2hF8rN/F3a4sSGaT j2AVUlUYl4iuCgPX+Mdy63qElQpGr5o= X-Google-Smtp-Source: ABdhPJxNx8yNf81l5AH54+LinEOe7Y1r7R2algcdkcw9H5fDQyGkp04mAsrHDL2n20JJIImcsa6BHg== X-Received: by 2002:adf:f209:: with SMTP id p9mr1984112wro.191.1637803493289; Wed, 24 Nov 2021 17:24:53 -0800 (PST) Received: from localhost.localdomain ([193.48.40.110]) by smtp.gmail.com with ESMTPSA id p27sm1214691wmi.28.2021.11.24.17.24.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Nov 2021 17:24:53 -0800 (PST) From: zimoun Date: Thu, 25 Nov 2021 02:24:43 +0100 Message-Id: <20211125012443.21840-3-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211125012443.21840-1-zimon.toutoune@gmail.com> References: <20211125012443.21840-1-zimon.toutoune@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1637803561; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Pz3KhshWLUICdhSK3E3AfXkgcII0hYjKSEn97U6OTnE=; b=tkM5yl4V6/ffgtWJQYPCDEIZALxKEuBxHm6Gg4EKmBNwn/PSIa6F++AXJXH7+ImZLn9GX8 J85V/YljZicD17ZrDx+W3wNm7LeQ+qOoz7RiTKGM7lNj5dvlX/BoEIzXrJ+QP9X1USs+yA Ng3Bm5FaWYjuq2N9pEZwH9sEXEbF4SzRUZ9L8HUZIcF3McpGRj62ci5KEIAYC05bBnA+Se tILac8+6MVU4mU8atRRgxNLaBqgkDSMWbe/UinIhGkQEWYseykrk1VbKwtvka9xtLZCC64 kFNu5bmqr9ak7Nwp2IAnMVN7NkR5rBsEs+uyE5zhozZpoRCnT0WKawH27voRdw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1637803561; a=rsa-sha256; cv=none; b=W7BHaMQh2bghIf9e0fqjjLYpx0fJFCInlfllCAn9ArHoejgCwZZCvgIIQ46LIcQEzHbw7j XNrFdjvJ2vrflFIHb/z5K2ORXS3Fq8jTO5qY3esZPXz6zkcRBQ16aXOZ5Qms4viAJnvm4I raZQXfJ/18/doitDnJGbS3lr14iKsck2zWLV6fYZ79/BOdSF5b4NpRzy8SwlZ3KLr3bo8X XHPipQdy9Hnq5RLQdD6NITEdu0Atu3acNUgigOu7YR/7tmOsPCxrwNr6N94ASe7514Gn/B tlizRhHvLSBiLRaFhoelXoXhvfB88VVgB0cls0Arb8cA2o3DaPopdkLvxP5wnA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=qESnTDSD; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -1.79 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=qESnTDSD; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: A2BA12EB86 X-Spam-Score: -1.79 X-Migadu-Scanner: scn0.migadu.com X-TUID: qEsMMTzc/12A 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 ;;; Copyright © 2021 Ludovic Courtès ;;; Copyright © 2021 Jean-Baptiste Volatier +;;; Copyright © 2021 Simon Tournier ;;; ;;; 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 ;;; Copyright © 2021 Jean-Baptiste Volatier +;;; Copyright © 2021 Simon Tournier ;;; ;;; 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) -- 2.32.0