diff options
author | Max Hausch <cheriimoya@googlemail.com> | 2021-02-24 09:32:22 +0100 |
---|---|---|
committer | Max Hausch <cheriimoya@googlemail.com> | 2021-03-02 09:45:26 +0100 |
commit | ebe3ae4d4d4668f3f47a30f10592714df1c9b803 (patch) | |
tree | 3281ce598e5b86c42310a5cecab7714c5800e2d9 /doc/languages-frameworks | |
parent | fa62f3716077be3239765b041702ed401bc257e3 (diff) | |
download | nixlib-ebe3ae4d4d4668f3f47a30f10592714df1c9b803.tar nixlib-ebe3ae4d4d4668f3f47a30f10592714df1c9b803.tar.gz nixlib-ebe3ae4d4d4668f3f47a30f10592714df1c9b803.tar.bz2 nixlib-ebe3ae4d4d4668f3f47a30f10592714df1c9b803.tar.lz nixlib-ebe3ae4d4d4668f3f47a30f10592714df1c9b803.tar.xz nixlib-ebe3ae4d4d4668f3f47a30f10592714df1c9b803.tar.zst nixlib-ebe3ae4d4d4668f3f47a30f10592714df1c9b803.zip |
buildRustPackage: Add cargoTestFlags
This makes it possible to pass flags to `cargo test`, which is needed if a crate is compiled with custom feature flags.
Diffstat (limited to 'doc/languages-frameworks')
-rw-r--r-- | doc/languages-frameworks/rust.section.md | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/languages-frameworks/rust.section.md b/doc/languages-frameworks/rust.section.md index 48510b37add3..a3f0238bf3a1 100644 --- a/doc/languages-frameworks/rust.section.md +++ b/doc/languages-frameworks/rust.section.md @@ -193,6 +193,13 @@ rustPlatform.buildRustPackage { Please note that the code will be compiled twice here: once in `release` mode for the `buildPhase`, and again in `debug` mode for the `checkPhase`. +Test flags, e.g., `--features xxx/yyy`, can be passed to `cargo test` via the +`cargoTestFlags` attribute. + +Another attribute, called `checkFlags`, is used to pass arguments to the test +binary itself, as stated +(here)[https://doc.rust-lang.org/cargo/commands/cargo-test.html]. + #### Tests relying on the structure of the `target/` directory Some tests may rely on the structure of the `target/` directory. Those tests |