-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Create a tool which suggests tests to run based on modified files #97339
Copy link
Copy link
Open
Labels
A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustArea: Makes things more difficult for new or seasoned contributors to RustA-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcE-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.E-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.
Metadata
Metadata
Assignees
Labels
A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustArea: Makes things more difficult for new or seasoned contributors to RustA-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcE-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.E-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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
@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:
x test --stage 0 tidy library/stdx check && x test --stage 0 tidy compiler/rustc_data_structures && x test --stage 1 src/test/ui src/test/run-makesrc/librustdoc/src/lib.rs=>x test --stage 1 tidy rustdocYou 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-testsor 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.