Skip to content

Conversation

@gurry
Copy link
Contributor

@gurry gurry commented Feb 10, 2026

Fixes #606

Earlier we removed all the rustup and cargo related env vars before invoking cargo wdk build in tests to prevent them from influencing latter's behaviour. However, it caused some tests to fail in situations where rustup or cargo are installed at non-standard paths. So in this PR we skip removing CARGO_HOME and RUSTUP_HOME.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adjusts the cargo-wdk integration test harness to avoid stripping rustup/cargo-related environment variables, fixing local test failures when rustup is installed in a non-default location (Issue #606).

Changes:

  • Replace broad env-var sanitization (CARGO*/RUST*) with targeted PATH sanitization.
  • Stop removing .rustup/toolchain-related entries from PATH.
  • Rename sanitize_env_vars to sanitize_path and update its intent/docs accordingly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gurry gurry marked this pull request as draft February 10, 2026 10:18
Copilot AI review requested due to automatic review settings February 10, 2026 10:28
@gurry gurry force-pushed the 606-custom-rustup-location-issue branch from 48d1346 to 9fc7af5 Compare February 10, 2026 10:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings February 10, 2026 11:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gurry gurry force-pushed the 606-custom-rustup-location-issue branch from d25a3b0 to c9b6ce9 Compare February 10, 2026 11:15
Copilot AI review requested due to automatic review settings February 10, 2026 11:35
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gurry gurry force-pushed the 606-custom-rustup-location-issue branch from 4f55db9 to 492b728 Compare February 10, 2026 12:45
Copilot AI review requested due to automatic review settings February 10, 2026 13:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gurry gurry force-pushed the 606-custom-rustup-location-issue branch from c18fb46 to 9e6861c Compare February 11, 2026 08:32
Copilot AI review requested due to automatic review settings February 11, 2026 09:21
@gurry gurry force-pushed the 606-custom-rustup-location-issue branch from 9e6861c to b8b5677 Compare February 11, 2026 09:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Removing these variables may cause some tests to fail
when `rustup` or `cargo` is installed at non-standard paths
(issue microsoft#606).
@gurry gurry force-pushed the 606-custom-rustup-location-issue branch from b8b5677 to 355c931 Compare February 11, 2026 09:38
@gurry gurry changed the title fix: do not sanitize rustup & cargo envs fix: do not sanitize CARGO_HOME & RUSTUP_HOME Feb 11, 2026
@codecov-commenter
Copy link

codecov-commenter commented Feb 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.41%. Comparing base (4895c2d) to head (355c931).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #609   +/-   ##
=======================================
  Coverage   77.41%   77.41%           
=======================================
  Files          24       24           
  Lines        4853     4853           
  Branches     4853     4853           
=======================================
  Hits         3757     3757           
  Misses        979      979           
  Partials      117      117           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gurry gurry marked this pull request as ready for review February 11, 2026 11:06
Copilot AI review requested due to automatic review settings February 11, 2026 11:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gurry gurry enabled auto-merge February 12, 2026 05:41
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.

cargo test fails when RUSTUP_HOME is set to a non-default location

2 participants