diff options
| author | Martin Pool <mbp@sourcefrog.net> | 2025-06-20 13:18:05 -0700 |
|---|---|---|
| committer | Martin Pool <mbp@sourcefrog.net> | 2025-06-20 13:22:14 -0700 |
| commit | 4acf3baecda9c5080bcfdc1ebb4560fbb2a4567e (patch) | |
| tree | 0138ba21b223dd3956621fdede3c6dc83a4a998d /library/test/src | |
| parent | 9c4ff566babe632af5e30281a822d1ae9972873b (diff) | |
| download | rust-4acf3baecda9c5080bcfdc1ebb4560fbb2a4567e.tar.gz rust-4acf3baecda9c5080bcfdc1ebb4560fbb2a4567e.zip | |
libtest: expose --fail-fast
Diffstat (limited to 'library/test/src')
| -rw-r--r-- | library/test/src/cli.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/library/test/src/cli.rs b/library/test/src/cli.rs index 8840714a662..d19141b8c2c 100644 --- a/library/test/src/cli.rs +++ b/library/test/src/cli.rs @@ -57,6 +57,7 @@ fn optgroups() -> getopts::Options { .optflag("", "test", "Run tests and not benchmarks") .optflag("", "bench", "Run benchmarks instead of tests") .optflag("", "list", "List all tests and benchmarks") + .optflag("", "fail-fast", "Don't start new tests after the first failure") .optflag("h", "help", "Display this message") .optopt("", "logfile", "Write logs to the specified file (deprecated)", "PATH") .optflag( @@ -270,6 +271,7 @@ fn parse_opts_impl(matches: getopts::Matches) -> OptRes { let exact = matches.opt_present("exact"); let list = matches.opt_present("list"); let skip = matches.opt_strs("skip"); + let fail_fast = matches.opt_present("fail-fast"); let bench_benchmarks = matches.opt_present("bench"); let run_tests = !bench_benchmarks || matches.opt_present("test"); @@ -307,7 +309,7 @@ fn parse_opts_impl(matches: getopts::Matches) -> OptRes { skip, time_options, options, - fail_fast: false, + fail_fast, }; Ok(test_opts) |
