-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Description
The option --filter testname
for running specific tests is documented in CONTRIBUTING.md and bootstrap/README.md.
There's one problem however, this option doesn't exist!
$ ../x.py test src/test/run-make --filter graphviz
Finished debug [unoptimized] target(s) in 0.0 secs
failed to parse options: Unrecognized option: 'filter'.
Usage: x.py test [options] [<args>...]
The correct invocation uses highly unobvious --test-args
instead of --filter
:
../x.py test src/test/run-make --test-args graphviz
I'd never guess it without some digging through the source code, it's very surprising to me that people somehow use rustbuild for some time but nobody still reported this.
Metadata
Metadata
Assignees
Labels
T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
petrochenkov commentedon Dec 10, 2016
It turns out
x.py test --help
mentions--test-args
, but it still doesn't tell what it does.durka commentedon Dec 10, 2016
x.py test --help
also says you can simply pass the filename of a specific test but it's not true. Documentation shouldn't be wishful thinking. Right now the only real docs of how to run x.py is IRC folklore, just like before.alexcrichton commentedon Dec 11, 2016
Ah I renamed
--filter
at the last minute to--test-args
and forgot to update the docs, should be an easy patch!@petrochenkov would you like to send a PR to update the docs?
Note that the
--test-args
argument acts the same was asrustdoc --test-args
, it just passes arguments to the test harness../x.py test src/test/run-pass/assert-*
doesn't run any tests #38342Auto merge of #38351 - sanxiyn:doc-test-args, r=alexcrichton