Skip to content

Commit e5d9a3d

Browse files
Bucket failing Xml trimming test apps (#102449)
* Bucket failing Xml trimming test apps Resolves #101228. * Run XmlSerializer tests
1 parent c7de202 commit e5d9a3d

File tree

5 files changed

+17
-6
lines changed

5 files changed

+17
-6
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
<Project DefaultTargets="Build">
22
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" />
33

4+
<ItemGroup>
5+
<TestConsoleAppSourceFiles Include="XElementCtor.cs">
6+
<!-- Uses XmlSerializer -->
7+
<NativeAotIncompatible>true</NativeAotIncompatible>
8+
</TestConsoleAppSourceFiles>
9+
</ItemGroup>
10+
411
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets))" />
512
</Project>

src/libraries/System.Private.Xml/tests/TrimmingTests/System.Private.Xml.TrimmingTests.proj

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,18 @@
22
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" />
33

44
<ItemGroup>
5-
<TestConsoleAppSourceFiles Include="XmlSchema.Write.cs" />
5+
<TestConsoleAppSourceFiles Include="XmlSchema.Write.cs">
6+
<!-- What the test is testing is RUC and there was a half-hearted attempt to make it safe, but it isn't: https://github.com/dotnet/runtime/blob/5f067ce8b50087e032d13a1b97ae5ec39fc54739/src/libraries/System.Private.Xml/src/System/Xml/Schema/XmlSchema.cs#L134-L137 -->
7+
<NativeAotIncompatible>true</NativeAotIncompatible>
8+
</TestConsoleAppSourceFiles>
69
<TestConsoleAppSourceFiles Include="XmlSerializer.Deserialize.cs" />
710
<TestConsoleAppSourceFiles Include="XmlSerializer.Deserialize.SealerOpt.cs"
811
ExtraTrimmerArgs="--enable-opt sealer" />
912
<TestConsoleAppSourceFiles Include="XmlSerializer.Serialize.cs" />
10-
<TestConsoleAppSourceFiles Include="XslCompiledTransformTests.cs" />
13+
<TestConsoleAppSourceFiles Include="XslCompiledTransformTests.cs">
14+
<!-- https://github.com/dotnet/runtime/issues/84389 -->
15+
<NativeAotIncompatible>true</NativeAotIncompatible>
16+
</TestConsoleAppSourceFiles>
1117
<TestConsoleAppSourceFiles Include="XmlUrlResolverDefaults.Disabled.IsNetworkingEnabledByDefault.cs">
1218
<DisabledFeatureSwitches>System.Xml.XmlResolver.IsNetworkingEnabledByDefault</DisabledFeatureSwitches>
1319
</TestConsoleAppSourceFiles>

src/libraries/System.Private.Xml/tests/TrimmingTests/XmlSerializer.Deserialize.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ internal class Program
1616
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(Response))]
1717
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(DataUpdates))]
1818
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(DataUpdatesDataUpdateInfo))]
19+
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(List<DataUpdatesDataUpdateInfo>))]
1920
public static int Main()
2021
{
2122
using StringReader stringReader = new StringReader(@"<?xml version=""1.0"" encoding=""UTF-8""?>

src/libraries/System.Private.Xml/tests/TrimmingTests/XmlSerializer.Serialize.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ internal class Program
1515
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(Response))]
1616
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(DataUpdates))]
1717
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(DataUpdatesDataUpdateInfo))]
18+
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(List<DataUpdatesDataUpdateInfo>))]
1819
public static int Main()
1920
{
2021
Response obj = new Response();

src/libraries/tests.proj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -651,10 +651,6 @@
651651
<ProjectReference Include="$(MSBuildThisFileDirectory)testPackages\testPackages.proj"
652652
Condition="'$(TestPackages)' == 'true'" />
653653

654-
<!-- We need to go over these disablements: https://github.com/dotnet/runtime/issues/101228 -->
655-
<ProjectExclusions Condition="'$(RunNativeAotTestApps)' == 'true'" Include="$(MSBuildThisFileDirectory)\System.Private.Xml.Linq\tests\TrimmingTests\System.Xml.Linq.TrimmingTests.proj" />
656-
<ProjectExclusions Condition="'$(RunNativeAotTestApps)' == 'true'" Include="$(MSBuildThisFileDirectory)\System.Private.Xml\tests\TrimmingTests\System.Private.Xml.TrimmingTests.proj" />
657-
658654
<TrimmingTestProjects Include="$(MSBuildThisFileDirectory)*\tests\**\*.TrimmingTests.proj"
659655
Exclude="@(ProjectExclusions)"
660656
Condition="'$(TestTrimming)' == 'true' or '$(RunNativeAotTestApps)' == 'true'"

0 commit comments

Comments
 (0)