build/cargo.scm: Remove '--release' from default cargo-test-flags.

The default behavior for 'cargo test' is to build in debug mode, and many test
suites expect support for things provided in this mode such as debug
assertions (see for example:
<https://github.com/google/zerocopy/issues/2143>).

* guix/build-system/cargo.scm (cargo-build): Remove '--release' from
 #:cargo-test-flags.
* guix/build/cargo-build-system.scm (check): Likewise.

Change-Id: I8a659c25bd33bc1bdfd88e440bd00bad09a5fc01
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
This commit is contained in:
Maxim Cournoyer 2024-12-19 10:46:18 +09:00 committed by Efraim Flashner
parent 979839cf77
commit 1997c01437
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351
2 changed files with 3 additions and 3 deletions

View file

@ -93,7 +93,7 @@ to NAME and VERSION."
(test-target #f)
(vendor-dir "guix-vendor")
(cargo-build-flags ''("--release"))
(cargo-test-flags ''("--release"))
(cargo-test-flags ''())
(cargo-package-flags ''("--no-metadata" "--no-verify"))
(features ''())
(skip-build? #f)
@ -153,7 +153,7 @@ to NAME and VERSION."
(test-target #f)
(vendor-dir "guix-vendor")
(cargo-build-flags ''("--release"))
(cargo-test-flags ''("--release"))
(cargo-test-flags ''())
(cargo-package-flags ''("--no-metadata" "--no-verify"))
(cargo-target (cargo-triplet (or target system)))
(features ''())

View file

@ -252,7 +252,7 @@ directory = '" vendor-dir "'") port)
parallel-build?
parallel-tests?
tests?
(cargo-test-flags '("--release"))
(cargo-test-flags '())
#:allow-other-keys)
"Run tests for a given Cargo package."
(when tests?