Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
29924ff
[wasi] Stand up CoreCLR-WASI library-test smoke leg
lewing Jul 14, 2026
1c94fb1
[wasi] Complete CoreCLR-WASI library-test bundle (framework + entry p…
lewing Jul 14, 2026
086c155
[wasi] Note #130634 as the known blocker for the CoreCLR-WASI smoke leg
lewing Jul 14, 2026
e8fcde7
[wasi] Correct CoreCLR-WASI smoke leg known-blocker note
lewing Jul 14, 2026
0ba4ece
[wasi] Add WasiHost-Static archive for CoreCLR-WASI per-app relink
lewing Jul 14, 2026
e5386cc
[wasi] Relink corerun per-app in WasiApp.CoreCLR.targets
lewing Jul 14, 2026
a662aca
[wasi] Fix corerun relink: whole-archive host + full VM define set
lewing Jul 14, 2026
914362d
[wasi] Update CoreCLR-WASI notes for the per-app corerun relink
lewing Jul 14, 2026
c45c222
[wasi] Document why the corerun relink omits libgcinfo_unix_wasm.a
lewing Jul 15, 2026
fa09c9b
[wasi] Refine libgcinfo_unix_wasm.a omission rationale
lewing Jul 15, 2026
985e149
[wasi] Document coreclr_compat.h cross-tree reference as intentional
lewing Jul 15, 2026
bb8ddb7
[wasi] Tighten WasiApp.CoreCLR.targets comments to match surrounding …
lewing Jul 15, 2026
61dbe80
[wasi] Address PR review: correct stale 'prebuilt corerun' comments +…
lewing Jul 15, 2026
e8e4b77
[wasi] Address PR review round 2: target triple + Copy batching
lewing Jul 15, 2026
6166d4d
[wasm] Add WarnOnUnresolvedPInvokeModules flag to the CoreCLR generator
lewing Jul 15, 2026
4e47134
[wasi] Address PR review: compat-header override + condition ICU on i…
lewing Jul 15, 2026
b493aa9
[wasi] Load ICU data in the corerun host so CoreCLR-WASI can run non-…
lewing Jul 15, 2026
3411698
[wasi] Run the CoreCLR-WASI library-test leg with full ICU (non-invar…
lewing Jul 15, 2026
88d40d8
[wasi] ActiveIssue the 3 CoreCLR-WASI interp test gaps in System.Runt…
lewing Jul 15, 2026
c3e9eb0
[wasi] Consume the shipping wasihost corehost (#130816) in the librar…
lewing Jul 16, 2026
67c7ec5
Potential fix for pull request finding
lewing Jul 17, 2026
400271c
[wasi] Don't default WasmMainAssemblyFileName in the CoreCLR app-buil…
lewing Jul 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
parameters:
alwaysRun: false
extraBuildArgs: ''
extraHelixArguments: ''
isExtraPlatformsBuild: false
isWasmOnlyBuild: false
nameSuffix: ''
platforms: []
scenarios: ['WasmTestOnWasmtime']
shouldContinueOnError: false
shouldRunSmokeOnly: false

jobs:

#
# Build CoreCLR libraries for WASI and run the library tests on wasmtime via Helix.
# Mirrors wasm-coreclr-library-tests.yml (the browser-CoreCLR LibraryTestsCoreCLR leg),
# with the WasmTestOnWasmtime scenario and the wasi_wasm helix queue.
# See https://github.com/dotnet/runtime/issues/130129.
#
# Bring-up leg: smoke-only and non-gating (rolling alwaysRun). WasiApp.CoreCLR.targets
# performs a per-app native link of the wasihost corehost so a test's own
# [UnmanagedCallersOnly] reverse thunks are generated + linked into the host; with that link
# + the nested-type reverse-thunk
# key fix (also filed standalone as dotnet/runtime#130740; the remaining enclosing-type
# collision limitation is tracked by #130739) the interpreter discovers and runs the suite
# (validated locally: 9930 System.Runtime.Tests cases). #130634 (cold portable-entry-point
# publication) only affects a future R2R-enabled leg, not this pure-interpreter smoke.
#
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/global-build-job.yml
helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml
buildConfig: Release
runtimeFlavor: coreclr
platforms: ${{ parameters.platforms }}
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
variables:
- name: alwaysRunVar
value: ${{ parameters.alwaysRun }}
- name: shouldRunOnDefaultPipelines
value: $[
or(
eq(variables['wasmDarcDependenciesChanged'], true),
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'], true),
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_wasm_coreclr_runtimetests.containsChange'], true))
]
# run smoke tests only if:
# - explicitly requested
# - libraries or illink changed and no wasm specific changes
- name: shouldRunSmokeOnlyVar
value: $[
or(
eq('${{ parameters.shouldRunSmokeOnly }}', 'true'),
and(
eq('${{ parameters.shouldRunSmokeOnly }}', 'onLibrariesAndIllinkChanges'),
ne(variables['wasmDarcDependenciesChanged'], true),
or(
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'], true),
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true)
)
)
)
]
- name: _wasmRunSmokeTestsOnlyArg
value: /p:RunSmokeTestsOnly=$(shouldRunSmokeOnlyVar)

jobParameters:
isExtraPlatforms: ${{ parameters.isExtraPlatformsBuild }}
testGroup: innerloop
nameSuffix: LibraryTestsCoreCLR_WASI${{ parameters.nameSuffix }}
buildArgs: -s clr+libs+host+packs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true $(_wasmRunSmokeTestsOnlyArg) /maxcpucount:1 ${{ parameters.extraBuildArgs }}
timeoutInMinutes: 240
condition: >-
or(
eq(variables['alwaysRunVar'], true),
eq(variables['isDefaultPipeline'], variables['shouldRunOnDefaultPipelines']))
# extra steps, run tests
postBuildSteps:
- template: /eng/pipelines/libraries/helix.yml
parameters:
creator: dotnet-bot
testRunNamePrefixSuffix: CoreCLR_WASI_$(_BuildConfig)
extraHelixArguments: $(_wasmRunSmokeTestsOnlyArg) ${{ parameters.extraHelixArguments }}
scenarios: ${{ parameters.scenarios }}
10 changes: 10 additions & 0 deletions eng/pipelines/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,16 @@ extends:
- wasi_wasm
alwaysRun: ${{ variables.isRollingBuild }}

# CoreCLR library-test smoke leg run on wasmtime via Helix
# (wasi_wasm queue). Starts with a single-library smoke set; see
# https://github.com/dotnet/runtime/issues/130129.
- template: /eng/pipelines/common/templates/wasi-wasm-coreclr-library-tests.yml
parameters:
platforms:
- wasi_wasm
shouldRunSmokeOnly: true
alwaysRun: ${{ variables.isRollingBuild }}
Comment thread
lewing marked this conversation as resolved.

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/global-build-job.yml
Expand Down
20 changes: 19 additions & 1 deletion eng/testing/tests.wasi.targets
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,22 @@
for WBT, and debugger tests -->
<Import Project="$(MSBuildThisFileDirectory)wasi-provisioning.targets" />

<!-- CoreCLR-WASI: WasiApp.CoreCLR.targets links the wasihost corehost per-app (so
library/test reverse P/Invoke thunks are covered), and the host preloads icudt.dat,
so the leg runs with full ICU globalization. -->
<PropertyGroup Condition="'$(RuntimeFlavor)' == 'CoreCLR'">
<InvariantGlobalization Condition="'$(InvariantGlobalization)' == ''">false</InvariantGlobalization>
</PropertyGroup>

<PropertyGroup>
<_AppArgs Condition="'$(WasmSingleFileBundle)' == 'true'">$([System.IO.Path]::GetFileNameWithoutExtension('$(WasmMainAssemblyFileName)')).wasm</_AppArgs>
<_AppArgs Condition="'$(WasmSingleFileBundle)' != 'true'">dotnet.wasm WasmTestRunner</_AppArgs>
<!-- Mono launches dotnet.wasm with the entry assembly name; CoreCLR launches the
per-app-linked wasihost host with the managed entry assembly (.dll). The host is
linked into managed/ (as 'corerun') alongside the framework and finds the runtime via
CORE_ROOT (see WasiApp.CoreCLR.targets). Validated locally: discovers + runs the full
System.Runtime.Tests suite under wasmtime. -->
<_AppArgs Condition="'$(WasmSingleFileBundle)' != 'true' and '$(RuntimeFlavor)' != 'CoreCLR'">dotnet.wasm WasmTestRunner</_AppArgs>
<_AppArgs Condition="'$(WasmSingleFileBundle)' != 'true' and '$(RuntimeFlavor)' == 'CoreCLR'">managed/corerun managed/WasmTestRunner.dll</_AppArgs>
Comment thread
lewing marked this conversation as resolved.

<_AppArgs Condition="'$(IsFunctionalTest)' != 'true' and '$(WasmSingleFileBundle)' != 'true'">$(_AppArgs) managed/$(AssemblyName).dll</_AppArgs>
<_AppArgs Condition="'$(IsFunctionalTest)' != 'true' and '$(WasmSingleFileBundle)' == 'true'">$(_AppArgs) $(AssemblyName).dll</_AppArgs>
Expand Down Expand Up @@ -52,6 +65,11 @@
<_XHarnessArgs >$(_XHarnessArgs) --engine-arg=--wasi --engine-arg=allow-ip-name-lookup</_XHarnessArgs>
<_XHarnessArgs >$(_XHarnessArgs) --engine-arg=--wasi --engine-arg=hostcall-fuel=4294967295</_XHarnessArgs>
<_XHarnessArgs >$(_XHarnessArgs) --engine-arg=--env --engine-arg=DOTNET_WASI_PRINT_EXIT_CODE=1</_XHarnessArgs>
<!-- CoreCLR-WASI: enable the wasm exception-handling proposal (the host relies on it)
and point the host at the bundled framework via CORE_ROOT=/managed. Validated
locally: host+runtime live in managed/ and init succeeds under wasmtime. -->
<_XHarnessArgs Condition="'$(RuntimeFlavor)' == 'CoreCLR'">$(_XHarnessArgs) --engine-arg=-W --engine-arg=exceptions=y</_XHarnessArgs>
<_XHarnessArgs Condition="'$(RuntimeFlavor)' == 'CoreCLR'">$(_XHarnessArgs) --engine-arg=--env --engine-arg=CORE_ROOT=/managed</_XHarnessArgs>
<_XHarnessArgs Condition="'$(WasmXHarnessArgsCli)' != ''" >$(_XHarnessArgs) $(WasmXHarnessArgsCli)</_XHarnessArgs>

<_InvariantGlobalization Condition="'$(InvariantGlobalization)' == 'true'">--env=DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true</_InvariantGlobalization>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ public static void Exception_TargetSite_Rethrow()
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.HasAssemblyFiles))]
[ActiveIssue("https://github.com/mono/mono/issues/15140", TestRuntimes.Mono)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/124344", typeof(PlatformDetection), nameof(PlatformDetection.IsAppleMobile), nameof(PlatformDetection.IsCoreCLR))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/130796", typeof(PlatformDetection), nameof(PlatformDetection.IsWasi), nameof(PlatformDetection.IsCoreCLR))]
public static void ThrowStatementDoesNotResetExceptionStackLineSameMethod()
{
(string, string, int) rethrownExceptionStackFrame = (null, null, 0);
Expand Down Expand Up @@ -141,6 +142,7 @@ private static (string, string, int) ThrowAndRethrowSameMethod(out (string, stri
// [ActiveIssue(https://github.com/dotnet/runtime/issues/1871)] can't use ActiveIssue for archs
[ActiveIssue("https://github.com/mono/mono/issues/15141", TestRuntimes.Mono)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/124344", typeof(PlatformDetection), nameof(PlatformDetection.IsAppleMobile), nameof(PlatformDetection.IsX64Process), nameof(PlatformDetection.IsCoreCLR))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/130796", typeof(PlatformDetection), nameof(PlatformDetection.IsWasi), nameof(PlatformDetection.IsCoreCLR))]
public static void ThrowStatementDoesNotResetExceptionStackLineOtherMethod()
{
(string, string, int) rethrownExceptionStackFrame = (null, null, 0);
Expand Down
12 changes: 12 additions & 0 deletions src/libraries/sendtohelix-wasi.targets
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@

<PropertyGroup>
<IsRunningLibraryTests Condition="'$(Scenario)' == 'WasmTestOnWasmtime'">true</IsRunningLibraryTests>
<!-- Distinguish CoreCLR-WASI work items from Mono ones sharing the wasi_wasm queue
(mirror of the browser -CLR-ST- prefix in sendtohelix-browser.targets). -->
<WorkItemPrefix Condition="'$(WorkItemPrefix)' == '' and '$(RuntimeFlavor)' == 'CoreCLR'">$(Scenario)-CLR-ST-</WorkItemPrefix>
<WasiEngine Condition="'$(Scenario)' == 'WasmTestOnWasmtime' or '$(Scenario)' == 'BuildWasmApps' or '$(Scenario)' == ''">wasmtime</WasiEngine>
<NeedsWasmtime Condition="'$(WasiEngine)' == 'wasmtime'">true</NeedsWasmtime>

Expand Down Expand Up @@ -124,12 +127,21 @@
<HelixCorrelationPayload Include="$(MicrosoftNetCoreAppRuntimePackDir)" Destination="build/microsoft.netcore.app.runtime.wasi-wasm" />

<HelixCorrelationPayload Include="$(WasiBuildTargetsDir)" Destination="build/wasm" />
</ItemGroup>

<!-- Mono-only build tooling (AOT compiler, cross, Mono targets tasks). A CoreCLR
build does not produce these, and the CoreCLR-WASI wasihost link happens at
build time with the wasi-sdk (not the Mono AOT/cross tooling), so these Mono
runtime payloads are not needed on Helix. -->
<ItemGroup Condition="'$(RuntimeFlavor)' != 'CoreCLR'">
<HelixCorrelationPayload Include="$(WasmBuildTargetsDir)" Destination="build/wasm-shared" />
<HelixCorrelationPayload Include="$(WasmAppBuilderDir)" Destination="build/WasmAppBuilder" />
<HelixCorrelationPayload Include="$(MonoAOTCompilerDir)" Destination="build/MonoAOTCompiler" />
<HelixCorrelationPayload Include="$(MonoAotCrossDir)" Destination="build/cross" />
<HelixCorrelationPayload Include="$(MonoTargetsTasksDir)" Destination="build/MonoTargetsTasks" />
</ItemGroup>

<ItemGroup>
<HelixCorrelationPayload Include="$(_ShippingPackagesPath)" Destination="built-nugets" Condition="'$(NeedsBuiltNugets)' == 'true'" />
<HelixCorrelationPayload Include="$(WasiSdkDirForHelixPayload)" Destination="build/wasi-sdk" Condition="'$(NeedsWasiSdk)' == 'true'" />
</ItemGroup>
Expand Down
10 changes: 7 additions & 3 deletions src/libraries/tests.proj
Original file line number Diff line number Diff line change
Expand Up @@ -557,8 +557,8 @@
<SmokeTestProject Include="$(MSBuildThisFileDirectory)System.Net.WebSockets.Client\tests\System.Net.WebSockets.Client.Tests.csproj" />
</ItemGroup>

<!-- wasi/interp smoke tests -->
<ItemGroup Condition="'$(TargetOS)' == 'wasi' and '$(RunAOTCompilation)' != 'true'">
<!-- wasi/interp smoke tests (Mono) -->
<ItemGroup Condition="'$(TargetOS)' == 'wasi' and '$(RunAOTCompilation)' != 'true' and '$(RuntimeFlavor)' != 'CoreCLR'">
<SmokeTestProject Include="$(MSBuildThisFileDirectory)Microsoft.XmlSerializer.Generator\tests\Microsoft.XmlSerializer.Generator.Tests.csproj" />
<SmokeTestProject Include="$(MSBuildThisFileDirectory)System.Collections.Specialized\tests\System.Collections.Specialized.Tests.csproj" />
<SmokeTestProject Include="$(MSBuildThisFileDirectory)System.Collections\tests\System.Collections.Tests.csproj" />
Expand All @@ -576,7 +576,11 @@
<SmokeTestProject Include="$(MSBuildThisFileDirectory)System.Net.Sockets\tests\FunctionalTests\System.Net.Sockets.Tests.csproj" />
</ItemGroup>

<!-- wasi/aot non-smoke tests -->
<!-- wasi smoke tests CoreCLR. Start minimal (single library) for the bring-up leg;
expand as gaps close. See https://github.com/dotnet/runtime/issues/130129. -->
<ItemGroup Condition="'$(TargetOS)' == 'wasi' and '$(RunAOTCompilation)' != 'true' and '$(RuntimeFlavor)' == 'CoreCLR'">
<SmokeTestProject Include="$(MSBuildThisFileDirectory)System.Runtime\tests\System.Runtime.Tests\System.Runtime.Tests.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetOS)' == 'wasi' and '$(BuildAOTTestsOnHelix)' == 'true' and '$(RunDisabledWasiTests)' != 'true' and '$(RunAOTCompilation)' == 'true' and '$(RunSmokeTestsOnly)' != 'true'">
<ProjectReference Include="$(MSBuildThisFileDirectory)Microsoft.XmlSerializer.Generator\tests\Microsoft.XmlSerializer.Generator.Tests.csproj" />
<ProjectReference Include="$(MSBuildThisFileDirectory)System.Collections.Specialized\tests\System.Collections.Specialized.Tests.csproj" />
Expand Down
Loading
Loading