Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
<Project DefaultTargets="Build">
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" />

<ItemGroup>
<TestConsoleAppSourceFiles Include="XElementCtor.cs">
<!-- Uses XmlSerializer -->
<NativeAotIncompatible>true</NativeAotIncompatible>
</TestConsoleAppSourceFiles>
</ItemGroup>

<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets))" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" />

<ItemGroup>
<TestConsoleAppSourceFiles Include="XmlSchema.Write.cs" />
<TestConsoleAppSourceFiles Include="XmlSchema.Write.cs">
<!-- 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 -->
<NativeAotIncompatible>true</NativeAotIncompatible>
</TestConsoleAppSourceFiles>
<TestConsoleAppSourceFiles Include="XmlSerializer.Deserialize.cs" />
<TestConsoleAppSourceFiles Include="XmlSerializer.Deserialize.SealerOpt.cs"
ExtraTrimmerArgs="--enable-opt sealer" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ExtraTrimmerArgs is kind of odd in the context of native AOT. Should this test be disabled too?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sealing is an optimization that native AOT does automatically so it doesn't seem too irrelevant. Native AOT's version should not really be observable.

<TestConsoleAppSourceFiles Include="XmlSerializer.Serialize.cs" />
<TestConsoleAppSourceFiles Include="XslCompiledTransformTests.cs" />
<TestConsoleAppSourceFiles Include="XslCompiledTransformTests.cs">
<!-- https://github.com/dotnet/runtime/issues/84389 -->
<NativeAotIncompatible>true</NativeAotIncompatible>
</TestConsoleAppSourceFiles>
<TestConsoleAppSourceFiles Include="XmlUrlResolverDefaults.Disabled.IsNetworkingEnabledByDefault.cs">
<DisabledFeatureSwitches>System.Xml.XmlResolver.IsNetworkingEnabledByDefault</DisabledFeatureSwitches>
</TestConsoleAppSourceFiles>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ internal class Program
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(Response))]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(DataUpdates))]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(DataUpdatesDataUpdateInfo))]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(List<DataUpdatesDataUpdateInfo>))]
public static int Main()
{
using StringReader stringReader = new StringReader(@"<?xml version=""1.0"" encoding=""UTF-8""?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ internal class Program
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(Response))]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(DataUpdates))]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(DataUpdatesDataUpdateInfo))]
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(List<DataUpdatesDataUpdateInfo>))]
public static int Main()
{
Response obj = new Response();
Expand Down
4 changes: 0 additions & 4 deletions src/libraries/tests.proj
Original file line number Diff line number Diff line change
Expand Up @@ -651,10 +651,6 @@
<ProjectReference Include="$(MSBuildThisFileDirectory)testPackages\testPackages.proj"
Condition="'$(TestPackages)' == 'true'" />

<!-- We need to go over these disablements: https://github.com/dotnet/runtime/issues/101228 -->
<ProjectExclusions Condition="'$(RunNativeAotTestApps)' == 'true'" Include="$(MSBuildThisFileDirectory)\System.Private.Xml.Linq\tests\TrimmingTests\System.Xml.Linq.TrimmingTests.proj" />
<ProjectExclusions Condition="'$(RunNativeAotTestApps)' == 'true'" Include="$(MSBuildThisFileDirectory)\System.Private.Xml\tests\TrimmingTests\System.Private.Xml.TrimmingTests.proj" />

<TrimmingTestProjects Include="$(MSBuildThisFileDirectory)*\tests\**\*.TrimmingTests.proj"
Exclude="@(ProjectExclusions)"
Condition="'$(TestTrimming)' == 'true' or '$(RunNativeAotTestApps)' == 'true'"
Expand Down