reconsider "the way to run a crate's unit tests is x test <crate>
"
#140478
Labels
C-bug
Category: This is a bug.
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Summary
@ChrisDenton brought up to me the following thorny problem:
Say you are a libs contributor working on std. Right now, to run all relevant tests, the command you need is something like
x test library tests/ui/std rustdoc-js-std
. This is verbose and a little unreasonable to expect people to remember.We would like to add an alias for this;
x test std-tests
could work. But nowx test std
does something people don't expect (only runs a subset of the std tests). If we changex test std
to meanx test std-tests
, then now we have an inconsistency betweenx test core
, which only runs crate tests, andx test std
, which means "run a superset of crate tests".When I added unit tests in #95503, I wasn't really thinking about "run all the tests for an area", because we didn't have any equivalent of
std-tests
, then or now. But now that I've added it, the naming conflict is unfortunate. Maybe we should reconsider the naming here, and have the way to run unit tests for a crate bex test std-unit
or something like that? Or only do this for library crates, and havex test rustc_resolve
continue to mean "run the unit tests for rustc_resolve"? It could be nice to havex test rustc_resolve
also implyx test tests/ui/resolve
, though.Command used
Expected behaviour
Actual behaviour
Bootstrap configuration (bootstrap.toml)
see above
Operating system
ubuntu 22.04, but this is a problem on all OSes
HEAD
a114bcf
The text was updated successfully, but these errors were encountered: