Enable out-of-process tests for CoreCLR browser WASM#131110
Draft
radekdoulik wants to merge 1 commit into
Draft
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 44f4b4ea-409c-4a52-89a0-f488a89488b9
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the CoreCLR browser-WASM test execution pipeline to support “out-of-process” (process-isolated) tests by adding a plan+execute orchestration flow: the merged managed runner can emit an OOP plan, host-side scripts run the existing per-test wrappers in fresh processes, and the merged runner then imports the precomputed wrapper results during the main test run.
Changes:
- Add a build-time marker file (
*.HasOutOfProcessTests) for CoreCLR browser merged runners that have OOP tests. - Update the merged runner codegen to support a “planning mode” (write OOP assembly paths instead of executing) and to route OOP tests through a precomputed-result import path on Browser.
- Update browser Windows (
.cmd) and Unix (.sh) execution scripts to run the plan phase, execute OOP wrappers, write versioned result files with a per-run token, then run the merged runner to import results.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/tests/Common/XUnitWrapperGenerator/XUnitWrapperGenerator.props | Writes a HasOutOfProcessTests marker for CoreCLR+browser merged runners that contain OOP tests. |
| src/tests/Common/XUnitWrapperGenerator/XUnitWrapperGenerator.cs | Emits new generated-runner behavior: per-test executors with an optional plan-writer parameter; planning mode for OOP selection; Browser guard when orchestration is missing. |
| src/tests/Common/XUnitWrapperGenerator/ITestInfo.cs | Adds plan-writing support to the reporting wrapper; exposes OOP assembly path for plan emission. |
| src/tests/Common/CoreCLRTestLibrary/OutOfProcessTest.cs | Adds env-var plumbing and precomputed-result import so Browser can “run” OOP tests without forking. |
| src/tests/Common/CLRTest.Execute.Batch.targets | Adds Windows browser orchestration: plan phase, wrapper execution, result-file generation, then merged runner import phase. |
| src/tests/Common/CLRTest.Execute.Bash.targets | Adds Unix browser orchestration mirroring the batch logic: plan, run wrappers, write result files, then run merged runner to import. |
|
|
||
| private CodeBuilder _executionStatement { get; } | ||
| private string RelativeAssemblyPath { get; } | ||
| public string RelativeAssemblyPath { get; } |
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.
Summary
RequiresProcessIsolationtests using the existing filter and stripe logic.forksupport and Node-specific process APIs.Design
The browser runner executes three phases:
Existing wrappers remain responsible for test-specific environment variables, pre/post commands, expected exit codes, and per-child timeouts. Missing plans, wrappers, results, malformed records, or stale result tokens fail closed.
Validation
reflectionbrowser OOP runner after the shell robustness fixes.GC.GCmerged runner exceeded its aggregate timeout before producing its final report.Draft follow-up work
This PR is intentionally a base for incremental follow-up work:
InterpreterTesterto launch its child through this host-side path.Note
This pull request description was created with GitHub Copilot.