Skip to content

Comments

Fix the compile-test tests when setting Cargo's build.build-dir setting to a path that's distinct from target-dir#16568

Merged
samueltardieu merged 1 commit intorust-lang:masterfrom
jakubadamw:issue-16567
Feb 14, 2026
Merged

Fix the compile-test tests when setting Cargo's build.build-dir setting to a path that's distinct from target-dir#16568
samueltardieu merged 1 commit intorust-lang:masterfrom
jakubadamw:issue-16567

Conversation

@jakubadamw
Copy link
Contributor

@jakubadamw jakubadamw commented Feb 14, 2026

Fixes #16567.

Fix the compile-test tests when Cargo's build.build-dir is set to a path that's distinct from target-dir. Right now, the uitest harness assumes that clippy-driver (a final build artifact) is located in the parent directory of compile_test-… (an intermediate artifact or, rather, a dependency's final artifact), and that doesn't hold when build-dir is configured independently from target-dir, like so (in ~/.cargo/config.toml):

[build]
build-dir = "{cargo-cache-home}/build-artifacts/{workspace-path-hash}"

changelog: none

…ting to a path that's distinct from `target-dir`.
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Feb 14, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 14, 2026

r? @dswij

rustbot has assigned @dswij.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: 7 candidates
  • 7 candidates expanded to 7 candidates
  • Random selection from Jarcho, dswij, llogiq, samueltardieu

@samueltardieu
Copy link
Member

There will be other problems if build.build-dir is located under Clippy's top-level directory (formatting tests will fail), but that is unrelated to this issue.

@samueltardieu samueltardieu added this pull request to the merge queue Feb 14, 2026
Merged via the queue into rust-lang:master with commit 18a4108 Feb 14, 2026
14 of 16 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Feb 14, 2026
@samueltardieu
Copy link
Member

This change causes an issue when testing Clippy as part of rustc, as the driver is not located under $TARGET_DIR/$PROFILE, see rust-lang/rust#152862. We'll probably have to revert it.

@jakubadamw
Copy link
Contributor Author

jakubadamw commented Feb 23, 2026

@samueltardieu, oops, I am sorry about that! I'll try to look into a better fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

compile-test tests fail to run when using a custom build-dir

4 participants