Skip to content

fix(test): fix rustup-init binary detection in fixture - #5211

Merged
rami3l merged 2 commits into
rust-lang:mainfrom
rami3l:fix/fixture-new-cargo
Nov 13, 2026
Merged

rami3l merged 2 commits into
rust-lang:mainfrom
rami3l:fix/fixture-new-cargo

Conversation

@rami3l

@rami3l rami3l commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Addresses #5210 (comment).

Problem Description

Cargo shipped in Rust v1.100.0 has broken our test fixture (but in a good way), as the artifact directory is now hashed like so:

./target/<triple>/debug/build/rustup/<hash>/out/

... this causes the existing logic to lose track of where rustup-init[EXE] should be for the tests going on.

Proposed Solution

This patch uses the CARGO_BIN_EXE_rustup-init environment variable to detect the location of the rustup-init binary used in the fixture, which is a more stable approach than the current dirname exclusion-based one. It works consistently with both Rust v1.100.0 and earlier versions.

Future Work

Since the artifact directory is now hashed, I don't think it makes any more sense to store the temporary (mock) Rust installations alongside the artifacts. So I am thinking about maybe putting them into the OS' tmp dir instead, hoping to further reduce the size of ./target this way. This optimization can be done in a later patch.

@rami3l
rami3l force-pushed the fix/fixture-new-cargo branch from 9962032 to ef6eb5a Compare November 13, 2026 10:38
@rami3l
rami3l marked this pull request as ready for review November 13, 2026 10:52
@rami3l
rami3l added this pull request to the merge queue Nov 13, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 13, 2026
@rami3l
rami3l added this pull request to the merge queue Nov 13, 2026
Merged via the queue into rust-lang:main with commit cdba254 Nov 13, 2026
29 checks passed
@rami3l
rami3l deleted the fix/fixture-new-cargo branch November 13, 2026 15:39
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.

2 participants