Skip to content

./x.py test should be able to run individual tests #48483

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

Closed
Manishearth opened this issue Feb 23, 2018 · 5 comments
Closed

./x.py test should be able to run individual tests #48483

Manishearth opened this issue Feb 23, 2018 · 5 comments
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@Manishearth
Copy link
Member

Currently to run an individual test, you have to run ./x.py test src/test/run-pass --test-args foo.rs. This isn't very obvious; it would be nice if src/test was special cased such that ./x.py test ./x.py test src/test/run-pass/foo.rs works

Relevant code: https://github.com/rust-lang/rust/blob/master/src/bootstrap/test.rs

@Manishearth Manishearth added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. A-testsuite Area: The testsuite used to check the correctness of rustc labels Feb 23, 2018
@Mark-Simulacrum
Copy link
Member

I agree that it'd be nice, but I think this would require some refactoring in compiletest as well -- currently it only accepts filters by test name (which we could sort of do, but it'd be imprecise) but not quite more than that.

@Manishearth
Copy link
Member Author

For the scope of this bug we can just transform test src/test/run-pass/foo.rs into test src/test/run-pass --test-args foo.rs. This may match multiple tests, but it's close enough. Adding a specific argument for this to compiletest would be the next step.

@pvdrz
Copy link
Contributor

pvdrz commented Feb 24, 2018

I'd like to take care of this

@pvdrz
Copy link
Contributor

pvdrz commented Mar 9, 2018

Sorry, I haven't been able to work on this. If anyone else wants to take it, feel free to do it

@collin5
Copy link
Contributor

collin5 commented Apr 3, 2018

@christianpoveda No problem. Will give this a try as my first contribution.

bors added a commit that referenced this issue May 10, 2018
./x.py test should be able to run individual tests

Allows user to be able to run individual tests by specifying filename i.e `./x.py test src/test/run-pass/foo.rs`

Fixes #48483
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

4 participants