Skip to content

test(cargo-oxide): keep an inherited CARGO_TARGET_DIR out of the configured-target test - #1633

Open
0z5a wants to merge 1 commit into
NVIDIA:mainfrom
0z5a:fix/cargo-oxide-test-target-dir-env
Open

0z5a wants to merge 1 commit into
NVIDIA:mainfrom
0z5a:fix/cargo-oxide-test-target-dir-env

Conversation

@0z5a

@0z5a 0z5a commented Oct 24, 2026

Copy link
Copy Markdown

Summary

commands::tests::cargo_json_selects_custom_bin_in_configured_target_dir checks that the binary lands under build.target-dir from the fixture's .cargo/config.toml. If the test process has CARGO_TARGET_DIR set, Cargo uses it instead, because the variable takes precedence over the config. The assertion then fails every time:

assertion failed: binary.components().any(|part| part.as_os_str() == "configured-target")

just check stops at this failure for anyone who sets CARGO_TARGET_DIR.

Changes

  • Remove CARGO_TARGET_DIR from the child cargo build in that test.

Testing

GH200 (aarch64), CARGO_TARGET_DIR set:

before: test result: FAILED. 0 passed; 1 failed; … 282 filtered out
after:  test result: ok. 1 passed; 0 failed; … 282 filtered out

Checklist

  • All commits signed off (git commit -s)
  • SPDX headers on new source files -- no new files

…igured-target test

cargo_json_selects_custom_bin_in_configured_target_dir checks that the
binary lands under build.target-dir from .cargo/config.toml. When the
test process has CARGO_TARGET_DIR set (a common local and CI setting),
Cargo uses that instead and the assertion fails. Remove the variable for
the child build.

Signed-off-by: 0z5a <dezhen.lu@student.uni-tuebingen.de>
@0z5a
0z5a requested a review from nihalpasham as a code owner October 24, 2026 18:37
@copy-pr-bot

copy-pr-bot Bot commented Oct 24, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

This branch has not been deployed

No deployments
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.

1 participant