Skip to content

[browser][coreCLR] enable System.Runtime.Tests on CI as Release build - #122980

Merged
pavelsavara merged 17 commits into
dotnet:mainfrom
pavelsavara:SystemRuntimeTests
Jan 12, 2026
Merged

[browser][coreCLR] enable System.Runtime.Tests on CI as Release build#122980
pavelsavara merged 17 commits into
dotnet:mainfrom
pavelsavara:SystemRuntimeTests

Conversation

@pavelsavara

@pavelsavarapavelsavara commented Jan 7, 2026

Copy link
Copy Markdown
Member

CoreCLR

WasmTestRunner

Emscripten build

  • fix JS minification problem with AJSDCE
  • make BrowserHost-Static private linking too
  • reduce EmccExportedRuntimeMethod and other exports

CI & MSBuild

  • switch runtime pipeline to Release
  • add wasm-coreclr-library-tests.yml
  • enable WasmTestLogExitCode, WasmTestAppendElementOnExit, WasmTestExitOnUnhandledError for library tests on CoreCLR
  • install chrome for CoreCLR tests
  • disabled IL trimming [browser][coreCLR] Fix IL trimming in publish #123030

System.Runtime.Tests

Fixes#120707
Fixes#123030

@pavelsavarapavelsavara changed the title [browser][coreCLR] enable System.Runtime.Tests on CI[browser][coreCLR] enable System.Runtime.Tests on CI as Release buildJan 8, 2026
Comment threadsrc/coreclr/vm/wasm/callhelpers-interp-to-managed.cpp
@pavelsavara
pavelsavara marked this pull request as ready for review January 9, 2026 12:47
CopilotAI review requested due to automatic review settings January 9, 2026 12:47

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This pull request enables System.Runtime.Tests on CI for browser/CoreCLR as a Release build, addressing multiple components to support this functionality.

Key changes include:

  • Adding missing function signatures in CoreCLR's interpreter-to-managed call helpers for browser/WASM
  • Implementing workarounds for test loading issues and access checks on WASM
  • Refactoring JavaScript/TypeScript code to reduce exported symbols and improve modularity by moving FS operations to a centralized location
  • Switching CI pipeline configuration from Debug to Release build
  • Disabling IL trimming temporarily for CoreCLR on WASM
  • Marking failing tests with ActiveIssue attributes to track them systematically

Reviewed changes

Copilot reviewed 43 out of 44 changed files in this pull request and generated 23 comments.

Show a summary per file
FileDescription
src/tasks/WasmAppBuilder/coreclr/ManagedToNativeGenerator.csAdds missing function signature cookies for interpreter-to-managed calls
src/native/rollup.config.defines.jsRemoves CI build check from isDebug condition to ensure proper debug configuration
src/native/libs/Common/JavaScript/types/emscripten.tsRemoves FS_createPath, FS_createDataFile, and addFunction from EmscriptenModule interface
src/native/libs/Common/JavaScript/ems-ambient/index.tsAdds FS object with createPath and createDataFile methods, removes maybeExit
src/native/corehost/browserhost/loader/dotnet.d.tsRemoves FS_createPath, FS_createDataFile, and addFunction from EmscriptenModule interface
src/native/corehost/browserhost/libBrowserHost.footer.jsAdds AJSDCE_Deps workaround for acorn-optimizer and reformats dependency list
src/native/corehost/browserhost/host/host.tsUpdates FS API calls to use ems.FS instead of ems.Module
src/native/corehost/browserhost/CMakeLists.txtChanges BrowserHost-Static from PUBLIC to PRIVATE linking and adds comment markers
src/mono/wasm/testassets/WasmBrowserRunMainOnly/WasmBrowserRunMainOnly.csprojAdds CoreCLR-specific properties for invariant globalization and disables trimming
src/mono/browser/test-main.jsAdds timing output to log test execution duration
src/mono/browser/build/WasmApp.InTree.propsAdds comment referencing IL trimming issue
src/libraries/tests.projRestricts browser smoke tests to Mono runtime only
src/libraries/pretest.projRemoves Mono-only restriction from WASM provisioning
eng/testing/tests.browser.targetsAdds CoreCLR-specific test support properties and disables trimming
eng/pipelines/runtime.ymlChanges build config to Release and adds CoreCLR library tests template
eng/pipelines/common/templates/wasm-coreclr-library-tests.ymlNew file defining CoreCLR library test pipeline configuration
eng/pipelines/common/templates/browser-wasm-coreclr-build-tests.ymlUpdates build config from Debug to Release
eng/native.wasm.targetsReduces EmccExportedRuntimeMethod and EmccExportedFunction items
src/libraries/Common/tests/WasmTestRunner/WasmTestRunner.csImplements workaround for test assembly loading issue
src/coreclr/vm/wasm/callhelpers-interp-to-managed.cppAdds numerous missing function signatures for WASM interop
src/coreclr/interpreter/compiler.cppAdds TARGET_WASM conditional to skip EmitCallsiteCallout workaround
src/libraries/System.Runtime/tests/System.Runtime.Tests/System/*.csAdds ActiveIssue attributes to disable failing tests for Browser+CoreCLR

Comment threadsrc/libraries/System.Runtime/tests/System.Runtime.Tests/System/GCTests.cs Outdated
Comment threadsrc/libraries/System.Runtime/tests/System.Runtime.Tests/System/HalfTests.cs Outdated
CopilotAI reviewed Jan 9, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@pavelsavara

Copy link
Copy Markdown
MemberAuthor

Log

[14:21:58] info: [STRT] System.Tests.StringTests.Contains_NullValue_WithComparisonType_ThrowsArgumentNullException(comparisonType: Ordinal)
[14:21:58] info: [STRT] System.Tests.StringTests.Contains_NullValue_WithComparisonType_ThrowsArgumentNullException(comparisonType: OrdinalIgnoreCase)
[14:21:58] info: [STRT] System.Tests.StringTests.Contains_ZeroLength_Char
[14:21:58] info: [STRT] System.Tests.StringTests.Create_NullState_Allowed
[14:21:58] info: Finished: System.Runtime.Tests.dll
[14:22:13] info: Received expected 17463831 of /root/helix/work/workitem/uploads/xharness-output/testResults.xml
[14:22:13] info: Finished writing 17463831 bytes of RESULTXML
[14:22:13] info: Xml file was written to the provided writer.
[14:22:13] info: [14:22:13] info: === TEST EXECUTION SUMMARY ===
[14:22:13] info: Tests run: 64047 Passed: 63955 Inconclusive: 0 Failed: 0 Ignored: 0 Skipped: 92
[14:22:13] info: [14:22:13] info: test-main.js exiting WasmTestRunner.dll System.Runtime.Tests.dll after 13.740933333333333 minutes with result 0 and linear memory 1155596288 bytes
[14:22:13] info: WASM EXIT 0

Comment threadsrc/libraries/Common/tests/WasmTestRunner/WasmTestRunner.cs Outdated
@pavelsavara

pavelsavara commented Jan 12, 2026

Copy link
Copy Markdown
MemberAuthor

Passing WBT Log
Passing System.Runtime.Tests Log

Log

@radekdoulikradekdoulik left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you! LGTM

Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-wasmWebAssembly architecturearea-System.Runtimeos-browserBrowser variant of arch-wasm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[browser][coreCLR] Fix IL trimming in publish [wasm][coreclr] make a few libraries tests run on CI

4 participants

@pavelsavara@radekdoulik@maraf