Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking issue for bootstrap test step cleanups #137178

Open
7 tasks
jieyouxu opened this issue Feb 17, 2025 · 1 comment
Open
7 tasks

Tracking issue for bootstrap test step cleanups #137178

jieyouxu opened this issue Feb 17, 2025 · 1 comment
Assignees
Labels
A-test-infra Area: test infrastructure (may span bootstrap/compiletest/more) A-testsuite Area: The testsuite used to check the correctness of rustc C-cleanup Category: PRs that clean code up or issues documenting cleanup. C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@jieyouxu
Copy link
Member

jieyouxu commented Feb 17, 2025

This is a tracking issue for efforts related to some cleanups for bootstrap's test steps (related to ./x test). I intend to use this issue to track possible cleanups/follow-ups related to trying to break up test.rs into smaller modules by test kind #135072 and improving test step naming, and will be updated as we go.

Phase 1: Improve the logical organization of test steps

This phase is focused around to break up the huge test.rs file into more logically organized modules. This is to (1) lower cognitive load when trying to figure out what test steps do, and (2) make it easier to fix existing test steps / add new test steps, by grouping similar test steps together (and localizing helpers / macros).

Possible cleanups/improvements noticed

  • Split the tidy test step into two logical steps (Steps A, B).
    • Step A: this step runs tidy rules and enforces them on the source tree.
    • Step B: this step runs tidy self-tests (this involves an alias hack tidyselftest to remap ./x test tidy to run tidy, not tidy's self-tests).
    • Note that current step impl merges the two roles together into one step.
  • CrateBootstrap is confusingly named (esp. when Bootstrap is also a test step). It doesn't actually test bootstrap (that would be Bootstrap), it tests some tools used by bootstrap.
  • compiletest self-test step is named inconsistently as CompiletestTest (versus CrateXXX that other self-tests seem to use?).
  • Crate is confusingly named and implement: it's shared by compiler crate tests but also std crate stes?
  • TestFloatParse is one step that does two things (self test vs testing std float).

Phase 2: Improve consistency of test step naming

See discussion in https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Renaming.20test.20step.20structs.

Currently, there really isn't any logical naming scheme for bootstrap test steps, which makes it extra confusing because things are inconsistently named. We'd like to investigate if it's possible to rename test steps to better reflect their nature. This phase consist of mostly two steps:

  • 1. Figure out a sane naming scheme for test steps, possibly categorized via nature of test steps.
  • 2. Rename test steps and fix inconsistencies noticed while enforcing the naming scheme.
@jieyouxu jieyouxu added A-test-infra Area: test infrastructure (may span bootstrap/compiletest/more) A-testsuite Area: The testsuite used to check the correctness of rustc C-cleanup Category: PRs that clean code up or issues documenting cleanup. C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Feb 17, 2025
@jieyouxu jieyouxu self-assigned this Feb 17, 2025
@jieyouxu
Copy link
Member Author

Hm, it's really hard to come up with a clean organization for the test steps. Probably will need to first make some test steps "less special".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-test-infra Area: test infrastructure (may span bootstrap/compiletest/more) A-testsuite Area: The testsuite used to check the correctness of rustc C-cleanup Category: PRs that clean code up or issues documenting cleanup. C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

No branches or pull requests

1 participant