From 4a3cbb0f34f2100d0f6d9d6536ce0223de7fa31d Mon Sep 17 00:00:00 2001 From: pavelsavara Date: Wed, 25 Feb 2026 10:25:23 +0100 Subject: [PATCH 01/19] drop WasmBrowserRunMainOnly --- .../BrowserStructures/TestAsset.cs | 1 - .../WasmBrowserRunMainOnly.cs | 31 ------------------- .../WasmBrowserRunMainOnly/Program.cs | 14 --------- .../Properties/AssemblyInfo.cs | 4 --- .../WasmBrowserRunMainOnly/TestOutput.cs | 18 ----------- .../WasmBrowserRunMainOnly.csproj | 11 ------- .../WasmBrowserRunMainOnly/wwwroot/index.html | 19 ------------ .../WasmBrowserRunMainOnly/wwwroot/main.js | 6 ---- 8 files changed, 104 deletions(-) delete mode 100644 src/mono/wasm/Wasm.Build.Tests/WasmBrowserRunMainOnly.cs delete mode 100644 src/mono/wasm/testassets/WasmBrowserRunMainOnly/Program.cs delete mode 100644 src/mono/wasm/testassets/WasmBrowserRunMainOnly/Properties/AssemblyInfo.cs delete mode 100644 src/mono/wasm/testassets/WasmBrowserRunMainOnly/TestOutput.cs delete mode 100644 src/mono/wasm/testassets/WasmBrowserRunMainOnly/WasmBrowserRunMainOnly.csproj delete mode 100644 src/mono/wasm/testassets/WasmBrowserRunMainOnly/wwwroot/index.html delete mode 100644 src/mono/wasm/testassets/WasmBrowserRunMainOnly/wwwroot/main.js diff --git a/src/mono/wasm/Wasm.Build.Tests/BrowserStructures/TestAsset.cs b/src/mono/wasm/Wasm.Build.Tests/BrowserStructures/TestAsset.cs index e4b4ec9efd0575..83bf2e674d1a39 100644 --- a/src/mono/wasm/Wasm.Build.Tests/BrowserStructures/TestAsset.cs +++ b/src/mono/wasm/Wasm.Build.Tests/BrowserStructures/TestAsset.cs @@ -6,5 +6,4 @@ public class TestAsset public static readonly TestAsset BlazorBasicTestApp = new() { Name = "BlazorBasicTestApp", RunnableProjectSubPath = "App" }; public static readonly TestAsset LibraryModeTestApp = new() { Name = "LibraryMode" }; public static readonly TestAsset BlazorWebWasm = new() { Name = "BlazorWebWasm", RunnableProjectSubPath = "BlazorWebWasm" }; - public static readonly TestAsset WasmBrowserRunMainOnly = new() { Name = "WasmBrowserRunMainOnly" }; } diff --git a/src/mono/wasm/Wasm.Build.Tests/WasmBrowserRunMainOnly.cs b/src/mono/wasm/Wasm.Build.Tests/WasmBrowserRunMainOnly.cs deleted file mode 100644 index 5f49a85154d9d6..00000000000000 --- a/src/mono/wasm/Wasm.Build.Tests/WasmBrowserRunMainOnly.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System.Collections.Specialized; -using System.Threading.Tasks; -using Xunit; -using Xunit.Abstractions; - -namespace Wasm.Build.Tests; - -public class WasmBrowserRunMainOnly(ITestOutputHelper output, SharedBuildPerTestClassFixture buildContext) : WasmTemplateTestsBase(output, buildContext) -{ - [TestCategory("coreclr")] - [Theory] - [BuildAndRun(config: Configuration.Release)] - [BuildAndRun(config: Configuration.Debug)] - public async Task RunMainOnly(Configuration config, bool aot) - { - ProjectInfo info = CopyTestAsset(config, aot, TestAsset.WasmBrowserRunMainOnly, $"WasmBrowserRunMainOnly"); - var (_, buildOutput) = PublishProject(info, config, new PublishOptions(AssertAppBundle: false, EnableDiagnostics: true)); - - // ** MicrosoftNetCoreAppRuntimePackDir : '....microsoft.netcore.app.runtime.browser-wasm\11.0.0-dev' - Assert.Contains("microsoft.netcore.app.runtime.browser-wasm", buildOutput); - - var result = await RunForPublishWithWebServer(new BrowserRunOptions( - Configuration: config - )); - - Assert.Collection( - result.TestOutput, - m => Assert.Equal("Hello from WasmBrowserRunMainOnly!", m) - ); - } -} diff --git a/src/mono/wasm/testassets/WasmBrowserRunMainOnly/Program.cs b/src/mono/wasm/testassets/WasmBrowserRunMainOnly/Program.cs deleted file mode 100644 index e258162d095c3f..00000000000000 --- a/src/mono/wasm/testassets/WasmBrowserRunMainOnly/Program.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using System.Threading.Tasks; - -class Program -{ - static async Task Main(string[] args) - { - TestOutput.WriteLine("Hello from WasmBrowserRunMainOnly!"); - await Task.Delay(1); - return 0; - } -} \ No newline at end of file diff --git a/src/mono/wasm/testassets/WasmBrowserRunMainOnly/Properties/AssemblyInfo.cs b/src/mono/wasm/testassets/WasmBrowserRunMainOnly/Properties/AssemblyInfo.cs deleted file mode 100644 index 9ad9b578f20649..00000000000000 --- a/src/mono/wasm/testassets/WasmBrowserRunMainOnly/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,4 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -[assembly:System.Runtime.Versioning.SupportedOSPlatform("browser")] diff --git a/src/mono/wasm/testassets/WasmBrowserRunMainOnly/TestOutput.cs b/src/mono/wasm/testassets/WasmBrowserRunMainOnly/TestOutput.cs deleted file mode 100644 index 5755b753b5e492..00000000000000 --- a/src/mono/wasm/testassets/WasmBrowserRunMainOnly/TestOutput.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using System; - -public static class TestOutput -{ - public static void WriteLine(string message) - { - Console.WriteLine("TestOutput -> " + message); - } - - public static void WriteLine(object message) - { - Console.Write("TestOutput -> "); - Console.WriteLine(message); - } -} diff --git a/src/mono/wasm/testassets/WasmBrowserRunMainOnly/WasmBrowserRunMainOnly.csproj b/src/mono/wasm/testassets/WasmBrowserRunMainOnly/WasmBrowserRunMainOnly.csproj deleted file mode 100644 index 9951d602d915af..00000000000000 --- a/src/mono/wasm/testassets/WasmBrowserRunMainOnly/WasmBrowserRunMainOnly.csproj +++ /dev/null @@ -1,11 +0,0 @@ - - - net11.0 - true - true - - - - - - diff --git a/src/mono/wasm/testassets/WasmBrowserRunMainOnly/wwwroot/index.html b/src/mono/wasm/testassets/WasmBrowserRunMainOnly/wwwroot/index.html deleted file mode 100644 index 8fe1b7b4aeb17a..00000000000000 --- a/src/mono/wasm/testassets/WasmBrowserRunMainOnly/wwwroot/index.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - WasmBrowserRunMainOnly - - - - - - - - - - - - \ No newline at end of file diff --git a/src/mono/wasm/testassets/WasmBrowserRunMainOnly/wwwroot/main.js b/src/mono/wasm/testassets/WasmBrowserRunMainOnly/wwwroot/main.js deleted file mode 100644 index 6a890e486f2df7..00000000000000 --- a/src/mono/wasm/testassets/WasmBrowserRunMainOnly/wwwroot/main.js +++ /dev/null @@ -1,6 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -import { dotnet } from './_framework/dotnet.js' - -await dotnet.runMainAndExit(); From 8e8806c13ff6f1e7c339eca748749e6c20e008da Mon Sep 17 00:00:00 2001 From: pavelsavara Date: Wed, 25 Feb 2026 10:26:02 +0100 Subject: [PATCH 02/19] wip --- .../Blazor/BuildPublishTests.cs | 3 ++ .../Wasm.Build.Tests/Blazor/CleanTests.cs | 1 + .../Wasm.Build.Tests/Blazor/DllImportTests.cs | 1 + .../Blazor/EventPipeDiagnosticsTests.cs | 1 + .../wasm/Wasm.Build.Tests/Blazor/MiscTests.cs | 3 ++ .../Wasm.Build.Tests/Blazor/NativeRefTests.cs | 1 + .../Blazor/NoopNativeRebuildTest.cs | 1 + .../Blazor/SimpleMultiThreadedTests.cs | 1 + .../Wasm.Build.Tests/Blazor/SimpleRunTests.cs | 1 + .../Wasm.Build.Tests/BuildPublishTests.cs | 2 + .../wasm/Wasm.Build.Tests/DiagnosticsTests.cs | 1 + .../wasm/Wasm.Build.Tests/DllImportTests.cs | 1 + .../wasm/Wasm.Build.Tests/IcuShardingTests.cs | 2 + .../Wasm.Build.Tests/IcuShardingTests2.cs | 1 + src/mono/wasm/Wasm.Build.Tests/IcuTests.cs | 3 ++ .../wasm/Wasm.Build.Tests/InterpPgoTests.cs | 1 + .../InvariantGlobalizationTests.cs | 2 + .../InvariantTimezoneTests.cs | 2 + .../Wasm.Build.Tests/MainWithArgsTests.cs | 2 + src/mono/wasm/Wasm.Build.Tests/MemoryTests.cs | 1 + .../Wasm.Build.Tests/ModuleConfigTests.cs | 18 ++++++--- .../wasm/Wasm.Build.Tests/NativeBuildTests.cs | 1 + .../Wasm.Build.Tests/NativeLibraryTests.cs | 1 + .../FlagsChangeRebuildTest.cs | 1 + .../NoopNativeRebuildTest.cs | 1 + .../OptimizationFlagChangeTests.cs | 1 + .../ReferenceNewAssemblyRebuildTest.cs | 1 + .../SimpleSourceChangeRebuildTest.cs | 1 + .../PInvokeTableGeneratorTests.cs | 1 + .../SatelliteAssembliesTests.cs | 3 ++ .../Templates/NativeBuildTests.cs | 1 + .../Templates/WasmTemplateTests.cs | 10 ++++- .../Wasm.Build.Tests/Wasm.Build.Tests.csproj | 2 +- .../wasm/Wasm.Build.Tests/WasmBuildAppTest.cs | 39 +++++++++++++++++++ .../WasmNativeDefaultsTests.cs | 1 + .../wasm/Wasm.Build.Tests/WasmSIMDTests.cs | 1 + .../WasmSdkBasedProjectProvider.cs | 2 +- .../wasm/Wasm.Build.Tests/WorkloadTests.cs | 1 + 38 files changed, 108 insertions(+), 9 deletions(-) diff --git a/src/mono/wasm/Wasm.Build.Tests/Blazor/BuildPublishTests.cs b/src/mono/wasm/Wasm.Build.Tests/Blazor/BuildPublishTests.cs index 63f2fd2a3bd145..b1e19c334fc624 100644 --- a/src/mono/wasm/Wasm.Build.Tests/Blazor/BuildPublishTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/Blazor/BuildPublishTests.cs @@ -50,6 +50,7 @@ public void DefaultTemplate_NoAOT_WithWorkload(Configuration config, bool testUn [Theory] [MemberData(nameof(TestDataForDefaultTemplate_WithWorkload), parameters: new object[] { true })] + [TestCategory("native")] public void DefaultTemplate_AOT_WithWorkload(Configuration config, bool testUnicode) { ProjectInfo info = CopyTestAsset(config, aot: false, TestAsset.BlazorBasicTestApp, "blz_aot", appendUnicodeToPath: testUnicode); @@ -117,6 +118,7 @@ void AssertResourcesDlls(string basePath) [Theory] [InlineData("", true)] // Default case [InlineData("false", false)] // the other case + [TestCategory("native")] public async Task Test_WasmStripILAfterAOT(string stripILAfterAOT, bool expectILStripping) { Configuration config = Configuration.Release; @@ -136,6 +138,7 @@ public async Task Test_WasmStripILAfterAOT(string stripILAfterAOT, bool expectIL [Theory] [InlineData(Configuration.Debug)] + [TestCategory("native")] public void BlazorWasm_CannotAOT_InDebug(Configuration config) { ProjectInfo info = CopyTestAsset( diff --git a/src/mono/wasm/Wasm.Build.Tests/Blazor/CleanTests.cs b/src/mono/wasm/Wasm.Build.Tests/Blazor/CleanTests.cs index 2d9a8baa260f7a..afb0d9c79e2720 100644 --- a/src/mono/wasm/Wasm.Build.Tests/Blazor/CleanTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/Blazor/CleanTests.cs @@ -13,6 +13,7 @@ namespace Wasm.Build.Tests.Blazor; +[TestCategory("native")] public class CleanTests : BlazorWasmTestBase { public CleanTests(ITestOutputHelper output, SharedBuildPerTestClassFixture buildContext) diff --git a/src/mono/wasm/Wasm.Build.Tests/Blazor/DllImportTests.cs b/src/mono/wasm/Wasm.Build.Tests/Blazor/DllImportTests.cs index 29df5cdc3aec7e..03e1e1e84c8339 100644 --- a/src/mono/wasm/Wasm.Build.Tests/Blazor/DllImportTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/Blazor/DllImportTests.cs @@ -15,6 +15,7 @@ namespace Wasm.Build.Tests.Blazor; +[TestCategory("native")] public class DllImportTests : BlazorWasmTestBase { public DllImportTests(ITestOutputHelper output, SharedBuildPerTestClassFixture buildContext) diff --git a/src/mono/wasm/Wasm.Build.Tests/Blazor/EventPipeDiagnosticsTests.cs b/src/mono/wasm/Wasm.Build.Tests/Blazor/EventPipeDiagnosticsTests.cs index 3ee0c013877bfb..7f359c9e864a53 100644 --- a/src/mono/wasm/Wasm.Build.Tests/Blazor/EventPipeDiagnosticsTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/Blazor/EventPipeDiagnosticsTests.cs @@ -17,6 +17,7 @@ namespace Wasm.Build.Tests.Blazor; +[TestCategory("mono")] public class EventPipeDiagnosticsTests : BlazorWasmTestBase { private static readonly string uploadPattern = "^[a-zA-Z0-9_]+\\.nettrace$"; diff --git a/src/mono/wasm/Wasm.Build.Tests/Blazor/MiscTests.cs b/src/mono/wasm/Wasm.Build.Tests/Blazor/MiscTests.cs index 8b851af3586cdf..2b8d4c2158930c 100644 --- a/src/mono/wasm/Wasm.Build.Tests/Blazor/MiscTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/Blazor/MiscTests.cs @@ -30,6 +30,7 @@ public MiscTests(ITestOutputHelper output, SharedBuildPerTestClassFixture buildC [InlineData(Configuration.Release, true)] [InlineData(Configuration.Release, false)] [ActiveIssue("https://github.com/dotnet/runtime/issues/103566")] + [TestCategory("native")] public void NativeBuild_WithDeployOnBuild_UsedByVS(Configuration config, bool nativeRelink) { string extraProperties = config == Configuration.Debug @@ -57,6 +58,7 @@ public void NativeBuild_WithDeployOnBuild_UsedByVS(Configuration config, bool na [Theory] [InlineData(Configuration.Release)] + [TestCategory("native")] public void DefaultTemplate_AOT_InProjectFile(Configuration config) { string extraProperties = config == Configuration.Debug @@ -77,6 +79,7 @@ public void DefaultTemplate_AOT_InProjectFile(Configuration config) } [Fact] + [TestCategory("native")] public void BugRegression_60479_WithRazorClassLib() { Configuration config = Configuration.Release; diff --git a/src/mono/wasm/Wasm.Build.Tests/Blazor/NativeRefTests.cs b/src/mono/wasm/Wasm.Build.Tests/Blazor/NativeRefTests.cs index 180c1e249c52bf..2314cd4644f135 100644 --- a/src/mono/wasm/Wasm.Build.Tests/Blazor/NativeRefTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/Blazor/NativeRefTests.cs @@ -9,6 +9,7 @@ namespace Wasm.Build.Tests.Blazor; +[TestCategory("native")] public class NativeTests : BlazorWasmTestBase { public NativeTests(ITestOutputHelper output, SharedBuildPerTestClassFixture buildContext) diff --git a/src/mono/wasm/Wasm.Build.Tests/Blazor/NoopNativeRebuildTest.cs b/src/mono/wasm/Wasm.Build.Tests/Blazor/NoopNativeRebuildTest.cs index 526a4737a29beb..71c8c520dc16ec 100644 --- a/src/mono/wasm/Wasm.Build.Tests/Blazor/NoopNativeRebuildTest.cs +++ b/src/mono/wasm/Wasm.Build.Tests/Blazor/NoopNativeRebuildTest.cs @@ -11,6 +11,7 @@ namespace Wasm.Build.Tests.Blazor { + [TestCategory("native")] public class NoopNativeRebuildTest : BlazorWasmTestBase { public NoopNativeRebuildTest(ITestOutputHelper output, SharedBuildPerTestClassFixture buildContext) diff --git a/src/mono/wasm/Wasm.Build.Tests/Blazor/SimpleMultiThreadedTests.cs b/src/mono/wasm/Wasm.Build.Tests/Blazor/SimpleMultiThreadedTests.cs index 72ae03786db60f..f05c6093b75a54 100644 --- a/src/mono/wasm/Wasm.Build.Tests/Blazor/SimpleMultiThreadedTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/Blazor/SimpleMultiThreadedTests.cs @@ -13,6 +13,7 @@ namespace Wasm.Build.Tests.MT.Blazor; +[TestCategory("mono")] public class SimpleMultiThreadedTests : BlazorWasmTestBase { public SimpleMultiThreadedTests(ITestOutputHelper output, SharedBuildPerTestClassFixture buildContext) diff --git a/src/mono/wasm/Wasm.Build.Tests/Blazor/SimpleRunTests.cs b/src/mono/wasm/Wasm.Build.Tests/Blazor/SimpleRunTests.cs index e623c6d4efc7e3..d39d794e7f5392 100644 --- a/src/mono/wasm/Wasm.Build.Tests/Blazor/SimpleRunTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/Blazor/SimpleRunTests.cs @@ -64,6 +64,7 @@ public async Task BlazorBuildAndRunForDifferentOutputPaths(Configuration config, [InlineData(Configuration.Debug, false)] [InlineData(Configuration.Release, false)] [InlineData(Configuration.Release, true)] + [TestCategory("native")] public async Task BlazorPublishRunTest(Configuration config, bool aot) { ProjectInfo info = CopyTestAsset(config, aot, TestAsset.BlazorBasicTestApp, "blazor_publish"); diff --git a/src/mono/wasm/Wasm.Build.Tests/BuildPublishTests.cs b/src/mono/wasm/Wasm.Build.Tests/BuildPublishTests.cs index 41d7fdb6388fec..23dd76ebce99f2 100644 --- a/src/mono/wasm/Wasm.Build.Tests/BuildPublishTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/BuildPublishTests.cs @@ -23,6 +23,7 @@ public BuildPublishTests(ITestOutputHelper output, SharedBuildPerTestClassFixtur [Theory] [BuildAndRun(config: Configuration.Debug, aot: true)] + [TestCategory("native")] public void Wasm_CannotAOT_InDebug(Configuration config, bool aot) { ProjectInfo info = CopyTestAsset(config, aot, TestAsset.WasmBasicTestApp, "no_aot_in_debug"); @@ -50,6 +51,7 @@ public async Task BuildThenPublishNoAOT(Configuration config, bool aot) [Theory] [BuildAndRun(config: Configuration.Release, aot: true)] + [TestCategory("native")] public async Task BuildThenPublishWithAOT(Configuration config, bool aot) { ProjectInfo info = CopyTestAsset(config, aot, TestAsset.WasmBasicTestApp, "build_publish"); diff --git a/src/mono/wasm/Wasm.Build.Tests/DiagnosticsTests.cs b/src/mono/wasm/Wasm.Build.Tests/DiagnosticsTests.cs index 0e633e20943fd1..d5729449a7ce01 100644 --- a/src/mono/wasm/Wasm.Build.Tests/DiagnosticsTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/DiagnosticsTests.cs @@ -13,6 +13,7 @@ namespace Wasm.Build.Tests; +[TestCategory("mono")] public class DiagnosticsTests : WasmTemplateTestsBase { public DiagnosticsTests(ITestOutputHelper output, SharedBuildPerTestClassFixture buildContext) diff --git a/src/mono/wasm/Wasm.Build.Tests/DllImportTests.cs b/src/mono/wasm/Wasm.Build.Tests/DllImportTests.cs index dac78c679157ce..4d84a6d567dc0e 100644 --- a/src/mono/wasm/Wasm.Build.Tests/DllImportTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/DllImportTests.cs @@ -14,6 +14,7 @@ namespace Wasm.Build.Tests { + [TestCategory("native")] public class DllImportTests : PInvokeTableGeneratorTestsBase { public DllImportTests(ITestOutputHelper output, SharedBuildPerTestClassFixture buildContext) diff --git a/src/mono/wasm/Wasm.Build.Tests/IcuShardingTests.cs b/src/mono/wasm/Wasm.Build.Tests/IcuShardingTests.cs index e3ecb5a48717d0..2883967abc0105 100644 --- a/src/mono/wasm/Wasm.Build.Tests/IcuShardingTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/IcuShardingTests.cs @@ -41,11 +41,13 @@ from locale in locales [Theory] [MemberData(nameof(IcuExpectedAndMissingCustomShardTestData), parameters: new object[] { Configuration.Release })] + [TestCategory("native")] public async Task CustomIcuShard(Configuration config, bool aot, string customIcuPath, string customLocales, bool onlyPredefinedCultures) => await TestIcuShards(config, Template.WasmBrowser, aot, customIcuPath, customLocales, GlobalizationMode.Custom, onlyPredefinedCultures); [Theory] [MemberData(nameof(IcuExpectedAndMissingAutomaticShardTestData), parameters: new object[] { Configuration.Release })] + [TestCategory("native")] public async Task AutomaticShardSelectionDependingOnEnvLocale(Configuration config, bool aot, string environmentLocale, string testedLocales) => await PublishAndRunIcuTest(config, Template.WasmBrowser, aot, testedLocales, GlobalizationMode.Sharded, locale: environmentLocale); } diff --git a/src/mono/wasm/Wasm.Build.Tests/IcuShardingTests2.cs b/src/mono/wasm/Wasm.Build.Tests/IcuShardingTests2.cs index c87afc44b9abb6..7005b99642b21e 100644 --- a/src/mono/wasm/Wasm.Build.Tests/IcuShardingTests2.cs +++ b/src/mono/wasm/Wasm.Build.Tests/IcuShardingTests2.cs @@ -38,6 +38,7 @@ from locale in locales [Theory] [MemberData(nameof(IcuExpectedAndMissingShardFromRuntimePackTestData), parameters: new object[] { Configuration.Release })] + [TestCategory("native")] public async Task DefaultAvailableIcuShardsFromRuntimePack(Configuration config, bool aot, string shardName, string testedLocales) => await TestIcuShards(config, Template.WasmBrowser, aot, shardName, testedLocales, GlobalizationMode.Custom); } diff --git a/src/mono/wasm/Wasm.Build.Tests/IcuTests.cs b/src/mono/wasm/Wasm.Build.Tests/IcuTests.cs index 825f00e3b9b6f0..f57e229bc0200d 100644 --- a/src/mono/wasm/Wasm.Build.Tests/IcuTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/IcuTests.cs @@ -53,6 +53,7 @@ public static IEnumerable IncorrectIcuTestData(Configuration config) [Theory] [MemberData(nameof(FullIcuWithInvariantTestData), parameters: new object[] { Configuration.Release })] + [TestCategory("native")] public async Task FullIcuFromRuntimePackWithInvariant(Configuration config=Configuration.Release, bool aot=false, bool invariant=true, bool fullIcu=true, string testedLocales="Array.Empty()") => await PublishAndRunIcuTest( config, @@ -66,6 +67,7 @@ await PublishAndRunIcuTest( [Theory] [MemberData(nameof(FullIcuWithICustomIcuTestData), parameters: new object[] { Configuration.Release })] + [TestCategory("native")] public async Task FullIcuFromRuntimePackWithCustomIcu(Configuration config, bool aot, bool fullIcu) { string customIcuProperty = "BlazorIcuDataFileName"; @@ -82,6 +84,7 @@ public async Task FullIcuFromRuntimePackWithCustomIcu(Configuration config, bool [Theory] [MemberData(nameof(IncorrectIcuTestData), parameters: new object[] { Configuration.Release })] + [TestCategory("workload")] public void NonExistingCustomFileAssertError(Configuration config, string customIcu, bool isFilenameFormCorrect) { string customIcuProperty = "BlazorIcuDataFileName"; diff --git a/src/mono/wasm/Wasm.Build.Tests/InterpPgoTests.cs b/src/mono/wasm/Wasm.Build.Tests/InterpPgoTests.cs index 4af6f409aeedb7..693ef6d1fd4f5c 100644 --- a/src/mono/wasm/Wasm.Build.Tests/InterpPgoTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/InterpPgoTests.cs @@ -15,6 +15,7 @@ namespace Wasm.Build.Tests; +[TestCategory("mono")] public class InterpPgoTests : WasmTemplateTestsBase { public InterpPgoTests(ITestOutputHelper output, SharedBuildPerTestClassFixture buildContext) diff --git a/src/mono/wasm/Wasm.Build.Tests/InvariantGlobalizationTests.cs b/src/mono/wasm/Wasm.Build.Tests/InvariantGlobalizationTests.cs index 28253df6cea2c2..9a7950b7a5ec4b 100644 --- a/src/mono/wasm/Wasm.Build.Tests/InvariantGlobalizationTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/InvariantGlobalizationTests.cs @@ -32,12 +32,14 @@ public InvariantGlobalizationTests(ITestOutputHelper output, SharedBuildPerTestC [Theory] [MemberData(nameof(InvariantGlobalizationTestData), parameters: new object[] { /*aot*/ false })] [MemberData(nameof(InvariantGlobalizationTestData), parameters: new object[] { /*aot*/ true })] + [TestCategory("native")] public async Task AOT_InvariantGlobalization(Configuration config, bool aot, bool? invariantGlobalization) => await TestInvariantGlobalization(config, aot, invariantGlobalization); // TODO: What else should we use to verify a relinked build? [Theory] [MemberData(nameof(InvariantGlobalizationTestData), parameters: new object[] { /*aot*/ false })] + [TestCategory("native")] public async Task RelinkingWithoutAOT(Configuration config, bool aot, bool? invariantGlobalization) => await TestInvariantGlobalization(config, aot, invariantGlobalization, isNativeBuild: true); diff --git a/src/mono/wasm/Wasm.Build.Tests/InvariantTimezoneTests.cs b/src/mono/wasm/Wasm.Build.Tests/InvariantTimezoneTests.cs index d515dfea8312ae..016996873df776 100644 --- a/src/mono/wasm/Wasm.Build.Tests/InvariantTimezoneTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/InvariantTimezoneTests.cs @@ -29,11 +29,13 @@ public InvariantTimezoneTests(ITestOutputHelper output, SharedBuildPerTestClassF [Theory] [MemberData(nameof(InvariantTimezoneTestData), parameters: new object[] { /*aot*/ false, })] [MemberData(nameof(InvariantTimezoneTestData), parameters: new object[] { /*aot*/ true })] + [TestCategory("native")] public async Task AOT_InvariantTimezone(Configuration config, bool aot, bool? invariantTimezone) => await TestInvariantTimezone(config, aot, invariantTimezone); [Theory] [MemberData(nameof(InvariantTimezoneTestData), parameters: new object[] { /*aot*/ false })] + [TestCategory("native")] public async Task RelinkingWithoutAOT(Configuration config, bool aot, bool? invariantTimezone) => await TestInvariantTimezone(config, aot, invariantTimezone, isNativeBuild: true); diff --git a/src/mono/wasm/Wasm.Build.Tests/MainWithArgsTests.cs b/src/mono/wasm/Wasm.Build.Tests/MainWithArgsTests.cs index 83e79e6955dddf..ef4d837da761a7 100644 --- a/src/mono/wasm/Wasm.Build.Tests/MainWithArgsTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/MainWithArgsTests.cs @@ -31,12 +31,14 @@ public MainWithArgsTests(ITestOutputHelper output, SharedBuildPerTestClassFixtur [Theory] [MemberData(nameof(MainWithArgsTestData), parameters: new object[] { /*aot*/ false })] [MemberData(nameof(MainWithArgsTestData), parameters: new object[] { /*aot*/ true })] + [TestCategory("native")] public async Task AsyncMainWithArgs(Configuration config, bool aot, string[] args) => await TestMainWithArgs(config, aot, "async_main_with_args", "AsyncMainWithArgs.cs", args); [Theory] [MemberData(nameof(MainWithArgsTestData), parameters: new object[] { /*aot*/ false })] [MemberData(nameof(MainWithArgsTestData), parameters: new object[] { /*aot*/ true })] + [TestCategory("native")] public async Task NonAsyncMainWithArgs(Configuration config, bool aot, string[] args) => await TestMainWithArgs(config, aot, "non_async_main_args", "SyncMainWithArgs.cs", args); diff --git a/src/mono/wasm/Wasm.Build.Tests/MemoryTests.cs b/src/mono/wasm/Wasm.Build.Tests/MemoryTests.cs index 50283071f30bde..d4c4a32c3b6412 100644 --- a/src/mono/wasm/Wasm.Build.Tests/MemoryTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/MemoryTests.cs @@ -13,6 +13,7 @@ namespace Wasm.Build.Tests; +[TestCategory("native")] public class MemoryTests : WasmTemplateTestsBase { public MemoryTests(ITestOutputHelper output, SharedBuildPerTestClassFixture buildContext) diff --git a/src/mono/wasm/Wasm.Build.Tests/ModuleConfigTests.cs b/src/mono/wasm/Wasm.Build.Tests/ModuleConfigTests.cs index a9c220e4d07973..7affdf1ff5d558 100644 --- a/src/mono/wasm/Wasm.Build.Tests/ModuleConfigTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/ModuleConfigTests.cs @@ -124,11 +124,19 @@ public async Task AssetIntegrity() } [Theory] - [InlineData(true, false)] - [InlineData(true, true)] - [InlineData(false, false)] - [InlineData(false, true)] - public void SymbolMapFileEmitted(bool emitSymbolMap, bool isPublish) + [InlineData(false)] + [InlineData(true)] + [TestCategory("native")] + public void SymbolMapFileEmitted(bool isPublish) + => SymbolMapFileEmittedCore(emitSymbolMap: true, isPublish); + + [Theory] + [InlineData(false)] + [InlineData(true)] + public void SymbolMapFileNotEmitted(bool isPublish) + => SymbolMapFileEmittedCore(emitSymbolMap: false, isPublish); + + private void SymbolMapFileEmittedCore(bool emitSymbolMap, bool isPublish) { Configuration config = Configuration.Release; string extraProperties = $"{emitSymbolMap.ToString().ToLowerInvariant()}"; diff --git a/src/mono/wasm/Wasm.Build.Tests/NativeBuildTests.cs b/src/mono/wasm/Wasm.Build.Tests/NativeBuildTests.cs index 6716d4d350a298..ff33906df14d1a 100644 --- a/src/mono/wasm/Wasm.Build.Tests/NativeBuildTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/NativeBuildTests.cs @@ -13,6 +13,7 @@ namespace Wasm.Build.Tests { + [TestCategory("native")] public class NativeBuildTests : WasmTemplateTestsBase { public NativeBuildTests(ITestOutputHelper output, SharedBuildPerTestClassFixture buildContext) diff --git a/src/mono/wasm/Wasm.Build.Tests/NativeLibraryTests.cs b/src/mono/wasm/Wasm.Build.Tests/NativeLibraryTests.cs index f01fb37c5fe993..9cbe49352c147c 100644 --- a/src/mono/wasm/Wasm.Build.Tests/NativeLibraryTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/NativeLibraryTests.cs @@ -11,6 +11,7 @@ namespace Wasm.Build.Tests { + [TestCategory("native")] public class NativeLibraryTests : WasmTemplateTestsBase { public NativeLibraryTests(ITestOutputHelper output, SharedBuildPerTestClassFixture buildContext) diff --git a/src/mono/wasm/Wasm.Build.Tests/NativeRebuildTests/FlagsChangeRebuildTest.cs b/src/mono/wasm/Wasm.Build.Tests/NativeRebuildTests/FlagsChangeRebuildTest.cs index 0c16c575dbb212..8182a03b093c64 100644 --- a/src/mono/wasm/Wasm.Build.Tests/NativeRebuildTests/FlagsChangeRebuildTest.cs +++ b/src/mono/wasm/Wasm.Build.Tests/NativeRebuildTests/FlagsChangeRebuildTest.cs @@ -13,6 +13,7 @@ namespace Wasm.Build.NativeRebuild.Tests { + [TestCategory("native")] public class FlagsChangeRebuildTests : NativeRebuildTestsBase { public FlagsChangeRebuildTests(ITestOutputHelper output, SharedBuildPerTestClassFixture buildContext) diff --git a/src/mono/wasm/Wasm.Build.Tests/NativeRebuildTests/NoopNativeRebuildTest.cs b/src/mono/wasm/Wasm.Build.Tests/NativeRebuildTests/NoopNativeRebuildTest.cs index 00c6c25ecf6ed0..a07a03da24e201 100644 --- a/src/mono/wasm/Wasm.Build.Tests/NativeRebuildTests/NoopNativeRebuildTest.cs +++ b/src/mono/wasm/Wasm.Build.Tests/NativeRebuildTests/NoopNativeRebuildTest.cs @@ -11,6 +11,7 @@ namespace Wasm.Build.NativeRebuild.Tests { + [TestCategory("native")] public class NoopNativeRebuildTest : NativeRebuildTestsBase { public NoopNativeRebuildTest(ITestOutputHelper output, SharedBuildPerTestClassFixture buildContext) diff --git a/src/mono/wasm/Wasm.Build.Tests/NativeRebuildTests/OptimizationFlagChangeTests.cs b/src/mono/wasm/Wasm.Build.Tests/NativeRebuildTests/OptimizationFlagChangeTests.cs index 0bc203214df016..205add7709be63 100644 --- a/src/mono/wasm/Wasm.Build.Tests/NativeRebuildTests/OptimizationFlagChangeTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/NativeRebuildTests/OptimizationFlagChangeTests.cs @@ -14,6 +14,7 @@ namespace Wasm.Build.NativeRebuild.Tests; +[TestCategory("native")] public class OptimizationFlagChangeTests : NativeRebuildTestsBase { public OptimizationFlagChangeTests(ITestOutputHelper output, SharedBuildPerTestClassFixture buildContext) diff --git a/src/mono/wasm/Wasm.Build.Tests/NativeRebuildTests/ReferenceNewAssemblyRebuildTest.cs b/src/mono/wasm/Wasm.Build.Tests/NativeRebuildTests/ReferenceNewAssemblyRebuildTest.cs index bc9d6a4cb5a59d..ff7d6bc862c32c 100644 --- a/src/mono/wasm/Wasm.Build.Tests/NativeRebuildTests/ReferenceNewAssemblyRebuildTest.cs +++ b/src/mono/wasm/Wasm.Build.Tests/NativeRebuildTests/ReferenceNewAssemblyRebuildTest.cs @@ -13,6 +13,7 @@ namespace Wasm.Build.NativeRebuild.Tests { + [TestCategory("native")] public class ReferenceNewAssemblyRebuildTest : NativeRebuildTestsBase { public ReferenceNewAssemblyRebuildTest(ITestOutputHelper output, SharedBuildPerTestClassFixture buildContext) diff --git a/src/mono/wasm/Wasm.Build.Tests/NativeRebuildTests/SimpleSourceChangeRebuildTest.cs b/src/mono/wasm/Wasm.Build.Tests/NativeRebuildTests/SimpleSourceChangeRebuildTest.cs index 342fb537cf3ba6..7de98cf6560f73 100644 --- a/src/mono/wasm/Wasm.Build.Tests/NativeRebuildTests/SimpleSourceChangeRebuildTest.cs +++ b/src/mono/wasm/Wasm.Build.Tests/NativeRebuildTests/SimpleSourceChangeRebuildTest.cs @@ -12,6 +12,7 @@ namespace Wasm.Build.NativeRebuild.Tests { + [TestCategory("native")] public class SimpleSourceChangeRebuildTest : NativeRebuildTestsBase { public SimpleSourceChangeRebuildTest(ITestOutputHelper output, SharedBuildPerTestClassFixture buildContext) diff --git a/src/mono/wasm/Wasm.Build.Tests/PInvokeTableGeneratorTests.cs b/src/mono/wasm/Wasm.Build.Tests/PInvokeTableGeneratorTests.cs index b17615c648bf93..f88a5013b92f95 100644 --- a/src/mono/wasm/Wasm.Build.Tests/PInvokeTableGeneratorTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/PInvokeTableGeneratorTests.cs @@ -14,6 +14,7 @@ namespace Wasm.Build.Tests { + [TestCategory("native")] public class PInvokeTableGeneratorTests : PInvokeTableGeneratorTestsBase { public PInvokeTableGeneratorTests(ITestOutputHelper output, SharedBuildPerTestClassFixture buildContext) diff --git a/src/mono/wasm/Wasm.Build.Tests/SatelliteAssembliesTests.cs b/src/mono/wasm/Wasm.Build.Tests/SatelliteAssembliesTests.cs index 140e63c326433d..dd9e20d2a8b59a 100644 --- a/src/mono/wasm/Wasm.Build.Tests/SatelliteAssembliesTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/SatelliteAssembliesTests.cs @@ -33,6 +33,7 @@ public SatelliteAssembliesTests(ITestOutputHelper output, SharedBuildPerTestClas [MemberData(nameof(SatelliteAssemblyTestData), parameters: new object[] { /*aot*/ false, /*relinking*/ false })] [MemberData(nameof(SatelliteAssemblyTestData), parameters: new object[] { /*aot*/ false, /*relinking*/ true })] [MemberData(nameof(SatelliteAssemblyTestData), parameters: new object[] { /*aot*/ true, /*relinking*/ false })] + [TestCategory("native")] public async Task ResourcesFromMainAssembly(Configuration config, bool aot, bool nativeRelink, string? argCulture) { string prefix = $"sat_asm_from_main_asm"; @@ -59,6 +60,7 @@ public async Task ResourcesFromMainAssembly(Configuration config, bool aot, bool [MemberData(nameof(SatelliteAssemblyTestData), parameters: new object[] { /*aot*/ false, /*relinking*/ false })] [MemberData(nameof(SatelliteAssemblyTestData), parameters: new object[] { /*aot*/ false, /*relinking*/ true })] [MemberData(nameof(SatelliteAssemblyTestData), parameters: new object[] { /*aot*/ true, /*relinking*/ true })] + [TestCategory("native")] public async Task ResourcesFromProjectReference(Configuration config, bool aot, bool nativeRelink, string? argCulture) { string prefix = $"SatelliteAssemblyFromProjectRef"; @@ -93,6 +95,7 @@ await RunForPublishWithWebServer( #pragma warning disable xUnit1026 [Theory] [BuildAndRun(aot: true, config: Configuration.Release)] + [TestCategory("native")] public void CheckThatSatelliteAssembliesAreNotAOTed(Configuration config, bool aot) { string extraProperties = $@"-O1 diff --git a/src/mono/wasm/Wasm.Build.Tests/Templates/NativeBuildTests.cs b/src/mono/wasm/Wasm.Build.Tests/Templates/NativeBuildTests.cs index b1f892901d13d4..34a81b98004a9d 100644 --- a/src/mono/wasm/Wasm.Build.Tests/Templates/NativeBuildTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/Templates/NativeBuildTests.cs @@ -11,6 +11,7 @@ namespace Wasm.Build.Templates.Tests { + [TestCategory("native")] public class NativeBuildTests : WasmTemplateTestsBase { public NativeBuildTests(ITestOutputHelper output, SharedBuildPerTestClassFixture buildContext) diff --git a/src/mono/wasm/Wasm.Build.Tests/Templates/WasmTemplateTests.cs b/src/mono/wasm/Wasm.Build.Tests/Templates/WasmTemplateTests.cs index 84f4f2663be448..4e1ed9aa8930d5 100644 --- a/src/mono/wasm/Wasm.Build.Tests/Templates/WasmTemplateTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/Templates/WasmTemplateTests.cs @@ -22,7 +22,7 @@ public WasmTemplateTests(ITestOutputHelper output, SharedBuildPerTestClassFixtur { } - [Theory, TestCategory("no-fingerprinting")] + [Theory, TestCategory("no-fingerprinting"), TestCategory("workload")] [InlineData(Configuration.Debug)] [InlineData(Configuration.Release)] public void BrowserBuildThenPublish(Configuration config) @@ -70,7 +70,7 @@ void AddTestData(bool runOutsideProjectDirectory) return data; } - [Theory, TestCategory("no-fingerprinting")] + [Theory, TestCategory("no-fingerprinting"), TestCategory("workload")] [MemberData(nameof(TestDataForAppBundleDir))] public async Task RunWithDifferentAppBundleLocations(bool runOutsideProjectDirectory, string extraProperties) => await BrowserRunTwiceWithAndThenWithoutBuildAsync(Configuration.Release, extraProperties, runOutsideProjectDirectory); @@ -134,6 +134,7 @@ private async Task BrowserRunTwiceWithAndThenWithoutBuildAsync(Configuration con [Theory] [MemberData(nameof(BrowserBuildAndRunTestData))] + [TestCategory("workload")] public async Task BrowserBuildAndRun(string extraNewArgs, string targetFramework, string runtimeAssetsRelativePath) { Configuration config = Configuration.Debug; @@ -165,6 +166,7 @@ public async Task BrowserBuildAndRun(string extraNewArgs, string targetFramework [InlineData(Configuration.Debug, /*appendRID*/ true, /*useArtifacts*/ true)] [InlineData(Configuration.Debug, /*appendRID*/ false, /*useArtifacts*/ true)] [InlineData(Configuration.Debug, /*appendRID*/ false, /*useArtifacts*/ false)] + [TestCategory("workload")] public async Task BuildAndRunForDifferentOutputPaths(Configuration config, bool appendRID, bool useArtifacts) { ProjectInfo info = CreateWasmTemplateProject(Template.WasmBrowser, config, aot: false); @@ -198,6 +200,7 @@ public async Task BuildAndRunForDifferentOutputPaths(Configuration config, bool [Theory] [InlineData("", true)] // Default case [InlineData("false", false)] // the other case + [TestCategory("native"), TestCategory("workload")] public async Task Test_WasmStripILAfterAOT(string stripILAfterAOT, bool expectILStripping) { Configuration config = Configuration.Release; @@ -276,6 +279,7 @@ internal static void TestWasmStripILAfterAOTOutput(string objBuildDir, string fr [Theory] [InlineData(false)] [InlineData(true)] + [TestCategory("workload")] public void PublishPdb(bool copyOutputSymbolsToPublishDirectory) { Configuration config = Configuration.Release; @@ -323,6 +327,7 @@ public async Task LibraryModeBuild(bool useWasmSdk) [InlineData(Configuration.Release, true)] [InlineData(Configuration.Debug, false)] [InlineData(Configuration.Release, false)] + [TestCategory("workload")] public void TypeScriptDefinitionsCopiedToWwwrootOnBuild(Configuration config, bool emitTypeScriptDts) { string shouldEmit = emitTypeScriptDts ? "true" : "false"; @@ -354,6 +359,7 @@ public void TypeScriptDefinitionsCopiedToWwwrootOnBuild(Configuration config, bo [InlineData("true", false)] [InlineData("false", true)] [InlineData("", false)] // Default case + [TestCategory("workload")] public void UseMonoRuntimeParameter(string useMonoRuntimeArg, bool expectUseMonoRuntimeProperty) { Configuration config = Configuration.Debug; diff --git a/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj b/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj index ddc3118e6cdc07..8eb86c51e5f93b 100644 --- a/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj +++ b/src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj @@ -103,7 +103,7 @@ <_XUnitTraitArg Condition="'$(TestUsingWorkloads)' != 'true'">-trait category=no-workload <_XUnitTraitArg Condition="'$(WasmFingerprintAssets)' == 'false'">-trait category=no-fingerprinting <_XUnitTraitArg Condition="'$(WasmBundlerFriendlyBootConfig)' == 'true'">-trait category=bundler-friendly - <_XUnitTraitArg Condition="'$(RuntimeFlavor)' == 'CoreCLR'">-trait category=$(RuntimeFlavor) + <_XUnitTraitArg Condition="'$(RuntimeFlavor)' == 'CoreCLR'">-notrait category=native -notrait category=mono -notrait category=workload diff --git a/src/mono/wasm/Wasm.Build.Tests/WasmBuildAppTest.cs b/src/mono/wasm/Wasm.Build.Tests/WasmBuildAppTest.cs index 63636c98581806..3d199890e9137b 100644 --- a/src/mono/wasm/Wasm.Build.Tests/WasmBuildAppTest.cs +++ b/src/mono/wasm/Wasm.Build.Tests/WasmBuildAppTest.cs @@ -20,6 +20,13 @@ public WasmBuildAppTest(ITestOutputHelper output, SharedBuildPerTestClassFixture [Theory] [MemberData(nameof(MainMethodTestData), parameters: new object[] { /*aot*/ true })] + [TestCategory("native")] + public async Task TopLevelMain_AOT(Configuration config, bool aot) + => await TestMain("top_level", + @"System.Console.WriteLine(""Hello, World!""); return await System.Threading.Tasks.Task.FromResult(42);", + config, aot); + + [Theory] [MemberData(nameof(MainMethodTestData), parameters: new object[] { /*aot*/ false })] public async Task TopLevelMain(Configuration config, bool aot) => await TestMain("top_level", @@ -28,6 +35,21 @@ public async Task TopLevelMain(Configuration config, bool aot) [Theory] [MemberData(nameof(MainMethodTestData), parameters: new object[] { /*aot*/ true })] + [TestCategory("native")] + public async Task AsyncMain_AOT(Configuration config, bool aot) + => await TestMain("async_main", @" + using System; + using System.Threading.Tasks; + + public class TestClass { + public static async Task Main() + { + Console.WriteLine(""Hello, World!""); + return await Task.FromResult(42); + } + }", config, aot); + + [Theory] [MemberData(nameof(MainMethodTestData), parameters: new object[] { /*aot*/ false })] public async Task AsyncMain(Configuration config, bool aot) => await TestMain("async_main", @" @@ -44,6 +66,21 @@ public static async Task Main() [Theory] [MemberData(nameof(MainMethodTestData), parameters: new object[] { /*aot*/ true })] + [TestCategory("native")] + public async Task NonAsyncMain_AOT(Configuration config, bool aot) + => await TestMain("non_async_main", @" + using System; + using System.Threading.Tasks; + + public class TestClass { + public static int Main() + { + Console.WriteLine(""Hello, World!""); + return 42; + } + }", config, aot); + + [Theory] [MemberData(nameof(MainMethodTestData), parameters: new object[] { /*aot*/ false })] public async Task NonAsyncMain(Configuration config, bool aot) => await TestMain("non_async_main", @" @@ -85,11 +122,13 @@ public static int Main() [Theory] [MemberData(nameof(MainMethodTestData), parameters: new object[] { /*aot*/ true })] + [TestCategory("native")] public async Task Bug49588_RegressionTest_AOT(Configuration config, bool aot) => await TestMain("bug49588_aot", s_bug49588_ProgramCS, config, aot); [Theory] [MemberData(nameof(MainMethodTestData), parameters: new object[] { /*aot*/ false })] + [TestCategory("native")] public async Task Bug49588_RegressionTest_NativeRelinking(Configuration config, bool aot) => await TestMain("bug49588_native_relinking", s_bug49588_ProgramCS, config, aot, extraArgs: "-p:WasmBuildNative=true", diff --git a/src/mono/wasm/Wasm.Build.Tests/WasmNativeDefaultsTests.cs b/src/mono/wasm/Wasm.Build.Tests/WasmNativeDefaultsTests.cs index 22bf394ec2a4c4..f3b9a694afa18e 100644 --- a/src/mono/wasm/Wasm.Build.Tests/WasmNativeDefaultsTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/WasmNativeDefaultsTests.cs @@ -11,6 +11,7 @@ namespace Wasm.Build.Tests { + [TestCategory("native")] public class WasmNativeDefaultsTests : WasmTemplateTestsBase { private static Regex s_regex = new("\\*\\* WasmBuildNative:.*"); diff --git a/src/mono/wasm/Wasm.Build.Tests/WasmSIMDTests.cs b/src/mono/wasm/Wasm.Build.Tests/WasmSIMDTests.cs index 7f034effcf21dc..f0bb792a895dcf 100644 --- a/src/mono/wasm/Wasm.Build.Tests/WasmSIMDTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/WasmSIMDTests.cs @@ -50,6 +50,7 @@ public async Task Build_NoAOT_ShouldNotRelink(Configuration config, bool aot, bo [MemberData(nameof(MainMethodSimdTestData), parameters: new object[] { /*aot*/ true, /* simd */ true })] [MemberData(nameof(MainMethodSimdTestData), parameters: new object[] { /*aot*/ false, /* simd */ true })] [MemberData(nameof(MainMethodSimdTestData), parameters: new object[] { /*aot*/ true, /* simd */ false })] + [TestCategory("native")] public async Task PublishSIMD_AOT(Configuration config, bool aot, bool simd) { ProjectInfo info = CopyTestAsset(config, aot, TestAsset.WasmBasicTestApp, "simd_publish"); diff --git a/src/mono/wasm/Wasm.Build.Tests/WasmSdkBasedProjectProvider.cs b/src/mono/wasm/Wasm.Build.Tests/WasmSdkBasedProjectProvider.cs index e4988229b8ee37..8c7785ebb2b435 100644 --- a/src/mono/wasm/Wasm.Build.Tests/WasmSdkBasedProjectProvider.cs +++ b/src/mono/wasm/Wasm.Build.Tests/WasmSdkBasedProjectProvider.cs @@ -73,7 +73,7 @@ protected override IReadOnlySet GetDotNetFilesExpectedSet(AssertBundleOp if (assertOptions.AssertSymbolsFile && assertOptions.ExpectSymbolsFile) res.Add("dotnet.native.js.symbols"); - if (assertOptions.BuildOptions.EnableDiagnostics) + if (assertOptions.BuildOptions.EnableDiagnostics || EnvironmentVariables.RuntimeFlavor == "CoreCLR") { res.Add("dotnet.diagnostics.js"); if (!assertOptions.BuildOptions.IsPublish) diff --git a/src/mono/wasm/Wasm.Build.Tests/WorkloadTests.cs b/src/mono/wasm/Wasm.Build.Tests/WorkloadTests.cs index 0889d53091c02a..de371c6091439e 100644 --- a/src/mono/wasm/Wasm.Build.Tests/WorkloadTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/WorkloadTests.cs @@ -16,6 +16,7 @@ namespace Wasm.Build.Tests { + [TestCategory("native")] public class WorkloadTests : WasmTemplateTestsBase { public WorkloadTests(ITestOutputHelper output, SharedBuildPerTestClassFixture buildContext) From 10c330832148de56f68ace2a6e5595a20efce4c3 Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz Date: Wed, 25 Feb 2026 11:46:28 +0100 Subject: [PATCH 03/19] TMP: shorten the dev loop, disable lanes that we're not fixing. --- eng/pipelines/global-build.yml | 1 + eng/pipelines/runtime-linker-tests.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/eng/pipelines/global-build.yml b/eng/pipelines/global-build.yml index f1a62719914144..de0401ce832001 100644 --- a/eng/pipelines/global-build.yml +++ b/eng/pipelines/global-build.yml @@ -23,6 +23,7 @@ pr: - eng/pipelines/installer/*.* - PATENTS.TXT - THIRD-PARTY-NOTICES.TXT + - src/mono/wasm/** # TEMPORARILY DISABLED for WBT dev loop variables: - template: /eng/pipelines/common/variables.yml diff --git a/eng/pipelines/runtime-linker-tests.yml b/eng/pipelines/runtime-linker-tests.yml index e5fe67fbc0b595..bae89c32b521c7 100644 --- a/eng/pipelines/runtime-linker-tests.yml +++ b/eng/pipelines/runtime-linker-tests.yml @@ -20,6 +20,7 @@ trigger: - THIRD-PARTY-NOTICES.TXT - eng/pipelines/performance/* - eng/testing/performance/* + - src/mono/wasm/** # TEMPORARILY DISABLED for WBT dev loop schedules: - cron: "0 7,19 * * *" # run at 7:00 and 19:00 (UTC) which is 23:00 and 11:00 (PST). From 16535e50ea3b4b795b7d1838a6d55dc8b8e01592 Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz Date: Wed, 25 Feb 2026 11:49:18 +0100 Subject: [PATCH 04/19] Enable WBT for CoreCLR. --- eng/pipelines/runtime.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index 9af74955c577b2..2c8dc82291b3e9 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -130,6 +130,7 @@ extends: eq(variables['wasmDarcDependenciesChanged'], true), eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'], true), eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_wasm_coreclr_runtimetests.containsChange'], true), + eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_wasmbuildtests.containsChange'], true), eq(variables['isRollingBuild'], true)) - template: /eng/pipelines/common/platform-matrix.yml From 0b92d26a7017ae3c88a9fd23c215af193251fb65 Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz Date: Wed, 25 Feb 2026 14:19:27 +0100 Subject: [PATCH 05/19] Remove TMP changes. --- eng/pipelines/global-build.yml | 1 - eng/pipelines/runtime-linker-tests.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/eng/pipelines/global-build.yml b/eng/pipelines/global-build.yml index de0401ce832001..f1a62719914144 100644 --- a/eng/pipelines/global-build.yml +++ b/eng/pipelines/global-build.yml @@ -23,7 +23,6 @@ pr: - eng/pipelines/installer/*.* - PATENTS.TXT - THIRD-PARTY-NOTICES.TXT - - src/mono/wasm/** # TEMPORARILY DISABLED for WBT dev loop variables: - template: /eng/pipelines/common/variables.yml diff --git a/eng/pipelines/runtime-linker-tests.yml b/eng/pipelines/runtime-linker-tests.yml index bae89c32b521c7..e5fe67fbc0b595 100644 --- a/eng/pipelines/runtime-linker-tests.yml +++ b/eng/pipelines/runtime-linker-tests.yml @@ -20,7 +20,6 @@ trigger: - THIRD-PARTY-NOTICES.TXT - eng/pipelines/performance/* - eng/testing/performance/* - - src/mono/wasm/** # TEMPORARILY DISABLED for WBT dev loop schedules: - cron: "0 7,19 * * *" # run at 7:00 and 19:00 (UTC) which is 23:00 and 11:00 (PST). From 3bc6c76387b342b0071da7c8d1adceeeab5da2f0 Mon Sep 17 00:00:00 2001 From: pavelsavara Date: Wed, 25 Feb 2026 17:35:28 +0100 Subject: [PATCH 06/19] job list for coreCLR --- .../scenarios/BuildWasmAppsJobsListCLR.txt | 16 ++++++++++++++++ src/libraries/sendtohelix-browser.targets | 3 ++- src/libraries/sendtohelix-wasm.targets | 11 +++++++++-- 3 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 eng/testing/scenarios/BuildWasmAppsJobsListCLR.txt diff --git a/eng/testing/scenarios/BuildWasmAppsJobsListCLR.txt b/eng/testing/scenarios/BuildWasmAppsJobsListCLR.txt new file mode 100644 index 00000000000000..d352c5e0a380a6 --- /dev/null +++ b/eng/testing/scenarios/BuildWasmAppsJobsListCLR.txt @@ -0,0 +1,16 @@ +Wasm.Build.Tests.AppSettingsTests +Wasm.Build.Tests.DebugLevelTests +Wasm.Build.Tests.DownloadThenInitTests +Wasm.Build.Tests.EnvVariablesTests +Wasm.Build.Tests.FilesToIncludeInFileSystemTests +Wasm.Build.Tests.HttpTests +Wasm.Build.Tests.LazyLoadingTests +Wasm.Build.Tests.LibraryInitializerTests +Wasm.Build.Tests.MaxParallelDownloadsTests +Wasm.Build.Tests.ModuleConfigTests +Wasm.Build.Tests.PreloadingTests +Wasm.Build.Tests.RebuildTests +Wasm.Build.Tests.SatelliteLoadingTests +Wasm.Build.Tests.WasmBuildAppTest +Wasm.Build.Tests.WasmRunOutOfAppBundleTests +Wasm.Build.Tests.WasmTemplateTests \ No newline at end of file diff --git a/src/libraries/sendtohelix-browser.targets b/src/libraries/sendtohelix-browser.targets index 0729da3fb808d7..e71e2f14938a64 100644 --- a/src/libraries/sendtohelix-browser.targets +++ b/src/libraries/sendtohelix-browser.targets @@ -131,7 +131,8 @@ - $(RepositoryEngineeringDir)testing\scenarios\BuildWasmAppsJobsList.txt + $(RepositoryEngineeringDir)testing\scenarios\BuildWasmAppsJobsList.txt + $(RepositoryEngineeringDir)testing\scenarios\BuildWasmAppsJobsListCLR.txt <_XUnitTraitArg Condition="'$(TestUsingWorkloads)' == 'true'">-notrait category=no-workload <_XUnitTraitArg Condition="'$(TestUsingWorkloads)' != 'true'">-trait category=no-workload <_XUnitTraitArg Condition="'$(WasmFingerprintAssets)' == 'false'">$(_XUnitTraitArg) -trait category=no-fingerprinting diff --git a/src/libraries/sendtohelix-wasm.targets b/src/libraries/sendtohelix-wasm.targets index 1533b8600e173b..1160ca6c011aa1 100644 --- a/src/libraries/sendtohelix-wasm.targets +++ b/src/libraries/sendtohelix-wasm.targets @@ -43,13 +43,20 @@ <_BuildWasmAppsPayloadArchive>@(_WasmWorkItem) - + - + + $(_BuildWasmAppsPayloadArchive) + $(EnvVarCommand) "HELIX_XUNIT_ARGS=-class %(Identity)" + $(HelixCommand) + $(_workItemTimeout) + + + $(_BuildWasmAppsPayloadArchive) $(EnvVarCommand) "HELIX_XUNIT_ARGS=-class %(Identity)" $(HelixCommand) From e7f36c49d77d9c6ac7403f1160082a5ad82309d3 Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz Date: Wed, 25 Feb 2026 19:41:46 +0100 Subject: [PATCH 07/19] Fix 0 tests matched on CI. --- src/libraries/sendtohelix-browser.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/sendtohelix-browser.targets b/src/libraries/sendtohelix-browser.targets index e71e2f14938a64..5a06771698e2ff 100644 --- a/src/libraries/sendtohelix-browser.targets +++ b/src/libraries/sendtohelix-browser.targets @@ -137,7 +137,7 @@ <_XUnitTraitArg Condition="'$(TestUsingWorkloads)' != 'true'">-trait category=no-workload <_XUnitTraitArg Condition="'$(WasmFingerprintAssets)' == 'false'">$(_XUnitTraitArg) -trait category=no-fingerprinting <_XUnitTraitArg Condition="'$(WasmBundlerFriendlyBootConfig)' == 'true'">$(_XUnitTraitArg) -trait category=bundler-friendly - <_XUnitTraitArg Condition="'$(RuntimeFlavor)' == 'CoreCLR'">-trait category=$(RuntimeFlavor) + <_XUnitTraitArg Condition="'$(RuntimeFlavor)' == 'CoreCLR'">-notrait category=native -notrait category=mono -notrait category=workload From c3c7d7c94947d34485dba5447f22afa20d9106a5 Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz Date: Thu, 26 Feb 2026 08:09:21 +0100 Subject: [PATCH 08/19] Disable until we have lazy loading for coreclr. --- src/mono/wasm/Wasm.Build.Tests/LazyLoadingTests.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mono/wasm/Wasm.Build.Tests/LazyLoadingTests.cs b/src/mono/wasm/Wasm.Build.Tests/LazyLoadingTests.cs index 65011962374221..e3dabab65f0763 100644 --- a/src/mono/wasm/Wasm.Build.Tests/LazyLoadingTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/LazyLoadingTests.cs @@ -14,6 +14,7 @@ namespace Wasm.Build.Tests; +[TestCategory("mono")] public class LazyLoadingTests : WasmTemplateTestsBase { public LazyLoadingTests(ITestOutputHelper output, SharedBuildPerTestClassFixture buildContext) From be5b8a1a71a86ecd279e75b8f65b01b7ac1c8cc1 Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz Date: Thu, 26 Feb 2026 08:21:07 +0100 Subject: [PATCH 09/19] Feedback: better exclusion. --- eng/testing/scenarios/BuildWasmAppsJobsListCLR.txt | 1 - src/mono/wasm/Wasm.Build.Tests/LazyLoadingTests.cs | 1 - 2 files changed, 2 deletions(-) diff --git a/eng/testing/scenarios/BuildWasmAppsJobsListCLR.txt b/eng/testing/scenarios/BuildWasmAppsJobsListCLR.txt index d352c5e0a380a6..f67ceeb12aee91 100644 --- a/eng/testing/scenarios/BuildWasmAppsJobsListCLR.txt +++ b/eng/testing/scenarios/BuildWasmAppsJobsListCLR.txt @@ -4,7 +4,6 @@ Wasm.Build.Tests.DownloadThenInitTests Wasm.Build.Tests.EnvVariablesTests Wasm.Build.Tests.FilesToIncludeInFileSystemTests Wasm.Build.Tests.HttpTests -Wasm.Build.Tests.LazyLoadingTests Wasm.Build.Tests.LibraryInitializerTests Wasm.Build.Tests.MaxParallelDownloadsTests Wasm.Build.Tests.ModuleConfigTests diff --git a/src/mono/wasm/Wasm.Build.Tests/LazyLoadingTests.cs b/src/mono/wasm/Wasm.Build.Tests/LazyLoadingTests.cs index e3dabab65f0763..65011962374221 100644 --- a/src/mono/wasm/Wasm.Build.Tests/LazyLoadingTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/LazyLoadingTests.cs @@ -14,7 +14,6 @@ namespace Wasm.Build.Tests; -[TestCategory("mono")] public class LazyLoadingTests : WasmTemplateTestsBase { public LazyLoadingTests(ITestOutputHelper output, SharedBuildPerTestClassFixture buildContext) From 93ee02b47cc54013735a226c8fa1569043aa8453 Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz Date: Thu, 26 Feb 2026 08:29:15 +0100 Subject: [PATCH 10/19] Re-enable lazy loading. --- eng/testing/scenarios/BuildWasmAppsJobsListCLR.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/testing/scenarios/BuildWasmAppsJobsListCLR.txt b/eng/testing/scenarios/BuildWasmAppsJobsListCLR.txt index f67ceeb12aee91..d352c5e0a380a6 100644 --- a/eng/testing/scenarios/BuildWasmAppsJobsListCLR.txt +++ b/eng/testing/scenarios/BuildWasmAppsJobsListCLR.txt @@ -4,6 +4,7 @@ Wasm.Build.Tests.DownloadThenInitTests Wasm.Build.Tests.EnvVariablesTests Wasm.Build.Tests.FilesToIncludeInFileSystemTests Wasm.Build.Tests.HttpTests +Wasm.Build.Tests.LazyLoadingTests Wasm.Build.Tests.LibraryInitializerTests Wasm.Build.Tests.MaxParallelDownloadsTests Wasm.Build.Tests.ModuleConfigTests From 9165e9c76c5e2b7def39cf07732d44f2fc3f694b Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz Date: Thu, 26 Feb 2026 13:33:01 +0100 Subject: [PATCH 11/19] Fix: timeouts waiting for 'WASM EXIT' message. --- src/mono/wasm/testassets/WasmBasicTestApp/App/wwwroot/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mono/wasm/testassets/WasmBasicTestApp/App/wwwroot/main.js b/src/mono/wasm/testassets/WasmBasicTestApp/App/wwwroot/main.js index d50d7066655cd5..b732e455ce25c4 100644 --- a/src/mono/wasm/testassets/WasmBasicTestApp/App/wwwroot/main.js +++ b/src/mono/wasm/testassets/WasmBasicTestApp/App/wwwroot/main.js @@ -247,7 +247,7 @@ try { case "OutErrOverrideWorks": case "DotnetRun": case "MainWithArgs": - dotnet.run(); + dotnet.runMainAndExit(); break; case "DebugLevelTest": testOutput("WasmDebugLevel: " + config.debugLevel); From e137e32441a56e4d7ba456a2cfc2830758aa5b29 Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz Date: Thu, 26 Feb 2026 13:33:38 +0100 Subject: [PATCH 12/19] Coreclr's message is "Unhandled exception. System.Exception: MessageFromMyException", without "error". --- src/mono/wasm/Wasm.Build.Tests/WasmBuildAppTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mono/wasm/Wasm.Build.Tests/WasmBuildAppTest.cs b/src/mono/wasm/Wasm.Build.Tests/WasmBuildAppTest.cs index 3d199890e9137b..f30281e6ea8f01 100644 --- a/src/mono/wasm/Wasm.Build.Tests/WasmBuildAppTest.cs +++ b/src/mono/wasm/Wasm.Build.Tests/WasmBuildAppTest.cs @@ -105,7 +105,7 @@ public async Task ExceptionFromMain(Configuration config, bool aot) public class TestClass { public static int Main() => throw new Exception("MessageFromMyException"); } - """, config, aot, expectedExitCode: 1, expectedOutput: "Error: MessageFromMyException"); + """, config, aot, expectedExitCode: 1, expectedOutput: "MessageFromMyException"); private static string s_bug49588_ProgramCS = @" using System; From ad337a324521b2f05b03e9c837d5058447403792 Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz Date: Thu, 26 Feb 2026 13:35:19 +0100 Subject: [PATCH 13/19] Block `AppSettingsTests` -> CoreCLR doesn't bundle appsettings files. --- eng/testing/scenarios/BuildWasmAppsJobsListCLR.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/eng/testing/scenarios/BuildWasmAppsJobsListCLR.txt b/eng/testing/scenarios/BuildWasmAppsJobsListCLR.txt index d352c5e0a380a6..6e7dc47dded16c 100644 --- a/eng/testing/scenarios/BuildWasmAppsJobsListCLR.txt +++ b/eng/testing/scenarios/BuildWasmAppsJobsListCLR.txt @@ -1,4 +1,3 @@ -Wasm.Build.Tests.AppSettingsTests Wasm.Build.Tests.DebugLevelTests Wasm.Build.Tests.DownloadThenInitTests Wasm.Build.Tests.EnvVariablesTests From d3e3fd456038d2bf4a8424e2858b42951fdf5623 Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz Date: Thu, 26 Feb 2026 15:03:23 +0100 Subject: [PATCH 14/19] Disable tests we opened issues for. --- eng/testing/scenarios/BuildWasmAppsJobsListCLR.txt | 2 -- src/mono/wasm/Wasm.Build.Tests/LazyLoadingTests.cs | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/eng/testing/scenarios/BuildWasmAppsJobsListCLR.txt b/eng/testing/scenarios/BuildWasmAppsJobsListCLR.txt index 6e7dc47dded16c..1c6ca2e9b8a3c4 100644 --- a/eng/testing/scenarios/BuildWasmAppsJobsListCLR.txt +++ b/eng/testing/scenarios/BuildWasmAppsJobsListCLR.txt @@ -1,10 +1,8 @@ Wasm.Build.Tests.DebugLevelTests -Wasm.Build.Tests.DownloadThenInitTests Wasm.Build.Tests.EnvVariablesTests Wasm.Build.Tests.FilesToIncludeInFileSystemTests Wasm.Build.Tests.HttpTests Wasm.Build.Tests.LazyLoadingTests -Wasm.Build.Tests.LibraryInitializerTests Wasm.Build.Tests.MaxParallelDownloadsTests Wasm.Build.Tests.ModuleConfigTests Wasm.Build.Tests.PreloadingTests diff --git a/src/mono/wasm/Wasm.Build.Tests/LazyLoadingTests.cs b/src/mono/wasm/Wasm.Build.Tests/LazyLoadingTests.cs index 65011962374221..815f2cf89fdde5 100644 --- a/src/mono/wasm/Wasm.Build.Tests/LazyLoadingTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/LazyLoadingTests.cs @@ -29,6 +29,7 @@ public LazyLoadingTests(ITestOutputHelper output, SharedBuildPerTestClassFixture [Theory, TestCategory("no-fingerprinting")] [MemberData(nameof(LoadLazyAssemblyBeforeItIsNeededData))] + [Skip("Fails on CoreCLR: PDBs not loaded for lazy assemblies. See issues.md.", RuntimeFlavor = "CoreCLR")] public async Task LoadLazyAssemblyBeforeItIsNeeded(string lazyLoadingTestExtension, string[] allLazyLoadingTestExtensions) { Configuration config = Configuration.Debug; From 61178e4d1819b4b0bfbe5f7b5aa85973ec61df49 Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz Date: Thu, 26 Feb 2026 15:13:42 +0100 Subject: [PATCH 15/19] Block remaining tests that are logged as issues. --- eng/testing/scenarios/BuildWasmAppsJobsListCLR.txt | 1 - src/mono/wasm/Wasm.Build.Tests/SatelliteLoadingTests.cs | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/eng/testing/scenarios/BuildWasmAppsJobsListCLR.txt b/eng/testing/scenarios/BuildWasmAppsJobsListCLR.txt index 1c6ca2e9b8a3c4..28a2f6ccee94a4 100644 --- a/eng/testing/scenarios/BuildWasmAppsJobsListCLR.txt +++ b/eng/testing/scenarios/BuildWasmAppsJobsListCLR.txt @@ -3,7 +3,6 @@ Wasm.Build.Tests.EnvVariablesTests Wasm.Build.Tests.FilesToIncludeInFileSystemTests Wasm.Build.Tests.HttpTests Wasm.Build.Tests.LazyLoadingTests -Wasm.Build.Tests.MaxParallelDownloadsTests Wasm.Build.Tests.ModuleConfigTests Wasm.Build.Tests.PreloadingTests Wasm.Build.Tests.RebuildTests diff --git a/src/mono/wasm/Wasm.Build.Tests/SatelliteLoadingTests.cs b/src/mono/wasm/Wasm.Build.Tests/SatelliteLoadingTests.cs index c0bc8895e093fb..6c3494bb6562e2 100644 --- a/src/mono/wasm/Wasm.Build.Tests/SatelliteLoadingTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/SatelliteLoadingTests.cs @@ -28,6 +28,7 @@ public SatelliteLoadingTests(ITestOutputHelper output, SharedBuildPerTestClassFi [Theory, TestCategory("no-fingerprinting")] [InlineData(false)] [InlineData(true)] + [Skip("Fails on CoreCLR: Satellite resource loading returns wrong string for es-ES. See issues.md.", RuntimeFlavor = "CoreCLR")] public async Task LoadSatelliteAssembly(bool loadAllSatelliteResources) { Configuration config = Configuration.Debug; @@ -61,6 +62,7 @@ public async Task LoadSatelliteAssembly(bool loadAllSatelliteResources) } [Fact, TestCategory("bundler-friendly")] + [Skip("Fails on CoreCLR: Satellite resource loading returns wrong string for es-ES. See issues.md.", RuntimeFlavor = "CoreCLR")] public async Task LoadSatelliteAssemblyFromReference() { Configuration config = Configuration.Release; From 4532a9dd6bbcbfc6465a26ee05a3b81c3f8eacf4 Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz Date: Thu, 26 Feb 2026 20:37:54 +0100 Subject: [PATCH 16/19] Not skip but conditional theroy/fact. --- src/mono/wasm/Wasm.Build.Tests/BuildTestBase.cs | 1 + src/mono/wasm/Wasm.Build.Tests/Common/BuildEnvironment.cs | 2 ++ src/mono/wasm/Wasm.Build.Tests/LazyLoadingTests.cs | 3 +-- src/mono/wasm/Wasm.Build.Tests/SatelliteLoadingTests.cs | 6 ++---- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mono/wasm/Wasm.Build.Tests/BuildTestBase.cs b/src/mono/wasm/Wasm.Build.Tests/BuildTestBase.cs index 7d7d73ae4d758f..c6393044f3846e 100644 --- a/src/mono/wasm/Wasm.Build.Tests/BuildTestBase.cs +++ b/src/mono/wasm/Wasm.Build.Tests/BuildTestBase.cs @@ -63,6 +63,7 @@ public abstract class BuildTestBase : IClassFixture s_buildEnv.IsWorkload; public static bool IsNotUsingWorkloads => !s_buildEnv.IsWorkload; public static bool IsWorkloadWithMultiThreadingForDefaultFramework => s_buildEnv.IsWorkloadWithMultiThreadingForDefaultFramework; + public static bool IsMonoRuntime => s_buildEnv.IsMonoRuntime; public static bool UseWebcil => s_buildEnv.UseWebcil; public static string GetNuGetConfigPath() => Path.Combine(BuildEnvironment.TestDataPath, "nuget.config"); diff --git a/src/mono/wasm/Wasm.Build.Tests/Common/BuildEnvironment.cs b/src/mono/wasm/Wasm.Build.Tests/Common/BuildEnvironment.cs index ea1918a0c5dbb5..3cb472da567119 100644 --- a/src/mono/wasm/Wasm.Build.Tests/Common/BuildEnvironment.cs +++ b/src/mono/wasm/Wasm.Build.Tests/Common/BuildEnvironment.cs @@ -27,6 +27,7 @@ public class BuildEnvironment public bool UseWebcil { get; init; } public bool IsWorkloadWithMultiThreadingForDefaultFramework { get; init; } + public bool IsMonoRuntime { get; init; } public bool IsRunningOnCI => EnvironmentVariables.IsRunningOnCI; public static readonly string RelativeTestAssetsPath = @"..\testassets\"; @@ -112,6 +113,7 @@ public BuildEnvironment() } UseWebcil = EnvironmentVariables.UseWebcil && EnvironmentVariables.RuntimeFlavor != "CoreCLR"; // TODO-WASM: CoreCLR support for Webcil https://github.com/dotnet/runtime/issues/120248 + IsMonoRuntime = EnvironmentVariables.RuntimeFlavor == "Mono"; if (EnvironmentVariables.BuiltNuGetsPath is null || !Directory.Exists(EnvironmentVariables.BuiltNuGetsPath)) throw new Exception($"Cannot find 'BUILT_NUGETS_PATH={EnvironmentVariables.BuiltNuGetsPath}'"); diff --git a/src/mono/wasm/Wasm.Build.Tests/LazyLoadingTests.cs b/src/mono/wasm/Wasm.Build.Tests/LazyLoadingTests.cs index 815f2cf89fdde5..4fafdce6d184b6 100644 --- a/src/mono/wasm/Wasm.Build.Tests/LazyLoadingTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/LazyLoadingTests.cs @@ -27,9 +27,8 @@ public LazyLoadingTests(ITestOutputHelper output, SharedBuildPerTestClassFixture return data.Select(d => new object[] { d, data }); } - [Theory, TestCategory("no-fingerprinting")] + [ConditionalTheory(typeof(BuildTestBase), nameof(IsMonoRuntime)), TestCategory("no-fingerprinting")] [MemberData(nameof(LoadLazyAssemblyBeforeItIsNeededData))] - [Skip("Fails on CoreCLR: PDBs not loaded for lazy assemblies. See issues.md.", RuntimeFlavor = "CoreCLR")] public async Task LoadLazyAssemblyBeforeItIsNeeded(string lazyLoadingTestExtension, string[] allLazyLoadingTestExtensions) { Configuration config = Configuration.Debug; diff --git a/src/mono/wasm/Wasm.Build.Tests/SatelliteLoadingTests.cs b/src/mono/wasm/Wasm.Build.Tests/SatelliteLoadingTests.cs index 6c3494bb6562e2..10976b41087d3e 100644 --- a/src/mono/wasm/Wasm.Build.Tests/SatelliteLoadingTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/SatelliteLoadingTests.cs @@ -25,10 +25,9 @@ public SatelliteLoadingTests(ITestOutputHelper output, SharedBuildPerTestClassFi { } - [Theory, TestCategory("no-fingerprinting")] + [ConditionalTheory(typeof(BuildTestBase), nameof(IsMonoRuntime)), TestCategory("no-fingerprinting")] [InlineData(false)] [InlineData(true)] - [Skip("Fails on CoreCLR: Satellite resource loading returns wrong string for es-ES. See issues.md.", RuntimeFlavor = "CoreCLR")] public async Task LoadSatelliteAssembly(bool loadAllSatelliteResources) { Configuration config = Configuration.Debug; @@ -61,8 +60,7 @@ public async Task LoadSatelliteAssembly(bool loadAllSatelliteResources) ); } - [Fact, TestCategory("bundler-friendly")] - [Skip("Fails on CoreCLR: Satellite resource loading returns wrong string for es-ES. See issues.md.", RuntimeFlavor = "CoreCLR")] + [ConditionalFact(typeof(BuildTestBase), nameof(IsMonoRuntime)), TestCategory("bundler-friendly")] public async Task LoadSatelliteAssemblyFromReference() { Configuration config = Configuration.Release; From ec03bb878261ba2bcba963bd09cf25bf63630ca9 Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz Date: Thu, 26 Feb 2026 20:42:43 +0100 Subject: [PATCH 17/19] Apply copilot's feedback to fix CI. --- eng/pipelines/common/evaluate-default-paths.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/pipelines/common/evaluate-default-paths.yml b/eng/pipelines/common/evaluate-default-paths.yml index 2510dc7318bd4b..683d7b0b1c5f60 100644 --- a/eng/pipelines/common/evaluate-default-paths.yml +++ b/eng/pipelines/common/evaluate-default-paths.yml @@ -228,6 +228,7 @@ jobs: - eng/download-wasi-sdk.ps1 - eng/testing/scenarios/BuildWasiAppsJobsList.txt - eng/testing/scenarios/BuildWasmAppsJobsList.txt + - eng/testing/scenarios/BuildWasmAppsJobsListCLR.txt - eng/testing/tests.browser.targets - eng/testing/tests.was*.targets - src/mono/nuget/Microsoft.NET.Runtime.WorkloadTesting.Internal/Sdk/WorkloadTesting.Core.targets From ee03e6c7dad5ee8ba98e1ab563204334312eb6a2 Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz Date: Thu, 26 Feb 2026 21:00:01 +0100 Subject: [PATCH 18/19] Rename. --- eng/pipelines/common/evaluate-default-paths.yml | 2 +- ...WasmAppsJobsListCLR.txt => BuildWasmAppsJobsListCoreCLR.txt} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename eng/testing/scenarios/{BuildWasmAppsJobsListCLR.txt => BuildWasmAppsJobsListCoreCLR.txt} (100%) diff --git a/eng/pipelines/common/evaluate-default-paths.yml b/eng/pipelines/common/evaluate-default-paths.yml index 683d7b0b1c5f60..d922c37cc8891e 100644 --- a/eng/pipelines/common/evaluate-default-paths.yml +++ b/eng/pipelines/common/evaluate-default-paths.yml @@ -11,7 +11,7 @@ parameters: eng/testing/WasmRunner* eng/testing/WasiRunner* eng/testing/scenarios/BuildWasiAppsJobsList.txt - eng/testing/scenarios/BuildWasmAppsJobsList.txt + eng/testing/scenarios/BuildWasmAppsJobsListCoreCLR.txt eng/testing/tests.browser.targets eng/testing/tests.was*.targets eng/testing/was*provisioning.targets diff --git a/eng/testing/scenarios/BuildWasmAppsJobsListCLR.txt b/eng/testing/scenarios/BuildWasmAppsJobsListCoreCLR.txt similarity index 100% rename from eng/testing/scenarios/BuildWasmAppsJobsListCLR.txt rename to eng/testing/scenarios/BuildWasmAppsJobsListCoreCLR.txt From 2b1efbe6e3382b3c95987fac17541c23bb0be7ad Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz Date: Thu, 26 Feb 2026 21:01:44 +0100 Subject: [PATCH 19/19] Fix rename... --- eng/pipelines/common/evaluate-default-paths.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/common/evaluate-default-paths.yml b/eng/pipelines/common/evaluate-default-paths.yml index d922c37cc8891e..0a13b83591c84e 100644 --- a/eng/pipelines/common/evaluate-default-paths.yml +++ b/eng/pipelines/common/evaluate-default-paths.yml @@ -11,7 +11,7 @@ parameters: eng/testing/WasmRunner* eng/testing/WasiRunner* eng/testing/scenarios/BuildWasiAppsJobsList.txt - eng/testing/scenarios/BuildWasmAppsJobsListCoreCLR.txt + eng/testing/scenarios/BuildWasmAppsJobsList.txt eng/testing/tests.browser.targets eng/testing/tests.was*.targets eng/testing/was*provisioning.targets @@ -228,7 +228,7 @@ jobs: - eng/download-wasi-sdk.ps1 - eng/testing/scenarios/BuildWasiAppsJobsList.txt - eng/testing/scenarios/BuildWasmAppsJobsList.txt - - eng/testing/scenarios/BuildWasmAppsJobsListCLR.txt + - eng/testing/scenarios/BuildWasmAppsJobsListCoreCLR.txt - eng/testing/tests.browser.targets - eng/testing/tests.was*.targets - src/mono/nuget/Microsoft.NET.Runtime.WorkloadTesting.Internal/Sdk/WorkloadTesting.Core.targets