Skip to content

Commit 9a6d859

Browse files
committedOct 27, 2021
[wasm] Enable source generators tests that were failing due to OOM
- `Microsoft.Extensions.Logging.Generators.Roslyn3.11.Tests` - `Microsoft.Extensions.Logging.Generators.Roslyn4.0.Tests` - `System.Text.Json.SourceGeneration.Roslyn3.11.Unit.Tests` - `System.Text.Json.SourceGeneration.Roslyn4.0.Unit.Tests` - `System.Text.RegularExpressions.Generators.Tests` Some individual ones are disabled due to dotnet#58226, and dotnet#60899 . Fixes dotnet#51961 .
1 parent 8436395 commit 9a6d859

File tree

10 files changed

+15
-9
lines changed

10 files changed

+15
-9
lines changed
 

‎src/libraries/Microsoft.Extensions.Logging.Abstractions/tests/Microsoft.Extensions.Logging.Generators.Tests/Microsoft.Extensions.Logging.Generators.Roslyn3.11.Tests.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<PropertyGroup>
44
<RoslynApiVersion>$(MicrosoftCodeAnalysisCSharpWorkspacesVersion_3_11)</RoslynApiVersion>
5+
<IsHighAotMemoryUsageTest>true</IsHighAotMemoryUsageTest>
56
</PropertyGroup>
67

78
<Import Project="Microsoft.Extensions.Logging.Generators.targets"/>

‎src/libraries/Microsoft.Extensions.Logging.Abstractions/tests/Microsoft.Extensions.Logging.Generators.Tests/Microsoft.Extensions.Logging.Generators.Roslyn4.0.Tests.csproj

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
<PropertyGroup>
44
<RoslynApiVersion>$(MicrosoftCodeAnalysisCSharpWorkspacesVersion)</RoslynApiVersion>
55
<DefineConstants>$(DefineConstants);ROSLYN4_0_OR_GREATER</DefineConstants>
6+
<IsHighAotMemoryUsageTest>true</IsHighAotMemoryUsageTest>
7+
<EmccLinkOptimizationFlag Condition="'$(ContinuousIntegrationBuild)' == 'true'">-O1</EmccLinkOptimizationFlag>
8+
<WasmNativeStrip>false</WasmNativeStrip>
69
</PropertyGroup>
710

811
<Import Project="Microsoft.Extensions.Logging.Generators.targets"/>

‎src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/JsonSourceGeneratorDiagnosticsTests.cs

+4
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ public class IndexViewModel
125125
}
126126

127127
[Fact]
128+
[ActiveIssue("https://github.com/dotnet/runtime/issues/58226", TestPlatforms.Browser)]
128129
public void NameClashSourceGeneration()
129130
{
130131
// Without resolution.
@@ -149,6 +150,7 @@ public void NameClashSourceGeneration()
149150
}
150151

151152
[Fact]
153+
[ActiveIssue("https://github.com/dotnet/runtime/issues/58226", TestPlatforms.Browser)]
152154
public void ProgramsThatDontUseGeneratorCompile()
153155
{
154156
// No STJ usage.
@@ -192,6 +194,7 @@ public static void Main()
192194
}
193195

194196
[Fact]
197+
[ActiveIssue("https://github.com/dotnet/runtime/issues/58226", TestPlatforms.Browser)]
195198
public void WarnOnClassesWithInitOnlyProperties()
196199
{
197200
Compilation compilation = CompilationHelper.CreateCompilationWithInitOnlyProperties();
@@ -206,6 +209,7 @@ public void WarnOnClassesWithInitOnlyProperties()
206209
}
207210

