Skip to content

Conversation

@jjonescz
Copy link
Member

@jjonescz jjonescz commented Nov 6, 2025

Fixes failing "single machine" leg in main (which doesn't run on PRs). This broke with #80859.

The fix is to control the DOTNET_HOST_PATH env var in the tests because it can affect their behavior if set from the outside.
And normalizing paths so they can be compared (there is a subst alias used in the single machine legs).

Reusing a helper for setting env vars which Copilot found for me in another test class.

@jjonescz jjonescz marked this pull request as ready for review November 10, 2025 12:16
@jjonescz jjonescz requested a review from a team as a code owner November 10, 2025 12:16
@jjonescz
Copy link
Member Author

@dotnet/roslyn-compiler for reviews; this fixes a test class that is failing in main CI (in a leg which doesn't run in PRs though)

catch (Exception ex)
{
Environment.SetEnvironmentVariable("PATH", previousPath);
// If resolution fails, use the original path
Copy link
Member

Choose a reason for hiding this comment

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

if things fail... should we just fail entirely? unclear why we're falling back in that case.

Copy link
Member Author

Choose a reason for hiding this comment

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

You're right, I think we could just fail considering this is a test; thanks.

@jjonescz jjonescz enabled auto-merge (squash) November 11, 2025 13:53
@jjonescz jjonescz merged commit a065eae into dotnet:main Nov 11, 2025
24 of 25 checks passed
@jjonescz jjonescz deleted the RuntimeHostInfoTests branch November 11, 2025 13:59
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants