Use set on Windows, not export#116745
Conversation
set on Windows, not `export'set on Windows, not export
There was a problem hiding this comment.
Pull Request Overview
This PR addresses an issue from runtime logs by correcting the command used for setting environment variables on Windows.
- Replace condition from using "$(TargetOS)" to using "$(OS)" for proper Windows detection.
- Update both Windows and non-Windows branches to ensure the appropriate command ("set" for Windows, "export" for others) is used.
Comments suppressed due to low confidence (2)
eng/testing/xunit/xunit.console.targets:16
- Ensure that the $(OS) variable is consistently set in all expected environments; if there is any risk it might be missing in some CI configurations, consider adding a fallback or additional documentation.
<SetScriptCommands Condition="'$(OS)' == 'Windows_NT'" Include="set XUNIT_HIDE_PASSING_OUTPUT_DIAGNOSTICS=1" />
eng/testing/xunit/xunit.console.targets:17
- Verify that using the $(OS) condition for non-Windows environments reliably covers all target platforms, and document any assumptions if necessary.
<SetScriptCommands Condition="'$(OS)' != 'Windows_NT'" Include="export XUNIT_HIDE_PASSING_OUTPUT_DIAGNOSTICS=1" />
|
This keeps getting flipped back and forth https://github.com/dotnet/runtime/pull/107349/files |
We can wait for @pavelsavara but looking in the binlog, the check for |
maraf
left a comment
There was a problem hiding this comment.
We have non trivial amount placed where we set envvars like this. We have to always duplicate the lines. Could we do better?
Wasm.Build.Tests use |
For this particular case (envvar setting) we could have not yet sure where to set the 1st part, to be early enough for all the test cases. Edit: runtime/eng/testing/tests.props Line 30 in 3c5f74a for WindowsShell in helix-related actions and for TestWrapperTargetsWindows in helix&arcade.
|
|
Tagging subscribers to this area: @akoeplinger, @matouskozak, @simonrozsival |
I don't claim I understand any of that. |
|
this is blocked by library failures |
|
@maraf, continuing our offline discussion, the optimization was mostly done, I added it in a few more places where
|
|
Something interesting happened to the build. It did finish: |




Found in library logs: #116695 (comment).
log
TargetOSisbrowserand command form should not depend on it. The change removes the error from logs.