Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support individual files for clippy tests #104200

Open
jyn514 opened this issue Nov 9, 2022 · 4 comments
Open

Support individual files for clippy tests #104200

jyn514 opened this issue Nov 9, 2022 · 4 comments
Assignees
Labels
A-clippy Area: Clippy A-testsuite Area: The testsuite used to check the correctness of rustc E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@jyn514
Copy link
Member

jyn514 commented Nov 9, 2022

Clippy is a special snowflake and uses TESTNAME to tell it how to run individual tests instead of an argument to compiletest. Currently the only way to run individual tests is with TESTNAME=ice-6250 x test src/tools/clippy --bless. We should support x test src/tools/clippy/tests/ice-6250.rs as 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 Clippy to use suite_path?

Originally posted by @jyn514 in #103636 (comment)

@jyn514 jyn514 added A-testsuite Area: The testsuite used to check the correctness of rustc T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) A-clippy Area: Clippy labels Nov 9, 2022
@est31
Copy link
Member

est31 commented Nov 10, 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).

@jyn514
Copy link
Member Author

jyn514 commented Nov 10, 2022

@est31 you should report that on the clippy repo.

@est31
Copy link
Member

est31 commented Nov 10, 2022

@jyn514 fair. Done: rust-lang/rust-clippy#9825

@jyn514 jyn514 added E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. labels Nov 17, 2022
@reez12g
Copy link
Contributor

reez12g commented Jan 3, 2023

@rustbot claim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-clippy Area: Clippy A-testsuite Area: The testsuite used to check the correctness of rustc E-medium Call for participation: Medium difficulty. Experience needed to fix: Intermediate. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

No branches or pull requests

3 participants