From: Jaeme Sifat via Guix-patches via <guix-patches@gnu.org>
To: 67947@debbugs.gnu.org
Cc: Jaeme Sifat <jaeme@runbox.com>, Efraim Flashner <efraim@flashner.co.il>
Subject: [bug#67947] [PATCH 0/3 rust-team] guix: cargo-build-system: Add test keys.
Date: Thu, 21 Dec 2023 00:11:23 -0500 [thread overview]
Message-ID: <cover.1703135457.git.jaeme@runbox.com> (raw)
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
next reply other threads:[~2023-12-21 5:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-21 5:11 Jaeme Sifat via Guix-patches via [this message]
2023-12-21 5:28 ` [bug#67947] [PATCH 1/3] guix: build-system: cargo: Add cargo-skip-tests Jaeme Sifat via Guix-patches via
2023-12-21 5:28 ` [bug#67947] [PATCH 2/3] guix: build-system: cargo: Add cargo-test-targets Jaeme Sifat via Guix-patches via
2023-12-21 5:28 ` [bug#67947] [PATCH 3/3] guix: Add copyright notice Jaeme Sifat via Guix-patches via
2024-10-31 15:19 ` [bug#67947] cargo-build-system: Add test keys Steve George
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1703135457.git.jaeme@runbox.com \
--to=guix-patches@gnu.org \
--cc=67947@debbugs.gnu.org \
--cc=efraim@flashner.co.il \
--cc=jaeme@runbox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.