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

[compiletest-related cleanups 4/7] Make the distinction between root build directory vs test suite specific build directory in compiletest less confusing #136542

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

jieyouxu
Copy link
Member

@jieyouxu jieyouxu commented Feb 4, 2025

Caution

This PR is stacked on top of #136441, #136472 and #136474. This PR contains their commits, the prerequisite PRs must be merged first, then this PR will need to be rebased.

Reference for overall changes: #136437
Part 4 of 7 of the compiletest-related cleanups PR series.

Summary

  • Remove --build-base compiletest flag, and introduce --build-{root,test-suite-root} flags instead. --build-base previously actually is test suite specific build directory, not the root build/ directory.
  • Feed the root build directory directly from bootstrap to compiletest via --build-root instead of doing multiple layers of parent unwrapping1 based on the test suite specific build directory.
  • Remove a redundant to_path_buf().

r? bootstrap

Footnotes

  1. Please do not unwrap the parents.

@rustbot rustbot added A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Feb 4, 2025
…--stage-id`

Notably, this avoids having to do hacky string splitting based on
`--stage-id`.
Instead of only having `--src-base` and `src_base` which *actually*
refers to the directory containing the test suite and not the sources
root. More importantly, kill off `find_rust_src_root` when we can simply
pass that info from bootstrap.
…ic build dir

- Introduce and use `--build-{root,test-suite-root}` over
  `--build-base`.
- A few minor cleanups.
@jieyouxu
Copy link
Member Author

jieyouxu commented Feb 4, 2025

@rustbot blocked (on #136472 and #136474)

@rustbot rustbot added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc S-blocked Status: Blocked on something else such as an RFC or other implementation work. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants