Skip to content

Run unit tests by passing a file path #86421

Closed
@JohnTitor

Description

@JohnTitor

Currently, we have to invoke the following to run specific unit tests:

./x.py test compiler/rustc_data_structures/ --test-args thin_vec

This isn't straightforward, it'd be great if we could do with:

./x.py test compiler/rustc_data_structures/src/thin_vec/tests.rs

But unfortunately, it fails currently:

thread 'main' panicked at 'error: no rules matched compiler/rustc_data_structures/src/thin_vec/tests.rs', src/bootstrap/builder.rs:225:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

meta

This happens on b17d9c1.

(This was originally reported on rust-lang/rustc-dev-guide#1138)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: An issue proposing an enhancement or a PR with one.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

    Issue actions