]> git.lizzy.rs Git - rust.git/commitdiff
add test suite filter example to README and 'cargo miri --help'
authorRalf Jung <post@ralfj.de>
Sun, 17 May 2020 08:08:45 +0000 (10:08 +0200)
committerRalf Jung <post@ralfj.de>
Sun, 17 May 2020 08:12:17 +0000 (10:12 +0200)
README.md
src/bin/cargo-miri.rs

index 02fbd6cdfacfa4d5987fe10cad9ac7eaf6423f6c..12fc6d22cf85de614b674e4b21d67edcf0b39305 100644 (file)
--- a/README.md
+++ b/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:
index b2e5238489f2f0d9587d636d43b055f0c5ba2d92..5dadd3f931db2441239e2bb3d932b224a37fabe8 100644 (file)
@@ -15,7 +15,7 @@
 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)
 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)]