From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:700:3204::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id L1TjM6nNg2XwYQEAkFu2QA (envelope-from ) for ; Thu, 21 Dec 2023 06:31:21 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id wKibLanNg2VjVQAAe85BDQ (envelope-from ) for ; Thu, 21 Dec 2023 06:31:21 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=runbox.com header.s=selector2 header.b=W6TyAgcz; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1703136681; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: 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=m3SYMzewRF5DPXhMRjD2BQq4TBIXqGAZG84Cq1QRQCc=; b=bij+XH+xMCLUvO5ePX3fMdiWlWcKgVlBfivLc0bLbdawGdJ7kVjXR6hWo1+/1BH2LSpN34 9iGkXbYMaCZKrrL/IIPVgW65dGzvSyt6yjLCunQy6apRUC4cY3XEDSu5X9qMFyldBQDRQM AFVNUh1S6cqTuSQSU7EGYAFCYYt4fTSop+CrhfyPr0HcN0R09WwUO/LDFeunN6TN+wXxam oezClQ1sGCUMtjuXKqLtGnOlW5FjzSExNrCOrjA1yVSlnOuf14uCxpnI+f0ytlFxtQ3mDb atEn025rCoVzzsf+ywPZVnc4g9lhQnTH6jIiiqLv25Juz+UALsXDd8GuYsCQvA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=runbox.com header.s=selector2 header.b=W6TyAgcz; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1703136681; a=rsa-sha256; cv=none; b=hI2yNi1uh9UQsPU/MyXzgt9Ktk40vLJhYFPNlI6mv36fe8dFg2uIWy4Dmf4fYec3f/c5U1 a7kppTXo6q9Wu8zjyP9nKIIJu/YHrM5+BUKtqziplm231LVEFTHbUMWdgG8z4e6zpQGRfL 8F9fv+DMstilW/U4xfGHjAEC7WaVCXIeyn4+/m7ePjmiYtXvVoXba9XESF5mYSMvqqia76 OwOH6tggMk8wLutjg1AiBgTdcaey6/TDt85OOfDiYPnm16onH6DY2u/+uQxiSq96Oen/lF k/YHFabOC6VkX1qmmfsWg+pF0aXMAmK9KiOZV50v327/uUZeKTo6pEoWOGvdMQ== 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 66D09396E5 for ; Thu, 21 Dec 2023 06:31:21 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rGBe9-00008F-FY; Thu, 21 Dec 2023 00:31:01 -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 1rGBe8-000084-3t for guix-patches@gnu.org; Thu, 21 Dec 2023 00:31: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 1rGBe7-0001DR-LV for guix-patches@gnu.org; Thu, 21 Dec 2023 00:30:59 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rGBeA-0007rb-6E; Thu, 21 Dec 2023 00:31:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67947] [PATCH 1/3] guix: build-system: cargo: Add cargo-skip-tests. 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:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 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-Xcc: Efraim Flashner Received: via spool by 67947-submit@debbugs.gnu.org id=B67947.170313663827539 (code B ref 67947); Thu, 21 Dec 2023 05:31:02 +0000 Received: (at 67947) by debbugs.gnu.org; 21 Dec 2023 05:30:38 +0000 Received: from localhost ([127.0.0.1]:42230 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rGBdl-00079I-Pj for submit@debbugs.gnu.org; Thu, 21 Dec 2023 00:30:38 -0500 Received: from mailtransmit05.runbox.com ([2a0c:5a00:149::26]:42418) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rGBdj-0006tA-QQ for 67947@debbugs.gnu.org; Thu, 21 Dec 2023 00:30:36 -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 1rGBda-000Zju-0n for 67947@debbugs.gnu.org; Thu, 21 Dec 2023 06:30:26 +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:References:In-Reply-To :Message-ID:Date:Subject:Cc:To:From; bh=m3SYMzewRF5DPXhMRjD2BQq4TBIXqGAZG84Cq1QRQCc=; b=W6TyAgczB/Ur2F3vN9EI4udQGO JnpAwgYYET9C03kex2xVZvOocpuk9p41oSf5gXQyMB6+75DcXazad8cfzv+cVzjkpIhfm/TtEcfGy woSGnzOJJ7yX5WXJTsLvIwjmLWDj2HuBMaJ9gxxnGosxk0uk35qA4/sACFkUKyr/oVzFr5/rg/uJJ uaBq+MnWdJEMLqkLwGbh7et5lGWjX2SopYyENwQXo5oUiSJ6ox2bMIAEMUmorGjmAtvMllqnEEYXz CBwX2ZNIiNMXKMU9T/6q16E2Xeik0FLS7Rcifmw/XEDK5HK3kJgmZFu+LXprDW81Xf2BUqJpA1SJW PTf18fIA==; Received: from [10.9.9.74] (helo=submission03.runbox) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1rGBdZ-0003fu-HW for 67947@debbugs.gnu.org; Thu, 21 Dec 2023 06:30:25 +0100 Received: by submission03.runbox with esmtpsa [Authenticated ID (1176697)] (TLS1.2:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.93) id 1rGBdP-008kIc-VV; Thu, 21 Dec 2023 06:30:16 +0100 Date: Thu, 21 Dec 2023 00:28:40 -0500 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 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: , Reply-to: Jaeme Sifat X-ACL-Warn: , Jaeme Sifat via Guix-patches From: Jaeme Sifat via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -6.29 X-Spam-Score: -6.29 X-Migadu-Queue-Id: 66D09396E5 X-TUID: TdokbyTX9jNR The #:cargo-skip-tests key accepts a list of strings that represent the names of tests to be skipped by passing the "--skip=" to cargo test. This is so that the packager doesn't have to edit #:cargo-test-flags directly when trying to skip tests. * guix/build-system/cargo.scm (cargo-build): Add cargo-skip-tests. * guix/build-system/cargo.scm (builder): Add cargo-skip-tests. * guix/build-system/cargo.scm (cargo-cross-build): Add cargo-skip-tests. * guix/build/cargo-build-system.scm (check): Add cargo-skip-tests. Change-Id: I2f64370cf29b9495a33a8e072ab930b8635e742d --- guix/build-system/cargo.scm | 4 ++++ guix/build/cargo-build-system.scm | 10 +++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/guix/build-system/cargo.scm b/guix/build-system/cargo.scm index c029cc1dda..d2a45f0609 100644 --- a/guix/build-system/cargo.scm +++ b/guix/build-system/cargo.scm @@ -86,6 +86,7 @@ (define* (cargo-build name inputs (vendor-dir "guix-vendor") (cargo-build-flags ''("--release")) (cargo-test-flags ''("--release")) + (cargo-skip-tests ''()) (cargo-package-flags ''("--no-metadata" "--no-verify")) (features ''()) (skip-build? #f) @@ -112,6 +113,7 @@ (define* (cargo-build name inputs #:vendor-dir #$vendor-dir #:cargo-build-flags #$(sexp->gexp cargo-build-flags) #:cargo-test-flags #$(sexp->gexp cargo-test-flags) + #:cargo-skip-tests #$(sexp->gexp cargo-skip-tests) #:cargo-package-flags #$(sexp->gexp cargo-package-flags) #:features #$(sexp->gexp features) #:skip-build? #$skip-build? @@ -141,6 +143,7 @@ (define* (cargo-cross-build name (vendor-dir "guix-vendor") (cargo-build-flags ''("--release")) (cargo-test-flags ''("--release")) + (cargo-skip-tests ''()) (cargo-package-flags ''("--no-metadata" "--no-verify")) (features ''()) (skip-build? #f) @@ -169,6 +172,7 @@ (define* (cargo-cross-build name #:vendor-dir #$vendor-dir #:cargo-build-flags #$(sexp->gexp cargo-build-flags) #:cargo-test-flags #$(sexp->gexp cargo-test-flags) + #:cargo-skip-tests #$(sexp->gexp cargo-skip-tests) #:cargo-package-flags #$(sexp->gexp cargo-package-flags) #:features #$(sexp->gexp features) #:skip-build? #$skip-build? diff --git a/guix/build/cargo-build-system.scm b/guix/build/cargo-build-system.scm index ffb2ec898e..7cdb2a72d3 100644 --- a/guix/build/cargo-build-system.scm +++ b/guix/build/cargo-build-system.scm @@ -258,11 +258,19 @@ (define* (build #:key (define* (check #:key tests? + cargo-skip-tests (cargo-test-flags '("--release")) #:allow-other-keys) "Run tests for a given Cargo package." (if tests? - (apply invoke "cargo" "test" cargo-test-flags) + (if cargo-skip-tests + (let ((test-lst (map (lambda (test) + (string-append "--skip=" test)) + cargo-skip-tests))) + (apply invoke "cargo" "test" (append + cargo-test-flags + (cons* "--" test-lst)))) + (apply invoke "cargo" "test" cargo-test-flags)) #t)) (define* (package #:key -- 2.41.0