Skip to content

Conversation

@Zalathar
Copy link
Contributor

Modifying TestCx::testpaths makes it vastly harder to reason about how compiletest is using test paths, and can be avoided without much trouble by simply passing explicit source-file paths into a small number of auxiliary-aware methods.


This PR was originally based on a much larger change that split TestPaths into multiple structs and multiple TestCx fields (as seen in early revisions of #148160), but after further cleanups it turned out that very few tweaks were actually needed to avoid changes to testpaths.

r? jieyouxu

There are probably plenty of tests that will check this incidentally, but it's
convenient to have a dedicated self-test.
In particular, this eliminates the cryptic `of: &TestPaths` parameters.
This method no longer returns a `TestPaths`, so the old name is no longer
appropriate.
@rustbot
Copy link
Collaborator

rustbot commented Oct 28, 2025

Some changes occurred in src/tools/compiletest

cc @jieyouxu

@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) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 28, 2025
@Zalathar
Copy link
Contributor Author

Something very similar to this PR already had a number of successful try jobs at #148160 (comment).

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-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) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants