Skip to content

Running ./x test compiler only runs unit tests for rustc_codegen_cranelift #134916

Closed
@Zalathar

Description

@Zalathar

In theory, this command should run cargo test for all of the compiler crates in compiler/:

# (stage 0 isn't essential, but it's faster than using a later stage)
./x test compiler --stage=0

Instead, it just prints this message and exits successfully:

cranelift not in rust.codegen-backends. skipping

This seems to be because test::CodegenCranelift::should_run registers compiler/rustc_codegen_cranelift as its path, which has the side-effect of hijacking compiler in bootstrap's wacky path-resolution logic. That prevents test::CrateLibrustc from running, which is what would run the unit tests for the vast majority of compiler crates.

The same problem is also theoretically present for test::CodegenGCC, though currently the cranelift step takes priority for whatever reason.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustC-bugCategory: This is a bug.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