Skip to content

compiletest interprets subdirectory for tests as filter instead #120300

Open
@klensy

Description

@klensy

While working on #120273, i used python x.py --stage=1 t tests/ui/borrowck/ --force-rerun to run some subset of tests instead of full suite, as described in https://rustc-dev-guide.rust-lang.org/tests/running.html#running-a-subset-of-the-test-suites:

If you only need to test a specific subdirectory of tests for any given test suite,
 you can pass that directory to ./x test:

./x test tests/ui/const-generics

and expected to run test only in tests/ui/borrowck/ folder,
but instead noticed that this actually tested not subdirectory tests/ui/borrowck/, but any test with borrowck in path, like

tests/ui/borrowck/borrowck-mut-addr-of-imm-var.rs
tests/ui/pattern/bindings-after-at/borrowck-pat-by-copy-bindings-in-at.rs
tests/ui/span/borrowck-ref-into-rvalue.rs

Or maybe bootstrap parses input for compiletest wrong?

@rustbot label +A-testsuite

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-compiletestArea: The compiletest test runnerA-testsuiteArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.E-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions