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

Create a tool which suggests tests to run based on modified files #97339

Open
jyn514 opened this issue May 24, 2022 · 4 comments
Open

Create a tool which suggests tests to run based on modified files #97339

jyn514 opened this issue May 24, 2022 · 4 comments
Assignees
Labels
A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself A-testsuite Area: The testsuite used to check the correctness of rustc E-help-wanted Call for participation: Help is requested to fix this issue. 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.

Comments

@jyn514
Copy link
Member

jyn514 commented May 24, 2022

@digama0 came up with an excellent idea: it should be possible to, given the files modified since your git checkout last branched from master, generate suggestions for the tests you should run (i.e. those most likely to fail because of your changes). Some examples:

  • library/std/src/lib.rs => x test --stage 0 tidy library/std
  • compiler/rustc_data_structures => x check && x test --stage 0 tidy compiler/rustc_data_structures && x test --stage 1 src/test/ui src/test/run-make
  • src/librustdoc/src/lib.rs => x test --stage 1 tidy rustdoc

You can determine the files modified with git diff --name-only $(git merge-base HEAD origin/master).

This tool doesn't necessarily need to live in tree - it could just be some crate in a public git repo that people install, and we can move it in-tree later if it's useful. I was imagining it could be called suggest-tests or something like that.

@rustbot label +E-medium +E-mentor +E-help-wanted +A-testsuite +A-contributor-roadblock

This issue has been assigned to @Ezrashaw via this comment.

@rustbot rustbot added A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself A-testsuite Area: The testsuite used to check the correctness of rustc E-help-wanted Call for participation: Help is requested to fix this issue. 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 May 24, 2022
@lionellloh
Copy link
Contributor

@rustbot claim

@jyn514
Copy link
Member Author

jyn514 commented Jul 13, 2022

@the8472 had a really great idea: we can also use this to determine what tests to run this in PR CI, so you can get feedback faster without waiting for the PR to be approved.

@jyn514
Copy link
Member Author

jyn514 commented Dec 1, 2022

@lionellloh it's been a while - have you had a chance to work on this? do you know how to make progress?

@Nilstrieb
Copy link
Member

@rustbot assign @Ezrashaw

@rustbot rustbot self-assigned this Jan 19, 2023
JohnTitor added a commit to JohnTitor/rust that referenced this issue Apr 11, 2023
Create "suggested tests" tool in `rustbuild`

Not the claimed person in rust-lang#97339 but:
I've done a very rough implementation of this feature in-tree. I'm very new to `rustc` development (outside of docs) so some help would be greatly appreciated. The UI of this new subcommand obviously will change and I need some mentoring with the `--run` flag.

r? `@jyn514`
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this issue Apr 11, 2023
Create "suggested tests" tool in `rustbuild`

Not the claimed person in rust-lang#97339 but:
I've done a very rough implementation of this feature in-tree. I'm very new to `rustc` development (outside of docs) so some help would be greatly appreciated. The UI of this new subcommand obviously will change and I need some mentoring with the `--run` flag.

r? ``@jyn514``
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this issue Apr 13, 2023
…14,albertlarsan68

Create "suggested tests" tool in `rustbuild`

Not the claimed person in rust-lang#97339 but:
I've done a very rough implementation of this feature in-tree. I'm very new to `rustc` development (outside of docs) so some help would be greatly appreciated. The UI of this new subcommand obviously will change and I need some mentoring with the `--run` flag.

r? `@jyn514`
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this issue Apr 14, 2023
…14,albertlarsan68

Create "suggested tests" tool in `rustbuild`

Not the claimed person in rust-lang#97339 but:
I've done a very rough implementation of this feature in-tree. I'm very new to `rustc` development (outside of docs) so some help would be greatly appreciated. The UI of this new subcommand obviously will change and I need some mentoring with the `--run` flag.

r? ``@jyn514``
JohnTitor added a commit to JohnTitor/rust that referenced this issue Apr 14, 2023
…14,albertlarsan68

Create "suggested tests" tool in `rustbuild`

Not the claimed person in rust-lang#97339 but:
I've done a very rough implementation of this feature in-tree. I'm very new to `rustc` development (outside of docs) so some help would be greatly appreciated. The UI of this new subcommand obviously will change and I need some mentoring with the `--run` flag.

r? ```@jyn514```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself A-testsuite Area: The testsuite used to check the correctness of rustc E-help-wanted Call for participation: Help is requested to fix this issue. 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.
Projects
None yet
Development

No branches or pull requests

4 participants