Skip to content

rustbuild: Unrecognized option: 'filter' #38275

@petrochenkov

Description

@petrochenkov
Contributor

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.

Activity

petrochenkov

petrochenkov commented on Dec 10, 2016

@petrochenkov
ContributorAuthor

It turns out x.py test --help mentions --test-args, but it still doesn't tell what it does.

durka

durka commented on Dec 10, 2016

@durka
Contributor

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.

added
T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
on Dec 11, 2016
alexcrichton

alexcrichton commented on Dec 11, 2016

@alexcrichton
Member

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 as rustdoc --test-args, it just passes arguments to the test harness.

added a commit that references this issue on Dec 14, 2016
4cda3b6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @durka@alexcrichton@petrochenkov

        Issue actions

          rustbuild: Unrecognized option: 'filter' · Issue #38275 · rust-lang/rust