From patchwork Thu Dec 21 05:11:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaeme Sifat X-Patchwork-Id: 2055 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 6722127BBE9; Thu, 21 Dec 2023 05:27:34 +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_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,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 9967D27BBE2 for ; Thu, 21 Dec 2023 05:27:23 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rGBaJ-0008E0-Az; Thu, 21 Dec 2023 00:27:03 -0500 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 1rGBaG-0008Dc-6i for guix-patches@gnu.org; Thu, 21 Dec 2023 00:27:00 -0500 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 1rGBaF-00080t-BU for guix-patches@gnu.org; Thu, 21 Dec 2023 00:26:59 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rGBaH-0005S5-TH; Thu, 21 Dec 2023 00:27:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67947] [PATCH 0/3 rust-team] guix: cargo-build-system: Add test keys. Resent-From: Jaeme Sifat Original-Sender: "Debbugs-submit" Resent-CC: efraim@flashner.co.il, guix-patches@gnu.org Resent-Date: Thu, 21 Dec 2023 05:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 67947 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67947@debbugs.gnu.org Cc: Jaeme Sifat , Efraim Flashner X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Efraim Flashner Received: via spool by submit@debbugs.gnu.org id=B.170313640820926 (code B ref -1); Thu, 21 Dec 2023 05:27:01 +0000 Received: (at submit) by debbugs.gnu.org; 21 Dec 2023 05:26:48 +0000 Received: from localhost ([127.0.0.1]:42221 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rGBa4-0005RS-3U for submit@debbugs.gnu.org; Thu, 21 Dec 2023 00:26:48 -0500 Received: from lists.gnu.org ([2001:470:142::17]:42814) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rGBZz-0005R9-27 for submit@debbugs.gnu.org; Thu, 21 Dec 2023 00:26:46 -0500 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 1rGBZp-0008Cf-Nf for guix-patches@gnu.org; Thu, 21 Dec 2023 00:26:33 -0500 Received: from mailtransmit05.runbox.com ([2a0c:5a00:149::26]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rGBZm-0007uk-UJ for guix-patches@gnu.org; Thu, 21 Dec 2023 00:26:33 -0500 Received: from mailtransmit03.runbox ([10.9.9.163] helo=aibo.runbox.com) by mailtransmit05.runbox.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1rGBZg-000ZII-3j for guix-patches@gnu.org; Thu, 21 Dec 2023 06:26:24 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=runbox.com; s=selector2; h=Content-Transfer-Encoding:MIME-Version:Message-ID:Date: Subject:Cc:To:From; bh=LDhWpb8GBpRo89cL809LBL6RKj6EP7H+RF/nRi0Ihiw=; b=ZvveMw mFrc+sVerfFDtcAqySLzhTrf4HRd2SQ7dUmlTM3VwgaEZnoKKP98RrFByMQNyukhDeu2w/FW45JSD XXBCmSt3ITb9FDd0niEP+h7+uD/UJJFqhGIX30L6c0UnXdP92dOG7J3pWa13qp5Oh/s1V8965YFqD wdqSLb1pO3EaFfr6nTA4DjW4yHDCHpSuJ+pcCGW53VVdo89oWw11VNY7AoffUdOialHq53JZIs8uO +GUJd1FMKDkhV9qdeUCnLWFBA6BHos07S5JoiHnpwcNMw5nDiSlXYf70bqI95imVMMwwwVREw4dPs sohTQq0yVyM9wSqJw3opySSuR/Gw==; Received: from [10.9.9.73] (helo=submission02.runbox) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1rGBZc-0003La-Gj for guix-patches@gnu.org; Thu, 21 Dec 2023 06:26:23 +0100 Received: by submission02.runbox with esmtpsa [Authenticated ID (1176697)] (TLS1.2:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.93) id 1rGBZQ-009cXA-OQ; Thu, 21 Dec 2023 06:26:09 +0100 Date: Thu, 21 Dec 2023 00:11:23 -0500 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2a0c:5a00:149::26; envelope-from=jaeme@runbox.com; helo=mailtransmit05.runbox.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: Jaeme Sifat X-ACL-Warn: , Jaeme Sifat via Guix-patches X-Patchwork-Original-From: Jaeme Sifat via Guix-patches via From: Jaeme Sifat 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 I propose adding two new keys for the 'check phase of the cargo-build-system. One is #:cargo-skip-tests which accepts a list of strings representing the names of the tests to be skipped and the other is #:cargo-test-targets which accepts a list of strings representing the test targets to be ran. The goal of adding these two keys is to make it so that the packager doesn't have to interface directly with #:cargo-test-flags which is set to --release mode by default. I believe that this leads to cleaner looking build definitions that should be easier to bind to something say, a web-based package definition editor that exists right now. These patches are just a draft of this feature I cooked up. Here's what they should look like in action with the rust-alsa crate: --8<---------------cut here---------------start------------->8--- (define-public rust-alsa-0.8 (package ... (build-system cargo-build-system) (arguments `(#:cargo-test-targets (list "lib" "bins" "tests") #:cargo-skip-tests (list "pcm::drop" "pcm::info_from_default" "pcm::playback_to_default" "pcm::record_from_default" "seq::print_seqs" "seq::seq_loopback" "seq::seq_portsubscribeiter" "seq::seq_subscribe") #:cargo-inputs (("rust-alsa-sys" ,rust-alsa-sys-0.3) ("rust-bitflags" ,rust-bitflags-2) ("rust-libc" ,rust-libc-0.2) ("rust-nix" ,rust-nix-0.26)))) ...)) --8<---------------cut here---------------end--------------->8--- I would like to hear the feedback on this change and its implementation. Of course, if this change is accepted, then there ought to be an update to the Rust crates section of 'Contributing' in the Guix manual that details this. Jaeme Sifat (3): guix: build-system: cargo: Add cargo-skip-tests. guix: build-system: cargo: Add cargo-test-targets. guix: Add copyright notice. guix/build-system/cargo.scm | 9 +++++++++ guix/build/cargo-build-system.scm | 20 +++++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) base-commit: 49a7a95ba44e231e9e15a274f9a96de6fa012daf --- 2.41.0