From patchwork Sat Apr 20 14:11:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 63176 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 E2F0427BBE2; Sat, 20 Apr 2024 15:16:13 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 3D41227BBE9 for ; Sat, 20 Apr 2024 15:16:11 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ryBVP-0006qE-1J; Sat, 20 Apr 2024 10:15:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ryBVN-0006pY-AK for guix-patches@gnu.org; Sat, 20 Apr 2024 10:15:49 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ryBVM-0002Fd-DH for guix-patches@gnu.org; Sat, 20 Apr 2024 10:15:49 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ryBVa-0003gA-T4 for guix-patches@gnu.org; Sat, 20 Apr 2024 10:16:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70482] [PATCH] guix: pyproject-build-system: Add python test-backend. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 20 Apr 2024 14:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 70482 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70482@debbugs.gnu.org Cc: ngraves@ngraves.fr X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.171362253313965 (code B ref -1); Sat, 20 Apr 2024 14:16:02 +0000 Received: (at submit) by debbugs.gnu.org; 20 Apr 2024 14:15:33 +0000 Received: from localhost ([127.0.0.1]:36530 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ryBV7-0003dA-An for submit@debbugs.gnu.org; Sat, 20 Apr 2024 10:15:33 -0400 Received: from lists.gnu.org ([2001:470:142::17]:57896) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ryBV3-0003bl-Ov for submit@debbugs.gnu.org; Sat, 20 Apr 2024 10:15:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ryBUg-0006Wb-EP for guix-patches@gnu.org; Sat, 20 Apr 2024 10:15:07 -0400 Received: from 6.mo582.mail-out.ovh.net ([87.98.177.69]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ryBUe-0001xH-Ep for guix-patches@gnu.org; Sat, 20 Apr 2024 10:15:05 -0400 Received: from director6.ghost.mail-out.ovh.net (unknown [10.109.176.25]) by mo582.mail-out.ovh.net (Postfix) with ESMTP id 4VMD6j1wFqz1H6d for ; Sat, 20 Apr 2024 14:14:53 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-h5wf2 (unknown [10.110.113.124]) by director6.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 0DC951FE63; Sat, 20 Apr 2024 14:14:53 +0000 (UTC) Received: from ngraves.fr ([37.59.142.101]) by ghost-submission-6684bf9d7b-h5wf2 with ESMTPSA id WNWsAN3NI2ajuAEAj+mrOQ (envelope-from ); Sat, 20 Apr 2024 14:14:53 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-101G0044065abee-3451-428a-8ecb-7b3bdfab9d24, 11D7AE9D2C6D40733812BD69BBD796E52E0327A5) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 81.67.146.208 Date: Sat, 20 Apr 2024 16:11:00 +0200 Message-ID: <20240420141444.30064-1-ngraves@ngraves.fr> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Ovh-Tracer-Id: 14834012751257985762 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvledrudekgedgjeehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepkeffgeetfffgffejgeejvdffgfdtvdeuueetgfefuedvjeegvdegjeejveeuueevnecukfhppeduvdejrddtrddtrddupdekuddrieejrddugeeirddvtdekpdefjedrheelrddugedvrddutddunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepuddprhgtphhtthhopehguhhigidqphgrthgthhgvshesghhnuhdrohhrghdpoffvtefjohhsthepmhhoheekvddpmhhouggvpehsmhhtphhouhht Received-SPF: pass client-ip=87.98.177.69; envelope-from=ngraves@ngraves.fr; helo=6.mo582.mail-out.ovh.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Reply-to: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches X-Patchwork-Original-From: Nicolas Graves via Guix-patches via From: Nicolas Graves Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * guix/build/pyproject-build-system(check): Add python test-backend. This will help in cases where a simple `python -m module args` call has to be made instead of fully replacing the 'check phase, e.g. unittest or django. This is never enabled unless #:test-backend 'python is set, so it doesn't break anything. As an example, the following snippet... (arguments (list #:phases #~(modify-phases %standard-phases (replace 'check (lambda* (#:key tests? #:allow-other-keys) (when tests? (invoke "python" "-m" "unittest" "diff_match_patch.tests"))))))) ...can be transformed like this: (arguments '(#:test-backend 'python #:test-flags (list "-m" "unittest" "diff_match_patch.tests"))) Change-Id: I4919a3e01d64864e3c328609fbcce7df5b3dfe51 --- guix/build/pyproject-build-system.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/guix/build/pyproject-build-system.scm b/guix/build/pyproject-build-system.scm index c69ccc9d64..295542f317 100644 --- a/guix/build/pyproject-build-system.scm +++ b/guix/build/pyproject-build-system.scm @@ -168,6 +168,8 @@ (define* (check #:key tests? test-backend test-flags #:allow-other-keys) (if (null? test-flags) '("test" "-v") test-flags))) + ('python + (apply invoke "python" test-flags)) ;; The developer should explicitly disable tests in this case. (else (raise (condition (&test-system-not-found)))))) (format #t "test suite not run~%")))