You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TESTNAME is currently underdocumented. It is mentioned in the book but the book is very long and it explains stuff like how to use git and stuff. For me, as someone coming from rustc, who was accustomed to x.py test path/to/test working, TESTNAME was quite non-obvious. It's also not suggested when compiletest prints that a test has failed:
To only update this specific test, also pass `--test-args manual_let_else.rs`
If you try that flag you get:
$ cargo uitest --test-args manual_let_else.rs
error: Found argument '--test-args' which wasn't expected, or isn't valid in this context
And:
$ cargo uitest -- --test-args manual_let_else.rs
Finished test [unoptimized + debuginfo] target(s) in 0.18s
Running tests/compile-test.rs (target/debug/deps/compile_test-a3c7e3c02f9d451b)
error: Unrecognized option: 'test-args'
error: test failed, to rerun pass `--test compile-test`
In #8437 , I ended up running all tests each time which wasted a lot of time. I think a mention of TESTNAME definitely belongs into CONTRIBUTING.md.
[...]
Since Clippy's test suite is pretty big, there are some commands that only run a subset of Clippy's tests:
# only run UI tests
cargo uitest
# only run UI tests starting with `test_`
TESTNAME="test_" cargo uitest
# only run dogfood tests
cargo dev dogfood
[...]
CONTRIBUTING.md redirects you to basics.md before telling you to test the lint.
Find something to fix/improve
Change code (likely some file in clippy_lints/src/)
Follow the instructions in the Basics docs to get set up
Run cargo test in the root directory and wiggle code until it passes
Open a PR (also can be done after 2. if you run into problems)
Is TESTNAME=... underdocumented? Maybe, the documentation wants you to read basics.md before adding the lint, and then visiting the book (Which also talks about TESTNAME) to learn how to add the lint. It is normal that a big project asks you to learn how that project works.
Our documentation has sadly become a bit chaotic over the time. We have some people working on restructuring it and rewriting parts, but it'll probably still take a bit longer due to time limitations. I'll keep this in mind when we update this part of the documentation :)
TESTNAME
is currently underdocumented. It is mentioned in the book but the book is very long and it explains stuff like how to use git and stuff. For me, as someone coming from rustc, who was accustomed tox.py test path/to/test
working,TESTNAME
was quite non-obvious. It's also not suggested when compiletest prints that a test has failed:If you try that flag you get:
And:
In #8437 , I ended up running all tests each time which wasted a lot of time. I think a mention of
TESTNAME
definitely belongs intoCONTRIBUTING.md
.cc rust-lang/rust#104200
The text was updated successfully, but these errors were encountered: