add test suite filter example to README and 'cargo miri --help'
This commit is contained in:
parent
70b66aa007
commit
e22baedb1f
2 changed files with 11 additions and 6 deletions
11
README.md
11
README.md
|
|
@ -83,16 +83,17 @@ Now you can run your project in Miri:
|
|||
The first time you run Miri, it will perform some extra setup and install some
|
||||
dependencies. It will ask you for confirmation before installing anything.
|
||||
|
||||
You can pass arguments to Miri after the first `--`, and pass arguments to the
|
||||
interpreted program or test suite after the second `--`. For example, `cargo
|
||||
miri run -- -Zmiri-disable-stacked-borrows` runs the program without checking
|
||||
the aliasing of references. To filter the tests being run, use `cargo miri test
|
||||
-- -- filter`.
|
||||
|
||||
Miri supports cross-execution: if you want to run the program as if it was a
|
||||
Linux program, you can do `cargo miri run --target x86_64-unknown-linux-gnu`.
|
||||
This is particularly useful if you are using Windows, as the Linux target is
|
||||
much better supported than Windows targets.
|
||||
|
||||
You can pass arguments to Miri after the first `--`, and pass arguments to the
|
||||
interpreted program or test suite after the second `--`. For example, `cargo
|
||||
miri run -- -Zmiri-disable-validation` runs the program without validation of
|
||||
basic type invariants and without checking the aliasing of references.
|
||||
|
||||
When compiling code via `cargo miri`, the `miri` config flag is set. You can
|
||||
use this to ignore test cases that fail under Miri because they do things Miri
|
||||
does not support:
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ const XARGO_MIN_VERSION: (u32, u32, u32) = (0, 3, 20);
|
|||
const CARGO_MIRI_HELP: &str = r#"Interprets bin crates and tests in Miri
|
||||
|
||||
Usage:
|
||||
cargo miri [subcommand] [options] [--] [<miri opts>...] [--] [<program opts>...]
|
||||
cargo miri [subcommand] [<cargo options>...] [--] [<miri options>...] [--] [<program/test suite options>...]
|
||||
|
||||
Subcommands:
|
||||
run Run binaries (default)
|
||||
|
|
@ -30,6 +30,10 @@ Common options:
|
|||
Other [options] are the same as `cargo check`. Everything after the first "--" is
|
||||
passed verbatim to Miri, which will pass everything after the second "--" verbatim
|
||||
to the interpreted program.
|
||||
|
||||
Examples:
|
||||
cargo miri run -- -Zmiri-disable-stacked-borrows
|
||||
cargo miri test -- -- test-suite-filter
|
||||
"#;
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue