Repository navigation
Support individual files for clippy tests #104200
Description
Activity
- addedA-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcT-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
on Nov 9, 2022 FTR this is also badly documented in clippy itself. You can't find it in the contributor instructions for example. It's also not printed by compiletest when it says "if you want to re-run the test do X" (that gives you a wrong command).
@est31 you should report that on the clippy repo.
@jyn514 fair. Done: rust-lang/rust-clippy#9825
- addedE-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.Call for participation: Medium difficulty. Experience needed to fix: Intermediate.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
on Nov 17, 2022 @rustbot claim
Reacted by jynTriage: clippy no longer uses compiletest (it uses
ui_testnow I think), but still usesTESTNAME.Clippy is a special snowflake and uses
TESTNAMEto tell it how to run individual tests instead of an argument to compiletest. Currently the only way to run individual tests is withTESTNAME=ice-6250 x test src/tools/clippy --bless. We should supportx test src/tools/clippy/tests/ice-6250.rsas well.#103266 will help simplify this a little by supporting the same test arguments as in-tree compiletest, but it won't solve suite paths automatically. Suite code lives around
51de238/src/bootstrap/builder.rs#L480 - maybe we need to changeimpl Step for Clippyto usesuite_path?IIRC
suite_pathis only really meant for compiletest, and this might be tricky because clippy isn't using compiletest.- addedE-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.Call for participation: Hard difficulty. Experience needed to fix: A lot.and removedE-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.Call for participation: Medium difficulty. Experience needed to fix: Intermediate.
on Feb 22, 2025 @rustbot claim
@rustbot claim
- added a commit that references this issue
on May 25, 2025 - addedT-clippyRelevant to the Clippy team.Relevant to the Clippy team.and removed
on Oct 8, 2025
Clippy is a special snowflake and uses
TESTNAMEto tell it how to run individual tests instead of an argument to compiletest. Currently the only way to run individual tests is withTESTNAME=ice-6250 x test src/tools/clippy --bless. We should supportx test src/tools/clippy/tests/ice-6250.rsas well.#103266 will help simplify this a little by supporting the same test arguments as in-tree compiletest, but it won't solve suite paths automatically. Suite code lives around https://github.com/rust-lang/rust/blob/51de2387dc8b0871a7bbb58f0c73ea7ca1d339e4/src/bootstrap/builder.rs#L480 - maybe we need to change
impl Step for Clippyto usesuite_path?Originally posted by @jyn514 in #103636 (comment)