[wasm][coreclr] Make run.cmd work with wasm arch#124795
Open
radekdoulik wants to merge 1 commit intodotnet:mainfrom
Open
[wasm][coreclr] Make run.cmd work with wasm arch#124795radekdoulik wants to merge 1 commit intodotnet:mainfrom
radekdoulik wants to merge 1 commit intodotnet:mainfrom
Conversation
Contributor
|
Tagging subscribers to this area: @agocke, @dotnet/runtime-infrastructure |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enables run.cmd (Windows test runner script) to work correctly with the wasm architecture by fixing platform detection logic. The changes distinguish between the build machine OS (where scripts run) and the target OS (what the tests target), which is essential for cross-compilation scenarios like WASM.
Changes:
- Fixed platform detection in
run.pyto usesys.platforminstead ofargs.host_osfor determining file extensions and script types - Added
wasmarchitecture support torun.cmdwith proper defaults (HostOS=browser, RunWithNodeJS=1) - Fixed MSBuild condition in
tests.targetsto use build machine OS instead of target OS forchmodcommands
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/tests/run.py | Changed from args.host_os to sys.platform for determining Windows-specific file extensions (.exe, .cmd, .bat) since these depend on the build machine, not target OS |
| src/tests/run.cmd | Added wasm architecture support with automatic HostOS=browser default and RunWithNodeJS flag, mirroring existing run.sh behavior |
| src/tests/Common/tests.targets | Changed from TargetOS to OS MSBuild property for chmod condition to properly detect build machine OS |
jkoritzinsky
approved these changes
Feb 24, 2026
| # For some reason, out-of-process tests on Linux are named with ".cmd" wrapper script names, | ||
| # not .sh extension names. Fix that before trying to find the test filename. | ||
| if host_os != "windows": | ||
| if sys.platform != "win32": |
Member
There was a problem hiding this comment.
I understand this is for consistency, but these two options (before and after) should be equivalent.
This was referenced Feb 24, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.