Skip to content

Commit a75068a

Browse files
authored
Rollup merge of rust-lang#72527 - RalfJung:miri-clippy-test-args, r=Mark-Simulacrum
bootstrap: propagate test-args to miri and clippy test suites For Miri I verified this works. For clippy, unfortunately it doesn't seem to work as a stage 0 tool: ``` ./x.py --stage 0 test src/tools/clippy --test-args init ``` gives ``` Compiling clippy-mini-macro-test v0.2.0 (/home/r/src/rust/rustc.3/src/tools/clippy/mini-macro) error[E0658]: procedural macros cannot be expanded to expressions --> src/tools/clippy/mini-macro/src/lib.rs:11:5 | 11 | / quote!( 12 | | #[allow(unused)] 13 | | fn needless_take_by_value(s: String) { 14 | | println!("{}", s.len()); ... | 24 | | } 25 | | ) | |_____^ | = note: see issue rust-lang#54727 <rust-lang#54727> for more information = help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable Compiling proc-macro2 v1.0.3 Compiling syn v1.0.11 error: aborting due to previous error For more information about this error, try `rustc --explain E0658`. error: could not compile `clippy-mini-macro-test`. ``` But propagating `--test-args` to the test suite seems to make sense regardless. Cc @rust-lang/clippy
2 parents 95c4583 + 7a121ad commit a75068a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/bootstrap/test.rs

+4
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,8 @@ impl Step for Miri {
439439
cargo.env("RUSTC_LIB_PATH", builder.rustc_libdir(compiler));
440440
cargo.env("MIRI_PATH", miri);
441441

442+
cargo.arg("--").args(builder.config.cmd.test_args());
443+
442444
builder.add_rustc_lib_path(compiler, &mut cargo);
443445

444446
if !try_run(builder, &mut cargo.into()) {
@@ -545,6 +547,8 @@ impl Step for Clippy {
545547
// clippy tests need to find the driver
546548
cargo.env("CLIPPY_DRIVER_PATH", clippy);
547549

550+
cargo.arg("--").args(builder.config.cmd.test_args());
551+
548552
builder.add_rustc_lib_path(compiler, &mut cargo);
549553

550554
try_run(builder, &mut cargo.into());

0 commit comments

Comments
 (0)