Fix the compile-test tests for build.build-dir that's distinct from target-dir#16626
Open
jakubadamw wants to merge 1 commit intorust-lang:masterfrom
Open
Fix the compile-test tests for build.build-dir that's distinct from target-dir#16626jakubadamw wants to merge 1 commit intorust-lang:masterfrom
build.build-dir that's distinct from target-dir#16626jakubadamw wants to merge 1 commit intorust-lang:masterfrom
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
build.build-dir setting to a path that's distinct from target-dirbuild.build-dir that's distinct from target-dir
1c79ab5 to
fe9a727
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
samueltardieu
approved these changes
Feb 24, 2026
…ting to a path that's distinct from `target-dir` In this approach, we're using the `CARGO_BIN_EXE_clippy-driver` env var, which is set to the appropriate absolute path, invariant across the various possible `target-dir` and `build.build-dir` configurations. Do the same for `CARGO_CLIPPY_PATH` in tests/test_utils/mod.rs.
fe9a727 to
9455441
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second attempt after the previous revert in #16623.
Fixes #16567.
This time I'm using an env var of the
CARGO_BIN_EXE_*class, to determine the correct path to theclippy-driverexecutable. This is a simpler change that, conveniently enough, also fixes the build within rust-lang/rust. I verified that it does.Also, extend the fix to
CARGO_CLIPPY_PATHin tests/test_utils, which also fixes the dogfood tests in environments with a custombuild.build-dir.Over all, this fixes the compile-test tests and dogfood tests, which presently don't run when Cargo's
build.build-diris set to a path that's distinct fromtarget-dir. Right now, the uitest harness assumes thatclippy-driver(a final build artifact) is located in the parent directory ofcompile_test-…(an intermediate artifact or, rather, a dependency's final artifact), and that doesn't hold whenbuild-diris configured independently fromtarget-dir, like so (in ~/.cargo/config.toml):changelog: none
r? @samueltardieu