208211
[Fact]
212+
[ActiveIssue("https://github.com/dotnet/runtime/issues/58226", TestPlatforms.Browser)]
209213
public void WarnOnClassesWithInaccessibleJsonIncludeProperties()
210214
{
211215
Compilation compilation = CompilationHelper.CreateCompilationWithInaccessibleJsonIncludeProperties();

‎src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/JsonSourceGeneratorTests.cs

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace System.Text.Json.SourceGeneration.UnitTests
1313
{
14+
[ActiveIssue("https://github.com/dotnet/runtime/issues/58226", TestPlatforms.Browser)]
1415
public class GeneratorTests
1516
{
1617
[Fact]

‎src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/System.Text.Json.SourceGeneration.Roslyn3.11.Unit.Tests.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<RoslynApiVersion>$(MicrosoftCodeAnalysisCSharpWorkspacesVersion_3_11)</RoslynApiVersion>
4+
<IsHighAotMemoryUsageTest>true</IsHighAotMemoryUsageTest>
45
</PropertyGroup>
56

67
<Import Project="System.Text.Json.SourceGeneration.Unit.Tests.targets" />

‎src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/System.Text.Json.SourceGeneration.Roslyn4.0.Unit.Tests.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<PropertyGroup>
33
<RoslynApiVersion>$(MicrosoftCodeAnalysisCSharpWorkspacesVersion)</RoslynApiVersion>
44
<DefineConstants>$(DefineConstants);ROSLYN4_0_OR_GREATER</DefineConstants>
5+
<IsHighAotMemoryUsageTest>true</IsHighAotMemoryUsageTest>
56
</PropertyGroup>
67

78
<Import Project="System.Text.Json.SourceGeneration.Unit.Tests.targets" />

‎src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Unit.Tests/TypeWrapperTests.cs

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ namespace System.Text.Json.SourceGeneration.UnitTests
1414
public class TypeWrapperTests
1515
{
1616
[Fact]
17+
[ActiveIssue("https://github.com/dotnet/runtime/issues/58226", TestPlatforms.Browser)]
1718
public void MetadataLoadFilePathHandle()
1819
{
1920
// Create a MetadataReference from new code.
@@ -79,6 +80,7 @@ public void MySecondMethod() { }
7980
}
8081

8182
[Fact]
83+
[ActiveIssue("https://github.com/dotnet/runtime/issues/58226", TestPlatforms.Browser)]
8284
public void CanGetAttributes()
8385
{
8486
string source = @"

‎src/libraries/System.Text.RegularExpressions/tests/RegexCultureTests.cs

+1
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,7 @@ public static IEnumerable<object[]> Match_In_Different_Cultures_CriticalCases_Te
325325
public static IEnumerable<object[]> Match_In_Different_Cultures_CriticalCases_TestData() =>
326326
Match_In_Different_Cultures_CriticalCases_TestData_For(RegexOptions.None).Union(Match_In_Different_Cultures_CriticalCases_TestData_For(RegexOptions.Compiled));
327327

328+
[ActiveIssue("https://github.com/dotnet/runtime/issues/60899", TestPlatforms.Browser)]
328329
[Theory]
329330
[MemberData(nameof(Match_In_Different_Cultures_TestData))]
330331
public void Match_In_Different_Cultures(string pattern, RegexOptions options, CultureInfo culture, string input, string match_expected)

‎src/libraries/System.Text.RegularExpressions/tests/System.Text.RegularExpressions.Generators.Tests/System.Text.RegularExpressions.Generators.Tests.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<Nullable>enable</Nullable>
88
<!-- xUnit2008 is about regexes and isn't appropriate in the test project for regexes -->
99
<NoWarn>$(NoWarn);xUnit2008</NoWarn>
10+
<IsHighAotMemoryUsageTest>true</IsHighAotMemoryUsageTest>
1011
</PropertyGroup>
1112

1213
<ItemGroup>

‎src/libraries/tests.proj

-9
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
</PropertyGroup>
1515

1616
<ItemGroup Condition="'$(TargetOS)' == 'Browser' and '$(BuildAOTTestsOnHelix)' == 'true' and '$(RunDisabledWasmTests)' != 'true' and '$(RunAOTCompilation)' == 'true'">
17-
<!-- Exceeds VM resources in CI on compilation: https://github.com/dotnet/runtime/issues/51961 -->
18-
<ProjectExclusions Include="$(MSBuildThisFileDirectory)Microsoft.Extensions.Logging.Abstractions\tests\Microsoft.Extensions.Logging.Generators.Tests\Microsoft.Extensions.Logging.Generators.Roslyn3.11.Tests.csproj" />
19-
<ProjectExclusions Include="$(MSBuildThisFileDirectory)Microsoft.Extensions.Logging.Abstractions\tests\Microsoft.Extensions.Logging.Generators.Tests\Microsoft.Extensions.Logging.Generators.Roslyn4.0.Tests.csproj" />
2017
</ItemGroup>
2118

2219
<!-- Projects that don't support code coverage measurement. -->
@@ -223,12 +220,6 @@
223220

224221
<!-- https://github.com/dotnet/runtime/issues/58226 -->
225222
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Runtime.InteropServices\tests\DllImportGenerator.UnitTests\DllImportGenerator.Unit.Tests.csproj" />
226-
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Text.Json\tests\System.Text.Json.SourceGeneration.Unit.Tests\System.Text.Json.SourceGeneration.Roslyn3.11.Unit.Tests.csproj" />
227-
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Text.Json\tests\System.Text.Json.SourceGeneration.Unit.Tests\System.Text.Json.SourceGeneration.Roslyn4.0.Unit.Tests.csproj" />
228-
229-
<!-- hhttps://github.com/dotnet/runtime/issues/60048 -->
230-
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Text.RegularExpressions\tests\System.Text.RegularExpressions.Tests.csproj" />
231-
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Text.RegularExpressions\tests\System.Text.RegularExpressions.Generators.Tests\System.Text.RegularExpressions.Generators.Tests.csproj" />
232223
</ItemGroup>
233224

234225
<!-- Aggressive Trimming related failures -->

0 commit comments

Comments
 (0)