From patchwork Thu Nov 25 01:24:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Tournier X-Patchwork-Id: 34796 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id DEE1127BBEA; Thu, 25 Nov 2021 01:25:48 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, PDS_OTHER_BAD_TLD,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A334327BBE9 for ; Thu, 25 Nov 2021 01:25:48 +0000 (GMT) Received: from localhost ([::1]:38252 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mq3WF-0005yp-Sw for patchwork@mira.cbaines.net; Wed, 24 Nov 2021 20:25:47 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55606) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mq3VX-0005k0-B2 for guix-patches@gnu.org; Wed, 24 Nov 2021 20:25:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:43799) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mq3VX-0001vD-1Y 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 1mq3VW-0007tY-Uq for guix-patches@gnu.org; Wed, 24 Nov 2021 20:25:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52078] [PATCH v2 1/3] gnu: julia: Disable broken tests. References: <20211124141907.64286-1-zimon.toutoune@gmail.com> In-Reply-To: <20211124141907.64286-1-zimon.toutoune@gmail.com> Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 25 Nov 2021 01:25:02 +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.163780350130324 (code B ref 52078); Thu, 25 Nov 2021 01:25:02 +0000 Received: (at 52078) by debbugs.gnu.org; 25 Nov 2021 01:25:01 +0000 Received: from localhost ([127.0.0.1]:55342 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mq3VU-0007sv-Jr for submit@debbugs.gnu.org; Wed, 24 Nov 2021 20:25:00 -0500 Received: from mail-wr1-f47.google.com ([209.85.221.47]:45739) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mq3VS-0007sT-60 for 52078@debbugs.gnu.org; Wed, 24 Nov 2021 20:24:59 -0500 Received: by mail-wr1-f47.google.com with SMTP id o13so7814228wrs.12 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:mime-version :content-transfer-encoding; bh=jGW4UmVwHdFkX/RIHu0/mNinjLOGZC+zjSZ9c9Bkne4=; b=fYaB24A4n7lJuJs9WKTTP+fr+20+AsqRGeCyoA7VLM1vwAWZ47GBzQXlYPDzeMf5fS crbv7eF9Q78tF1SM34LWRwI1axOW8fcFiRZcwMEDABrf1XijJdGmKyv0KmY++4hjav0Y Ab8tz9e9iqEba06h2GXW3/9OSbo5ypcrzaoEHbaqS3VfGw3JyLc49Q9Og9pwampd1mb7 tokIFiceHb84DDUjxpA9RuMGslJ93rsgDCxQKgeiS0wkQtBq9i4y/zov8ICutZWyOuQC WPrIHVPDXuXAu9UBSzy+O/wIN3w5MwkSoBMvDJwfpRbpYCHXH4yOB9P5I82aCvsW/uYC fDNQ== 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:mime-version :content-transfer-encoding; bh=jGW4UmVwHdFkX/RIHu0/mNinjLOGZC+zjSZ9c9Bkne4=; b=slTIUCHqN7gZD0lgTi0+iHz/Q8l/BGwSgaoXB3IqvZZRXdNI/n4PRH2v75TK2/qlGL rZmcHZX89GgTNcAJSpzVkeP7Dckykyfk30f0t9yI69PA4LJX4YQyNMgZmZfdY6XOkkGM nroiH5bMfLNl24jKlZ/1ugEyMwwGXGsI/zm9Y/golrIv/T6jfQZWRUviwCTJFxkYOOJe D6/1SaRBFiB9pDcHuqzDaJTmxeMd22LC6DAwx01/+5I8mloP+6fg8s4/dxjKOEvCd9AL S6Lnb3D0SOatYkksIAfMD6KiEQzYeaJj9DTQ+yqYk6jktjy3lV8teqQIWI0SvDddz61t gj2w== X-Gm-Message-State: AOAM530Jlp9P+CoK9iZ3C+/Qz9pLZ0t+H0XRuyix2Vw2B1K7M5XG4OTT B2yOK6jtzoK/jgIWFkhAyN3A3y9v7x4= X-Google-Smtp-Source: ABdhPJyIta9zRosp93Yejc07u0O7D6gKLYT+ontvhAOf4cvIGHGqzgUS0q/OQm56V/laExthqgt0rg== X-Received: by 2002:adf:f602:: with SMTP id t2mr2045570wrp.539.1637803492250; Wed, 24 Nov 2021 17:24:52 -0800 (PST) Received: from localhost.localdomain ([193.48.40.110]) by smtp.gmail.com with ESMTPSA id p27sm1214691wmi.28.2021.11.24.17.24.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Nov 2021 17:24:51 -0800 (PST) From: zimoun Date: Thu, 25 Nov 2021 02:24:41 +0100 Message-Id: <20211125012443.21840-1-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * 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 --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 From patchwork Thu Nov 25 01:24:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Tournier X-Patchwork-Id: 34795 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 5B6AC27BBEA; Thu, 25 Nov 2021 01:25:39 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id D22BA27BBE9 for ; Thu, 25 Nov 2021 01:25:38 +0000 (GMT) Received: from localhost ([::1]:38038 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mq3W6-0005kf-1B for patchwork@mira.cbaines.net; Wed, 24 Nov 2021 20:25:38 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55604) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mq3VW-0005js-Ts for guix-patches@gnu.org; Wed, 24 Nov 2021 20:25:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:43798) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mq3VW-0001v2-LO for guix-patches@gnu.org; Wed, 24 Nov 2021 20:25:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mq3VW-0007tQ-HK for guix-patches@gnu.org; Wed, 24 Nov 2021 20:25:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52078] [PATCH v2 2/3] gnu: julia: Allow parallel tests. Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 25 Nov 2021 01:25:02 +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.163780350030316 (code B ref 52078); Thu, 25 Nov 2021 01:25:02 +0000 Received: (at 52078) by debbugs.gnu.org; 25 Nov 2021 01:25:00 +0000 Received: from localhost ([127.0.0.1]:55340 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mq3VU-0007ss-9O for submit@debbugs.gnu.org; Wed, 24 Nov 2021 20:25:00 -0500 Received: from mail-wr1-f46.google.com ([209.85.221.46]:37717) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mq3VS-0007sU-DC for 52078@debbugs.gnu.org; Wed, 24 Nov 2021 20:24:59 -0500 Received: by mail-wr1-f46.google.com with SMTP id b12so7878687wrh.4 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=Dbi//WRcLaDreUGryCZWzaBlSA6bB0ZByvbv/snFC6o=; b=NSNrlqV3ZHX1avls2ToFCRTx6B60oOTWJBKlXhaitudQSN9QLsDD3vkm1OSma3G1mC XgZHZTkdgrQY+R01rIZ3jXqvPxSITgmSsqdd0e9E2uBEvhw6SPXTswbPrR9oXqR67fFc O2WEDIdrGjlOh5XfOfBPOdJBtEuDyLFpCIWmWGa1K6YXmYcyy7rJH8HdAp3yUE1g/7x6 J6Q3LhOT+m1LZuPCqJBqMMxC9PJs/6RjsEgcDhOMTxm9ET4ltpjX37khzYqjlhumIQSt edSMRhUlGBPdbRKRxQyNhqYLLezwBYrb1ZlBc+9/JoodRO5J7QjBmVRa28VAj73AISWX GEKw== 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=Dbi//WRcLaDreUGryCZWzaBlSA6bB0ZByvbv/snFC6o=; b=wnTp6i0yrODgLk0BmXwwxxXo974TAJQGLju26zaATsPv3oi2emsLRYzI/OrY7pBHcC CKY+1f5K8gwv/mbgOnuQos/YdfY1eH38823teAoe9pfArrT4EE6y3n1wn+3vNjey2p+p YEJOrRE9LzFbEOwdRIIbYYKtR1skjgtoIujz4dbObKtDgYAVbW6dpmoJp4xycn5gGME4 42gEnocdu+yJ/p258/OaBCDDYud/7Pr1xrgj4/JqjItrn0nT5fxum/vapr/A9RKvc9md jkT2nPByW3+4WIZ0Y3a02S/BaGKXz+PMm5ndEWj9HPTu+6vCAPR7yfdweIAXlpat8A3L /XFg== X-Gm-Message-State: AOAM5333dDZojrnXMKqQiNPNwVxfG/Q++1gdvjbJy4tgv1figGcciG06 qGPzRlcUHyfYm7W3sOZlY1ErhEdRIX4= X-Google-Smtp-Source: ABdhPJwjH3hbe5/nKFsotm3fvSUuu3Wscet6YAjSAOM2i88gPzPMiih3irGjujE5FnImagMPPN7X/w== X-Received: by 2002:adf:db8d:: with SMTP id u13mr1900918wri.583.1637803492763; Wed, 24 Nov 2021 17:24:52 -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:52 -0800 (PST) From: zimoun Date: Thu, 25 Nov 2021 02:24:42 +0100 Message-Id: <20211125012443.21840-2-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 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/julia.scm (julia)[origin]: New patch. * gnu/packages/patches/julia-Allow-parallel-build.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/local.mk | 2 ++ gnu/packages/julia.scm | 3 +- .../patches/julia-allow-parallel-build.patch | 30 +++++++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/julia-allow-parallel-build.patch diff --git a/gnu/local.mk b/gnu/local.mk index ea8a203ac9..706725965b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -46,6 +46,7 @@ # Copyright © 2021 Sharlatan Hellseher # Copyright © 2021 Dmitry Polyakov # Copyright © 2021 Andrew Tropin +# Copyright © 2021 Simon Tournier # # This file is part of GNU Guix. # @@ -1296,6 +1297,7 @@ dist_patch_DATA = \ %D%/packages/patches/jfsutils-include-systypes.patch \ %D%/packages/patches/julia-SOURCE_DATE_EPOCH-mtime.patch \ %D%/packages/patches/julia-tracker-16-compat.patch \ + %D%/packages/patches/julia-allow-parallel-build.patch \ %D%/packages/patches/kdbusaddons-kinit-file-name.patch \ %D%/packages/patches/libffi-3.3-powerpc-fixes.patch \ %D%/packages/patches/libffi-float128-powerpc64le.patch \ diff --git a/gnu/packages/julia.scm b/gnu/packages/julia.scm index 649ffb8ee4..cf76cfa23c 100644 --- a/gnu/packages/julia.scm +++ b/gnu/packages/julia.scm @@ -145,7 +145,8 @@ (define-public julia (base32 "1515x8fs25l3f9csbmd1v4nm041zvjnvigy6s5iidy4yrkwdx4r5")) (patches - (search-patches "julia-SOURCE_DATE_EPOCH-mtime.patch")))) + (search-patches "julia-SOURCE_DATE_EPOCH-mtime.patch" + "julia-allow-parallel-build.patch")))) (build-system gnu-build-system) (arguments `(#:test-target "test" diff --git a/gnu/packages/patches/julia-allow-parallel-build.patch b/gnu/packages/patches/julia-allow-parallel-build.patch new file mode 100644 index 0000000000..5a382e7c89 --- /dev/null +++ b/gnu/packages/patches/julia-allow-parallel-build.patch @@ -0,0 +1,30 @@ +diff --git a/test/runtests.jl b/test/runtests.jl +index 2f9cd058bb..150395e78c 100644 +--- a/test/runtests.jl ++++ b/test/runtests.jl +@@ -4,7 +4,7 @@ using Test + using Distributed + using Dates + import REPL +-using Printf: @sprintf ++using Printf: @sprintf, @printf + using Base: Experimental + + include("choosetests.jl") +@@ -83,11 +83,15 @@ prepend!(tests, linalg_tests) + import LinearAlgebra + cd(@__DIR__) do + n = 1 +- if net_on ++ # Allow parallel tests with isolated environment ++ # https://github.com/JuliaLang/julia/issues/43205 ++ # https://github.com/JuliaLang/julia/pull/43211 ++ if net_on || haskey(ENV, "JULIA_CPU_THREADS") + n = min(Sys.CPU_THREADS, length(tests)) + n > 1 && addprocs_with_testenv(n) + LinearAlgebra.BLAS.set_num_threads(1) + end ++ @printf("Number of threads: %i\n", n) + skipped = 0 + + @everywhere include("testdefs.jl") From patchwork Thu Nov 25 01:24:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Tournier X-Patchwork-Id: 34797 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 8B16F27BBEA; Thu, 25 Nov 2021 01:26:01 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 16CFC27BBE9 for ; Thu, 25 Nov 2021 01:26:01 +0000 (GMT) Received: from localhost ([::1]:38466 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mq3WS-00069h-A7 for patchwork@mira.cbaines.net; 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 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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)