Skip to content

Commit 6e34b5d

Browse files
Disable S.T.Json tests on NativeAOT (#87203)
We're getting OOM-killed in the CI. See #87078. I'm also changing how we do warning suppressions. We still need to suppress most of AOT warnings because xUnit/tests are not warning clean, but the warning about generic recursion is critical for the product and should fail the build.
1 parent 20ca966 commit 6e34b5d

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

eng/testing/tests.singlefile.targets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
<IlcSdkPath>$(CoreCLRAotSdkDir)</IlcSdkPath>
3030
<IlcFrameworkPath>$(NetCoreAppCurrentTestHostSharedFrameworkPath)</IlcFrameworkPath>
3131
<IlcFrameworkNativePath>$(NetCoreAppCurrentTestHostSharedFrameworkPath)</IlcFrameworkNativePath>
32-
<NoWarn>$(NoWarn);IL1005;IL2105;IL3000;IL3001;IL3002;IL3003</NoWarn>
32+
<NoWarn>$(NoWarn);IL1005;IL2105;IL3000;IL3001;IL3002;IL3003;IL3050;IL3051;IL3052;IL3053</NoWarn>
3333
<TrimMode>partial</TrimMode>
3434
<SuppressTrimAnalysisWarnings>true</SuppressTrimAnalysisWarnings>
35-
<SuppressAotAnalysisWarnings>true</SuppressAotAnalysisWarnings>
35+
<TrimmerSingleWarn>false</TrimmerSingleWarn>
3636
</PropertyGroup>
3737

3838
<!-- Needed for the amd64 -> amd64 musl cross-build to pass the target flag. -->

src/libraries/Microsoft.Extensions.DependencyModel/tests/Microsoft.Extensions.DependencyModel.Tests.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
<DefaultItemExcludes>$(DefaultItemExcludes);nonentrypointassembly\*</DefaultItemExcludes>
77
<!-- Needed for .NET Framework. -->
88
<GenerateDependencyFile>true</GenerateDependencyFile>
9+
10+
<!-- FluentAssertions library has a generic recursion and the warning breaks NativeAOT build -->
11+
<NoWarn>$(NoWarn);IL3054</NoWarn>
912
</PropertyGroup>
1013

1114
<ItemGroup>

src/libraries/tests.proj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,10 @@
412412
</ItemGroup>
413413

414414
<ItemGroup Condition="'$(TestNativeAot)' == 'true' and '$(RunDisabledNativeAotTests)' != 'true'">
415+
<!-- https://github.com/dotnet/runtime/issues/87078 -->
416+
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Text.Json\tests\System.Text.Json.SourceGeneration.Tests\System.Text.Json.SourceGeneration.Roslyn3.11.Tests.csproj" />
417+
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Text.Json\tests\System.Text.Json.SourceGeneration.Tests\System.Text.Json.SourceGeneration.Roslyn4.4.Tests.csproj" />
418+
415419
<!-- https://github.com/dotnet/runtime/issues/83167 -->
416420
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Numerics.Vectors\tests\System.Numerics.Vectors.Tests.csproj"
417421
Condition="'$(TargetArchitecture)' == 'arm64'" />

0 commit comments

Comments
 (0)