-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Make RuntimeHostInfoTests more robust #81080
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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
substalias used in the single machine legs).Reusing a helper for setting env vars which Copilot found for me in another test class.