Rollup merge of #84779 - jyn514:cargotest-args, r=Mark-Simulacrum
Add support for --test-args to cargotest This allows running a single test without having to wait for all tests to complete. Closes https://github.com/rust-lang/rust/issues/77260.
This commit is contained in:
commit
2d496f46bf
2 changed files with 4 additions and 1 deletions
|
|
@ -183,6 +183,7 @@ impl Step for Cargotest {
|
|||
builder,
|
||||
cmd.arg(&cargo)
|
||||
.arg(&out_dir)
|
||||
.args(builder.config.cmd.test_args())
|
||||
.env("RUSTC", builder.rustc(compiler))
|
||||
.env("RUSTDOC", builder.rustdoc(compiler)),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -85,7 +85,9 @@ fn main() {
|
|||
let cargo = &Path::new(cargo);
|
||||
|
||||
for test in TEST_REPOS.iter().rev() {
|
||||
test_repo(cargo, out_dir, test);
|
||||
if args[3..].is_empty() || args[3..].iter().any(|s| s.contains(test.name)) {
|
||||
test_repo(cargo, out_dir, test);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue