Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
8debc4a
Enable non-AOT WBT tests on CoreCLR in 4 native test classes
maraf Apr 22, 2026
65e6237
Enable ICU, InvariantGlobalization, and Memory tests on CoreCLR
Copilot Apr 24, 2026
1fa4950
Add newly enabled WBT classes to CoreCLR Helix jobs list
maraf Apr 24, 2026
123b863
Fix WBT template install on read-only Helix correlation
maraf Apr 24, 2026
5250927
Fix WBT template install DOTNET_CLI_HOME mismatch on Helix
maraf Apr 27, 2026
14cace4
Fix WBT CoreCLR native relink, ICU pack lookup, variadic test scope
maraf Apr 27, 2026
e17204d
Ship coreclr_compat.h as a static file next to BrowserWasmApp.CoreCLR…
maraf Apr 27, 2026
1eb48af
Use ICU-specific main.js for Wasm.Build.Tests IcuTests
maraf Apr 29, 2026
418cd2b
Split emcc compile pass for user vs generated sources in CoreCLR-Wasm
maraf Apr 29, 2026
827800e
Merge remote-tracking branch 'origin/main' into maraf/wbt-coreclr-ena…
maraf Apr 29, 2026
532e645
Ship minipal/utils.h to WBT Helix payload for CoreCLR re-link
May 5, 2026
7509361
Resolve ICU asset src path from build-resolved runtime pack
May 5, 2026
a7b3362
Ship libSystem.Native.Browser.extpost.js in browser-wasm runtime pack
May 5, 2026
905c755
Install libSystem.Native.Browser.extpost.js into sharedFramework
maraf May 6, 2026
9d4e5ce
Include static libs in browser-wasm CoreCLR runtime pack
maraf May 6, 2026
34f2aa2
Auto-enable WasmBuildNative for CoreCLR when NativeFileReference/Nati…
maraf May 6, 2026
c0b0e63
Exclude duplicate libs from browser-wasm CoreCLR runtime pack
maraf May 7, 2026
51b99d0
Treat CoreCLR as always workload
maraf May 8, 2026
0388696
Use icu_main.js for Wasm.Build.Tests DllImport variadic-function tests
maraf May 8, 2026
45afe55
Use minimal main.js for more Wasm.Build.Tests CoreCLR scenarios
maraf May 8, 2026
bef4e8b
Mark IcallWithOverloadedParametersAndEnum as mono-only
maraf May 8, 2026
37cdc06
Revert "Treat CoreCLR as always workload"
maraf May 9, 2026
8910706
Fix WBT NoWorkload+CoreCLR native file location assertion
maraf May 11, 2026
0eb727a
Don't force wasm_load_icu_data as link-time dep on browserhost
maraf May 11, 2026
e51a126
Wire CoreCLR nested publish into ProcessPublishFilesForWasm
maraf May 11, 2026
a12e506
Read pinvoke-table.cpp on CoreCLR in EnsureWasmAbiRulesAreFollowed
maraf May 12, 2026
8a3a3b0
Override _WasmNativeForBuild in CoreCLR targets
maraf May 13, 2026
b730bfc
Run _GatherWasmFilesToBuild before M2N generator
maraf May 13, 2026
f6e4327
Include user-compiled source files in _WasmPInvokeModules
maraf May 13, 2026
392a9ee
Map non-blittable value types to IND in CoreCLR signature naming
maraf May 13, 2026
2ec813f
Stage CoreCLR wasm relinked native asset before static web assets
maraf May 13, 2026
70bf73d
[wasm][coreclr] Fix UCO export wrapper return type in PInvokeTableGen…
maraf May 13, 2026
b4a93e8
[wasm][wbt] Disable user-UCO PInvokeTableGenerator tests on CoreCLR
maraf May 13, 2026
5cc2e7b
Merge remote-tracking branch 'origin/main' into maraf/wbt-coreclr-ena…
maraf May 14, 2026
3c86968
Move WASM CoreCLR runtime pack Exclude= to ItemGroup with the .a glob
maraf May 14, 2026
f724f75
Revert SignatureHelper.cs
maraf May 14, 2026
683b4cd
Revert UCO return type
maraf May 14, 2026
51b37e5
[wasm][WBT] Gate InvariantGlobalizationTests to Mono only
maraf May 14, 2026
4140758
Merge branch 'main' into maraf/wbt-coreclr-enable-non-aot-tests
maraf May 15, 2026
5b3f18f
Add test structure sizes, regenerate
radekdoulik May 15, 2026
b2d2001
Disable EnsureWasmAbiRulesAreFollowedInInterpreter on coreclr
radekdoulik May 15, 2026
f3f030c
Put the structures into WasmAppBuilderTests namespace
radekdoulik May 15, 2026
8092e25
Restore includes in wasm callhelpers generated files
maraf May 15, 2026
01ed2f0
Mark CallIntoLibrariesWithNonAlphanumericCharactersInTheirNames as na…
maraf May 16, 2026
669125e
Ship real callhelpers.hpp/entrypoints.h to Helix, slim coreclr_compat.h
maraf May 16, 2026
4f1b82a
Merge branch 'main' into maraf/wbt-coreclr-enable-non-aot-tests
maraf May 16, 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
9 changes: 9 additions & 0 deletions eng/testing/scenarios/BuildWasmAppsJobsListCoreCLR.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,12 @@ Wasm.Build.Tests.WasmRunOutOfAppBundleTests
Wasm.Build.Tests.WasmTemplateTests
Wasm.Build.Tests.MaxParallelDownloadsTests
Wasm.Build.Tests.LibraryInitializerTests
Wasm.Build.Tests.NativeBuildTests
Wasm.Build.Tests.DllImportTests
Wasm.Build.Tests.PInvokeTableGeneratorTests
Wasm.Build.Tests.NativeLibraryTests
Wasm.Build.Tests.IcuShardingTests
Wasm.Build.Tests.IcuShardingTests2
Wasm.Build.Tests.IcuTests
Wasm.Build.Tests.InvariantGlobalizationTests
Wasm.Build.Tests.MemoryTests
Comment on lines +19 to +23

Copilot AI Apr 24, 2026

Copy link

Choose a reason for hiding this comment

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

The PR description says additional TestCategory("native") classes like IcuTests are "not in scope" and left for follow-up, but this change adds Icu*, InvariantGlobalizationTests, and MemoryTests to the CoreCLR job list. Either update the PR description to reflect the expanded scope or remove these additions to match the stated intent.

Copilot uses AI. Check for mistakes.
Comment on lines +19 to +23
1 change: 0 additions & 1 deletion src/mono/wasm/Wasm.Build.Tests/DllImportTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

namespace Wasm.Build.Tests
{
[TestCategory("native")]
public class DllImportTests : PInvokeTableGeneratorTestsBase
{
public DllImportTests(ITestOutputHelper output, SharedBuildPerTestClassFixture buildContext)
Expand Down
4 changes: 2 additions & 2 deletions src/mono/wasm/Wasm.Build.Tests/IcuShardingTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ from locale in locales

[Theory]
[MemberData(nameof(IcuExpectedAndMissingCustomShardTestData), parameters: new object[] { Configuration.Release })]
[TestCategory("native")]
[TestCategory("native-coreclr")]
public async Task CustomIcuShard(Configuration config, bool aot, string customIcuPath, string customLocales, bool onlyPredefinedCultures) =>
Comment on lines 42 to 45

Copilot AI Apr 24, 2026

Copy link

Choose a reason for hiding this comment

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

These tests use boolOptions for the aot parameter (so they generate AOT and non-AOT variants). Retagging them to native-coreclr will cause the AOT variants to run on the CoreCLR lane (since only category=native is excluded), which is likely unsupported for CoreCLR (UseMonoRuntime=false). Split/tag AOT variants as category=native (excluded on CoreCLR) or filter aot=true out for CoreCLR runs.

Copilot uses AI. Check for mistakes.
await TestIcuShards(config, Template.WasmBrowser, aot, customIcuPath, customLocales, GlobalizationMode.Custom, onlyPredefinedCultures);

[Theory]
[MemberData(nameof(IcuExpectedAndMissingAutomaticShardTestData), parameters: new object[] { Configuration.Release })]
[TestCategory("native")]
[TestCategory("native-coreclr")]
public async Task AutomaticShardSelectionDependingOnEnvLocale(Configuration config, bool aot, string environmentLocale, string testedLocales) =>
await PublishAndRunIcuTest(config, Template.WasmBrowser, aot, testedLocales, GlobalizationMode.Sharded, locale: environmentLocale);
}
2 changes: 1 addition & 1 deletion src/mono/wasm/Wasm.Build.Tests/IcuShardingTests2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ from locale in locales

[Theory]
[MemberData(nameof(IcuExpectedAndMissingShardFromRuntimePackTestData), parameters: new object[] { Configuration.Release })]
[TestCategory("native")]
[TestCategory("native-coreclr")]
public async Task DefaultAvailableIcuShardsFromRuntimePack(Configuration config, bool aot, string shardName, string testedLocales) =>
Comment on lines 39 to 42

Copilot AI Apr 24, 2026

Copy link

Choose a reason for hiding this comment

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

This theory generates both aot=false and aot=true cases via boolOptions. After changing the category to native-coreclr, the AOT variants will no longer be excluded by the CoreCLR trait filter (-notrait category=native) and may run on CoreCLR where AOT is likely unsupported. Consider splitting/tagging AOT variants as category=native (excluded) or changing the data source to omit aot=true on CoreCLR.

Copilot uses AI. Check for mistakes.
await TestIcuShards(config, Template.WasmBrowser, aot, shardName, testedLocales, GlobalizationMode.Custom);
}
4 changes: 2 additions & 2 deletions src/mono/wasm/Wasm.Build.Tests/IcuTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static IEnumerable<object[]> IncorrectIcuTestData(Configuration config)

[Theory]
[MemberData(nameof(FullIcuWithInvariantTestData), parameters: new object[] { Configuration.Release })]
[TestCategory("native")]
[TestCategory("native-coreclr")]
public async Task FullIcuFromRuntimePackWithInvariant(Configuration config=Configuration.Release, bool aot=false, bool invariant=true, bool fullIcu=true, string testedLocales="Array.Empty<Locale>()") =>
Comment on lines 54 to 57

Copilot AI Apr 24, 2026

Copy link

Choose a reason for hiding this comment

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

Changing these theories to TestCategory("native-coreclr") makes them eligible to run under the CoreCLR lane filter (which only excludes category=native). However, the test data includes aot=true cases (boolOptions), and CoreCLR builds set <UseMonoRuntime>false</UseMonoRuntime>; AOT compilation is likely unsupported and will attempt to run anyway. Consider splitting into non-AOT methods (tagged native-coreclr) and AOT methods (keep category=native so they remain excluded on CoreCLR), or adjust the MemberData to exclude aot=true when BuildTestBase.IsCoreClrRuntime.

Copilot uses AI. Check for mistakes.
await PublishAndRunIcuTest(
config,
Expand All @@ -67,7 +67,7 @@ await PublishAndRunIcuTest(

[Theory]
[MemberData(nameof(FullIcuWithICustomIcuTestData), parameters: new object[] { Configuration.Release })]
[TestCategory("native")]
[TestCategory("native-coreclr")]
Comment on lines 56 to +70
public async Task FullIcuFromRuntimePackWithCustomIcu(Configuration config, bool aot, bool fullIcu)
{
string customIcuProperty = "BlazorIcuDataFileName";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public async Task AOT_InvariantGlobalization(Configuration config, bool aot, boo
// TODO: What else should we use to verify a relinked build?
[Theory]
[MemberData(nameof(InvariantGlobalizationTestData), parameters: new object[] { /*aot*/ false })]
[TestCategory("native")]
[TestCategory("native-coreclr")]
public async Task RelinkingWithoutAOT(Configuration config, bool aot, bool? invariantGlobalization)
=> await TestInvariantGlobalization(config, aot, invariantGlobalization, isNativeBuild: true);

Expand Down
2 changes: 1 addition & 1 deletion src/mono/wasm/Wasm.Build.Tests/MemoryTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace Wasm.Build.Tests;

[TestCategory("native")]
[TestCategory("native-coreclr")]
public class MemoryTests : WasmTemplateTestsBase
Comment on lines +16 to 17

Copilot AI Apr 24, 2026

Copy link

Choose a reason for hiding this comment

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

With the class retagged to native-coreclr, this test will start running in the CoreCLR lane. The build assertion currently uses ExpectSuccess: BuildTestBase.IsUsingWorkloads, but CoreCLR WBT runs with TestUsingWorkloads=false while native relink is now supported (emsdk is provisioned separately). That combination likely makes the test fail (it will expect the native build to fail even if it succeeds). Consider basing ExpectSuccess/execution on whether native builds are actually available (e.g., IsUsingWorkloads || IsCoreClrRuntime), or keep the test excluded until its expectations are updated.

Copilot uses AI. Check for mistakes.
{
Comment on lines +16 to 18

Copilot AI Apr 29, 2026

Copy link

Choose a reason for hiding this comment

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

With the class category changed to "native-coreclr", this test class will now run on the CoreCLR WBT lane (which sets SDK_HAS_WORKLOAD_INSTALLED=false). In that lane, AllocateLargeHeapThenRepeatedlyInterop calls BuildProject(... ExpectSuccess: BuildTestBase.IsUsingWorkloads) which becomes false, so the test effectively expects the build to fail and then doesn't run/validate anything. If the intent is to start exercising this scenario on CoreCLR, consider splitting the workload/no-workload variants (or tagging the workload-only [Fact] with TestCategory("workload")) and making the CoreCLR-enabled path assert a successful native rebuild instead of treating failure as success.

Copilot uses AI. Check for mistakes.
public MemoryTests(ITestOutputHelper output, SharedBuildPerTestClassFixture buildContext)
Expand Down
4 changes: 3 additions & 1 deletion src/mono/wasm/Wasm.Build.Tests/NativeBuildTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

namespace Wasm.Build.Tests
{
[TestCategory("native")]
public class NativeBuildTests : WasmTemplateTestsBase
{
Comment thread
maraf marked this conversation as resolved.
public NativeBuildTests(ITestOutputHelper output, SharedBuildPerTestClassFixture buildContext)
Expand Down Expand Up @@ -41,6 +40,7 @@ public async Task SimpleNativeBuild(Configuration config, bool aot)

[Theory]
[BuildAndRun(aot: true)]
[TestCategory("native")]
public void AOTNotSupportedWithNoTrimming(Configuration config, bool aot)
{
ProjectInfo info = CreateWasmTemplateProject(
Expand All @@ -59,6 +59,7 @@ public void AOTNotSupportedWithNoTrimming(Configuration config, bool aot)

[Theory]
[BuildAndRun(config: Configuration.Release, aot: true)]
[TestCategory("native")]
public void IntermediateBitcodeToObjectFilesAreNotLLVMIR(Configuration config, bool aot)
{
string printFileTypeTarget = @"
Expand Down Expand Up @@ -91,6 +92,7 @@ public void IntermediateBitcodeToObjectFilesAreNotLLVMIR(Configuration config, b

[Theory]
[BuildAndRun(config: Configuration.Release, aot: true)]
[TestCategory("native")]
public void NativeBuildIsRequired(Configuration config, bool aot)
{
ProjectInfo info = CreateWasmTemplateProject(
Expand Down
42 changes: 37 additions & 5 deletions src/mono/wasm/Wasm.Build.Tests/NativeLibraryTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

namespace Wasm.Build.Tests
{
[TestCategory("native")]
public class NativeLibraryTests : WasmTemplateTestsBase
{
public NativeLibraryTests(ITestOutputHelper output, SharedBuildPerTestClassFixture buildContext)
Expand All @@ -21,8 +20,16 @@ public NativeLibraryTests(ITestOutputHelper output, SharedBuildPerTestClassFixtu

[Theory]
[BuildAndRun(aot: false)]
public Task ProjectWithNativeReference(Configuration config, bool aot) =>
ProjectWithNativeReferenceCore(config, aot);

[Theory]
[BuildAndRun(config: Configuration.Release, aot: true)]
public async Task ProjectWithNativeReference(Configuration config, bool aot)
[TestCategory("native")]
public Task ProjectWithNativeReference_AOT(Configuration config, bool aot) =>
ProjectWithNativeReferenceCore(config, aot);

private async Task ProjectWithNativeReferenceCore(Configuration config, bool aot)
{
string objectFilename = "native-lib.o";
string extraItems = $"<NativeFileReference Include=\"{objectFilename}\" />";
Expand All @@ -42,9 +49,18 @@ public async Task ProjectWithNativeReference(Configuration config, bool aot)

[Theory]
[BuildAndRun(aot: false)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/103566")]
public Task ProjectUsingSkiaSharp(Configuration config, bool aot) =>
ProjectUsingSkiaSharpCore(config, aot);

[Theory]
[BuildAndRun(config: Configuration.Release, aot: true)]
[TestCategory("native")]
[ActiveIssue("https://github.com/dotnet/runtime/issues/103566")]
public async Task ProjectUsingSkiaSharp(Configuration config, bool aot)
public Task ProjectUsingSkiaSharp_AOT(Configuration config, bool aot) =>
ProjectUsingSkiaSharpCore(config, aot);

private async Task ProjectUsingSkiaSharpCore(Configuration config, bool aot)
{
string prefix = $"AppUsingSkiaSharp";
string extraItems = @$"
Expand All @@ -62,8 +78,16 @@ public async Task ProjectUsingSkiaSharp(Configuration config, bool aot)

[Theory]
[BuildAndRun(aot: false)]
public Task ProjectUsingBrowserNativeCrypto(Configuration config, bool aot) =>
ProjectUsingBrowserNativeCryptoCore(config, aot);

[Theory]
[BuildAndRun(config: Configuration.Release, aot: true)]
public async Task ProjectUsingBrowserNativeCrypto(Configuration config, bool aot)
[TestCategory("native")]
public Task ProjectUsingBrowserNativeCrypto_AOT(Configuration config, bool aot) =>
ProjectUsingBrowserNativeCryptoCore(config, aot);

private async Task ProjectUsingBrowserNativeCryptoCore(Configuration config, bool aot)
{
ProjectInfo info = CopyTestAsset(config, aot, TestAsset.WasmBasicTestApp, "AppUsingBrowserNativeCrypto");
ReplaceFile(Path.Combine("Common", "Program.cs"), Path.Combine(BuildEnvironment.TestAssetsPath, "EntryPoints", "NativeCrypto.cs"));
Expand All @@ -80,8 +104,16 @@ public async Task ProjectUsingBrowserNativeCrypto(Configuration config, bool aot

[Theory]
[BuildAndRun(aot: false)]
public Task ProjectWithNativeLibrary(Configuration config, bool aot) =>
ProjectWithNativeLibraryCore(config, aot);

[Theory]
[BuildAndRun(config: Configuration.Release, aot: true)]
public async Task ProjectWithNativeLibrary(Configuration config, bool aot)
[TestCategory("native")]
public Task ProjectWithNativeLibrary_AOT(Configuration config, bool aot) =>
ProjectWithNativeLibraryCore(config, aot);

private async Task ProjectWithNativeLibraryCore(Configuration config, bool aot)
{
string extraItems = "<NativeLibrary Include=\"native-lib.o\" />\n<NativeLibrary Include=\"DoesNotExist.o\" />";
ProjectInfo info = CopyTestAsset(config, aot, TestAsset.WasmBasicTestApp, "AppUsingNativeLib-a", extraItems: extraItems);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

namespace Wasm.Build.Tests
{
[TestCategory("native")]
public class PInvokeTableGeneratorTests : PInvokeTableGeneratorTestsBase
{
public PInvokeTableGeneratorTests(ITestOutputHelper output, SharedBuildPerTestClassFixture buildContext)
Expand Down Expand Up @@ -351,6 +350,7 @@ private async Task EnsureWasmAbiRulesAreFollowed(Configuration config, bool aot)

[Theory]
[BuildAndRun(aot: true, config: Configuration.Release)]
[TestCategory("native")]
public async Task EnsureWasmAbiRulesAreFollowedInAOT(Configuration config, bool aot) =>
await EnsureWasmAbiRulesAreFollowed(config, aot);

Expand All @@ -361,6 +361,7 @@ public async Task EnsureWasmAbiRulesAreFollowedInInterpreter(Configuration confi

[Theory]
[BuildAndRun(aot: true, config: Configuration.Release)]
[TestCategory("native")]
public void EnsureComInteropCompilesInAOT(Configuration config, bool aot)
{
ProjectInfo info = CopyTestAsset(config, aot, TestAsset.WasmBasicTestApp, "com");
Expand Down
Loading