From patchwork Sat Aug 7 04:48:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sarah Morgensen X-Patchwork-Id: 31869 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 A6A7327BC78; Sat, 7 Aug 2021 05:49:20 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 782E527BC6B for ; Sat, 7 Aug 2021 05:49:20 +0100 (BST) Received: from localhost ([::1]:60560 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mCEGt-0003Fa-Hm for patchwork@mira.cbaines.net; Sat, 07 Aug 2021 00:49:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32994) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCEGc-0003Ds-9j for guix-patches@gnu.org; Sat, 07 Aug 2021 00:49:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40183) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mCEGc-0005Bs-3V for guix-patches@gnu.org; Sat, 07 Aug 2021 00:49:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mCEGc-0003pI-23 for guix-patches@gnu.org; Sat, 07 Aug 2021 00:49:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49919] [PATCH core-updates 2/2] build-system/go: Honor #:parallel-tests?. Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 07 Aug 2021 04:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49919 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49919@debbugs.gnu.org Received: via spool by 49919-submit@debbugs.gnu.org id=B49919.162831172714676 (code B ref 49919); Sat, 07 Aug 2021 04:49:02 +0000 Received: (at 49919) by debbugs.gnu.org; 7 Aug 2021 04:48:47 +0000 Received: from localhost ([127.0.0.1]:51728 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mCEGM-0003oY-N9 for submit@debbugs.gnu.org; Sat, 07 Aug 2021 00:48:46 -0400 Received: from out1.migadu.com ([91.121.223.63]:22481) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mCEGF-0003oE-IL for 49919@debbugs.gnu.org; Sat, 07 Aug 2021 00:48:39 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1628311719; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jqqJTupahqpcZ9mq9+Q/+b1DXjcF3CEX0RrnivWcaUk=; b=WtUev9DoV4vMLRxjdR6oD9EFZKdrlX2cgQr4sw2MQWH31BT1z6L9SYw1P3yYMhWCkhHA4D jrf6btEUCP69APuxrJafZwQ7yRUxLtSs5+XORjEtsXZiLQNtZ57MWtWlf1xKnanH7YQFra 7Yse8IMYH69BIPwP63ySzGJt16k3/50= From: Sarah Morgensen Date: Fri, 6 Aug 2021 21:48:34 -0700 Message-Id: <0ec3e2c95c5be19dd9c07dd21f7f55283ebdc9da.1628309588.git.iskarian@mgsn.dev> In-Reply-To: References: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: iskarian@mgsn.dev 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 guix/build/go-build-system.scm (build): Honor #:parallel-tests?. guix/build-system/go.scm (go-build): Add PARALLEL-TESTS? parameter. [builder]: Use it. --- guix/build-system/go.scm | 2 ++ guix/build/go-build-system.scm | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/guix/build-system/go.scm b/guix/build-system/go.scm index a5aa21b99e..7b66163779 100644 --- a/guix/build-system/go.scm +++ b/guix/build-system/go.scm @@ -131,6 +131,7 @@ commit hash and its date rather than a proper release tag." (build-flags ''()) (tests? #t) (parallel-build? #t) + (parallel-tests? #t) (allow-go-reference? #f) (system (%current-system)) (guile #f) @@ -156,6 +157,7 @@ commit hash and its date rather than a proper release tag." #:build-flags #$build-flags #:tests? #$tests? #:parallel-build? #$parallel-build? + #:parallel-tests? #$parallel-tests? #:allow-go-reference? #$allow-go-reference? #:inputs #$(input-tuples->gexp inputs))))) diff --git a/guix/build/go-build-system.scm b/guix/build/go-build-system.scm index 521bad9667..0ad580a484 100644 --- a/guix/build/go-build-system.scm +++ b/guix/build/go-build-system.scm @@ -239,9 +239,12 @@ unpacking." (invoke "go" "env")))) ;; Can this also install commands??? -(define* (check #:key tests? import-path #:allow-other-keys) +(define* (check #:key tests? import-path (parallel-tests? #t) + #:allow-other-keys) "Run the tests for the package named by IMPORT-PATH." (when tests? + (let* ((njobs (if parallel-tests? (parallel-job-count) 1))) + (setenv "GOMAXPROCS" (number->string njobs))) (invoke "go" "test" import-path)) #t)