diff --git a/eng/testing/WasmRunnerAOTTemplate.sh b/eng/testing/WasmRunnerAOTTemplate.sh
new file mode 100644
index 00000000000000..6922b550551b8b
--- /dev/null
+++ b/eng/testing/WasmRunnerAOTTemplate.sh
@@ -0,0 +1,57 @@
+#!/usr/bin/env bash
+
+EXECUTION_DIR=$(dirname $0)
+SCENARIO=$3
+
+cd $EXECUTION_DIR
+
+if [ -z "$HELIX_WORKITEM_UPLOAD_ROOT" ]; then
+ XHARNESS_OUT="$EXECUTION_DIR/xharness-output"
+else
+ XHARNESS_OUT="$HELIX_WORKITEM_UPLOAD_ROOT/xharness-output"
+fi
+
+if [ ! -z "$XHARNESS_CLI_PATH" ]; then
+ # When running in CI, we only have the .NET runtime available
+ # We need to call the XHarness CLI DLL directly via dotnet exec
+ HARNESS_RUNNER="dotnet exec $XHARNESS_CLI_PATH"
+else
+ HARNESS_RUNNER="dotnet xharness"
+fi
+
+if [ "$SCENARIO" == "WasmTestOnBrowser" ]; then
+ XHARNESS_COMMAND="test-browser"
+elif [ -z "$XHARNESS_COMMAND" ]; then
+ XHARNESS_COMMAND="test"
+fi
+
+function _buildAOTFunc()
+{
+ local projectFile=$1
+ local binLog=$2
+ shift 2
+
+ time dotnet msbuild $projectFile /bl:$binLog $*
+ local buildExitCode=$?
+
+ echo "\n** Performance summary for the build **\n"
+ dotnet msbuild $binLog -clp:PerformanceSummary -v:q -nologo
+ if [[ "$(uname -s)" == "Linux" && $buildExitCode -ne 0 ]]; then
+ echo "\nLast few messages from dmesg:\n"
+ dmesg | tail -n 20
+ fi
+
+ echo
+ echo
+
+ return $buildExitCode
+}
+
+# RunCommands defined in tests.mobile.targets
+[[RunCommands]]
+
+_exitCode=$?
+
+echo "XHarness artifacts: $XHARNESS_OUT"
+
+exit $_exitCode
diff --git a/eng/testing/tests.targets b/eng/testing/tests.targets
index c59ecf95147353..1d14775dadd90b 100644
--- a/eng/testing/tests.targets
+++ b/eng/testing/tests.targets
@@ -5,7 +5,8 @@
AppleHelixRunnerTemplate.sh
AppleRunnerTemplate.sh
AndroidRunnerTemplate.sh
- WasmRunnerTemplate.sh
+ WasmRunnerAOTTemplate.sh
+ WasmRunnerTemplate.sh
WasmRunnerTemplate.cmd
diff --git a/eng/testing/tests.wasm.targets b/eng/testing/tests.wasm.targets
index f68b4f9889a793..00aa7b19f1701f 100644
--- a/eng/testing/tests.wasm.targets
+++ b/eng/testing/tests.wasm.targets
@@ -38,12 +38,12 @@
- <_AOTBuildCommand>dotnet msbuild publish/ProxyProjectForAOTOnHelix.proj /bl:$XHARNESS_OUT/AOTBuild.binlog
+ <_AOTBuildCommand>_buildAOTFunc publish/ProxyProjectForAOTOnHelix.proj $XHARNESS_OUT/AOTBuild.binlog
<_AOTBuildCommand Condition="'$(ContinuousIntegrationBuild)' != 'true'">$(_AOTBuildCommand) /p:RuntimeSrcDir=$(RepoRoot) /p:RuntimeConfig=$(Configuration)
- <_AOTBuildCommand>$(_AOTBuildCommand) /p:RunAOTCompilation=$(RunAOTCompilation) /p:EmccLinkOptimizationFlag='-Oz -Wl%252C-O0 -Wl%252C-lto-O0'
+ <_AOTBuildCommand>$(_AOTBuildCommand) /p:RunAOTCompilation=$(RunAOTCompilation)
<_AOTBuildCommand>$(_AOTBuildCommand) && cd wasm_build/AppBundle
$(_AOTBuildCommand)
@@ -87,9 +87,15 @@
AssemblyFile="$(WasmBuildTasksAssemblyPath)" />
+
+ true
+ -O2
+
+
<_MainAssemblyPath Condition="'%(WasmAssembliesToBundle.FileName)' == $(AssemblyName) and '%(WasmAssembliesToBundle.Extension)' == '.dll'">%(WasmAssembliesToBundle.Identity)
$([System.IO.Path]::ChangeExtension($(_MainAssemblyPath), '.runtimeconfig.json'))
+ -Oz -Wl%252C-O0 -Wl%252C-lto-O0
@@ -111,15 +117,20 @@
- <_WasmPropertyNames Include="InvariantGlobalization" />
<_WasmPropertyNames Include="AOTMode" />
- <_WasmPropertyNames Include="WasmDebugLevel" />
+ <_WasmPropertyNames Include="AssemblyName" />
+ <_WasmPropertyNames Include="DisableParallelAot" />
+ <_WasmPropertyNames Include="DisableParallelEmccCompile" />
+ <_WasmPropertyNames Include="EmccCompileOptimizationFlag" />
+ <_WasmPropertyNames Include="EmccLinkOptimizationFlag" />
+ <_WasmPropertyNames Include="IncludeSatelliteAssembliesInVFS" />
+ <_WasmPropertyNames Include="InvariantGlobalization" />
<_WasmPropertyNames Include="WasmBuildNative" />
- <_WasmPropertyNames Include="_WasmDevel" />
- <_WasmPropertyNames Include="WasmLinkIcalls" />
+ <_WasmPropertyNames Include="WasmDebugLevel" />
<_WasmPropertyNames Include="WasmDedup" />
- <_WasmPropertyNames Include="IncludeSatelliteAssembliesInVFS" />
- <_WasmPropertyNames Include="AssemblyName" />
+ <_WasmPropertyNames Include="WasmLinkIcalls" />
+ <_WasmPropertyNames Include="WasmNativeStrip" />
+ <_WasmPropertyNames Include="_WasmDevel" />
<_WasmPropertiesToPass
Include="$(%(_WasmPropertyNames.Identity))"
@@ -159,7 +170,7 @@
-1
-
+
<_SatelliteAssemblies Include="$(PublishDir)*\*.resources.dll" />
<_SatelliteAssemblies CultureName="$([System.IO.Directory]::GetParent('%(Identity)').Name)" />
<_SatelliteAssemblies TargetPath="%(CultureName)\%(FileName)%(Extension)" />
diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/tests/Microsoft.Extensions.Logging.Generators.Tests/Microsoft.Extensions.Logging.Generators.Roslyn3.11.Tests.csproj b/src/libraries/Microsoft.Extensions.Logging.Abstractions/tests/Microsoft.Extensions.Logging.Generators.Tests/Microsoft.Extensions.Logging.Generators.Roslyn3.11.Tests.csproj
index bb4f032a25357c..e3ac6c40c52f26 100644
--- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/tests/Microsoft.Extensions.Logging.Generators.Tests/Microsoft.Extensions.Logging.Generators.Roslyn3.11.Tests.csproj
+++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/tests/Microsoft.Extensions.Logging.Generators.Tests/Microsoft.Extensions.Logging.Generators.Roslyn3.11.Tests.csproj
@@ -2,6 +2,7 @@
$(MicrosoftCodeAnalysisCSharpWorkspacesVersion_3_11)
+ true
diff --git a/src/libraries/Microsoft.Extensions.Logging.Abstractions/tests/Microsoft.Extensions.Logging.Generators.Tests/Microsoft.Extensions.Logging.Generators.Roslyn4.0.Tests.csproj b/src/libraries/Microsoft.Extensions.Logging.Abstractions/tests/Microsoft.Extensions.Logging.Generators.Tests/Microsoft.Extensions.Logging.Generators.Roslyn4.0.Tests.csproj
index 1c826c0b30a3f2..074da27c19e029 100644
--- a/src/libraries/Microsoft.Extensions.Logging.Abstractions/tests/Microsoft.Extensions.Logging.Generators.Tests/Microsoft.Extensions.Logging.Generators.Roslyn4.0.Tests.csproj
+++ b/src/libraries/Microsoft.Extensions.Logging.Abstractions/tests/Microsoft.Extensions.Logging.Generators.Tests/Microsoft.Extensions.Logging.Generators.Roslyn4.0.Tests.csproj
@@ -3,6 +3,9 @@
$(MicrosoftCodeAnalysisCSharpWorkspacesVersion)
$(DefineConstants);ROSLYN4_0_OR_GREATER
+ true
+ -O1
+ false
diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/JsonSourceGeneratorDiagnosticsTests.cs b/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/JsonSourceGeneratorDiagnosticsTests.cs
index 470c83408c2c18..a25196a34fe074 100644
--- a/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/JsonSourceGeneratorDiagnosticsTests.cs
+++ b/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/JsonSourceGeneratorDiagnosticsTests.cs
@@ -125,6 +125,7 @@ public class IndexViewModel
}
[Fact]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/58226", TestPlatforms.Browser)]
public void NameClashSourceGeneration()
{
// Without resolution.
@@ -149,6 +150,7 @@ public void NameClashSourceGeneration()
}
[Fact]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/58226", TestPlatforms.Browser)]
public void ProgramsThatDontUseGeneratorCompile()
{
// No STJ usage.
@@ -192,6 +194,7 @@ public static void Main()
}
[Fact]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/58226", TestPlatforms.Browser)]
public void WarnOnClassesWithInitOnlyProperties()
{
Compilation compilation = CompilationHelper.CreateCompilationWithInitOnlyProperties();
@@ -206,6 +209,7 @@ public void WarnOnClassesWithInitOnlyProperties()
}
[Fact]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/58226", TestPlatforms.Browser)]
public void WarnOnClassesWithInaccessibleJsonIncludeProperties()
{
Compilation compilation = CompilationHelper.CreateCompilationWithInaccessibleJsonIncludeProperties();
diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/JsonSourceGeneratorTests.cs b/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/JsonSourceGeneratorTests.cs
index 105dc91af17b38..08519e16fde39b 100644
--- a/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/JsonSourceGeneratorTests.cs
+++ b/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/JsonSourceGeneratorTests.cs
@@ -11,6 +11,7 @@
namespace System.Text.Json.SourceGeneration.UnitTests
{
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/58226", TestPlatforms.Browser)]
public class GeneratorTests
{
[Fact]
diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/System.Text.Json.SourceGeneration.Roslyn3.11.Unit.Tests.csproj b/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/System.Text.Json.SourceGeneration.Roslyn3.11.Unit.Tests.csproj
index 5a99fa881f97f2..af08a0ae33acce 100644
--- a/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/System.Text.Json.SourceGeneration.Roslyn3.11.Unit.Tests.csproj
+++ b/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/System.Text.Json.SourceGeneration.Roslyn3.11.Unit.Tests.csproj
@@ -1,6 +1,7 @@
$(MicrosoftCodeAnalysisCSharpWorkspacesVersion_3_11)
+ true
diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/System.Text.Json.SourceGeneration.Roslyn4.0.Unit.Tests.csproj b/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/System.Text.Json.SourceGeneration.Roslyn4.0.Unit.Tests.csproj
index 073d9ca3126c72..709f667c267a24 100644
--- a/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/System.Text.Json.SourceGeneration.Roslyn4.0.Unit.Tests.csproj
+++ b/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/System.Text.Json.SourceGeneration.Roslyn4.0.Unit.Tests.csproj
@@ -2,6 +2,7 @@
$(MicrosoftCodeAnalysisCSharpWorkspacesVersion)
$(DefineConstants);ROSLYN4_0_OR_GREATER
+ true
diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/TypeWrapperTests.cs b/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/TypeWrapperTests.cs
index 24a86137bc175c..ca6d9dce1bd1ee 100644
--- a/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/TypeWrapperTests.cs
+++ b/src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/TypeWrapperTests.cs
@@ -14,6 +14,7 @@ namespace System.Text.Json.SourceGeneration.UnitTests
public class TypeWrapperTests
{
[Fact]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/58226", TestPlatforms.Browser)]
public void MetadataLoadFilePathHandle()
{
// Create a MetadataReference from new code.
@@ -79,6 +80,7 @@ public void MySecondMethod() { }
}
[Fact]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/58226", TestPlatforms.Browser)]
public void CanGetAttributes()
{
string source = @"
diff --git a/src/libraries/System.Text.RegularExpressions/tests/RegexCultureTests.cs b/src/libraries/System.Text.RegularExpressions/tests/RegexCultureTests.cs
index ac0bc82bff7a79..adcde90c42b970 100644
--- a/src/libraries/System.Text.RegularExpressions/tests/RegexCultureTests.cs
+++ b/src/libraries/System.Text.RegularExpressions/tests/RegexCultureTests.cs
@@ -325,6 +325,7 @@ public static IEnumerable