Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[infra] Enable trimming on Helix for Apple mobile #96169

Closed
wants to merge 99 commits into from
Closed
Show file tree
Hide file tree
Changes from 96 commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
8e849e4
REVERT: Disable automatic CI runs
ivanpovazan Sep 26, 2023
4c33ec3
REVERT: Disable NativeAOT jobs
ivanpovazan Sep 26, 2023
ca292e8
Enable trimming for libraries and functional tests
ivanpovazan Sep 26, 2023
60538ed
REVERT: Disable runtime tests for now
ivanpovazan Sep 27, 2023
2fc0152
REVERT: Disable tvos lane
ivanpovazan Sep 27, 2023
cddf7cd
Disable building tests on Helix
ivanpovazan Sep 27, 2023
4654eed
Try to trim on helix
Sep 27, 2023
d436732
Forgot the extraHelixArgs
Sep 27, 2023
44dd345
Merge remote-tracking branch 'upstream/main' into mono-trim-tests
Sep 27, 2023
b5e2ebf
Publish / link on build machine and build app on helix
Sep 29, 2023
6a297c2
Throw tvos back in
Sep 29, 2023
136e440
Get paths right for local helix test build
Oct 3, 2023
4315827
Merge remote-tracking branch 'upstream/main' into mono-trim-tests
Oct 9, 2023
629ef00
Merge remote-tracking branch 'upstream/main' into trim-ios-on-helix
Dec 18, 2023
bb3ae78
[infra] Add illink targets to trim app bundles on helix
kotlarmilos Dec 19, 2023
cfcf0e3
[infra] Fix ILLink path on Helix
kotlarmilos Dec 19, 2023
af197a0
[infra] Fix ILLink path on Helix
kotlarmilos Dec 19, 2023
1285fb6
[infra] Fix ILLink path on Helix
kotlarmilos Dec 19, 2023
bcfc0e5
[infra] Fix ILLink path on Helix
kotlarmilos Dec 19, 2023
6a821e1
[infra] Fix TrimmerRootAssembly item group
kotlarmilos Dec 19, 2023
79a4e59
[tests] Trim library tests on devices
kotlarmilos Dec 19, 2023
df1bfaa
[tests] Trim library tests on devices
kotlarmilos Dec 19, 2023
97f1228
[tests]
kotlarmilos Dec 19, 2023
da98a41
[tests] Fix failing tests
kotlarmilos Dec 20, 2023
c713e68
[tests] Fix failing tests
kotlarmilos Dec 20, 2023
259df19
[tests] Remove redundant ILLink descriptors
kotlarmilos Dec 21, 2023
8be17ac
[tests] Include ILLink descriptors
kotlarmilos Dec 21, 2023
f21cdbc
[tests] Copy TrimmerRootDescriptor if exist
kotlarmilos Dec 22, 2023
042c25b
[tests] Remove unused item group
kotlarmilos Dec 22, 2023
66a2431
Don't trim System.Linq.dll
kotlarmilos Dec 25, 2023
65d048e
[tests] Disable failing test
kotlarmilos Dec 26, 2023
8a7b61f
Fix typo in test platform in ConfigurationBinderTests.cs
kotlarmilos Dec 26, 2023
83a6870
Add assemblies to TrimmerRootAssembly list
kotlarmilos Dec 26, 2023
1aa1d51
Update IsDebuggerTypeProxyAttributeSupported condition
kotlarmilos Dec 27, 2023
f307ce2
[tests] Add reference paths to ILLink task
kotlarmilos Dec 28, 2023
443bcbd
[tests] Remove rooted assemblies from AppleBuild.LocalBuild.targets
kotlarmilos Dec 29, 2023
3444ce5
Add ILLink.Descriptors.xml files for System.Diagnostics.FileVersionIn…
kotlarmilos Jan 5, 2024
cf79425
Cleaning up System.Runtime.Tests
ivanpovazan Jan 16, 2024
16ff8b0
Merge branch 'main' into trim-ios-on-helix
ivanpovazan Jan 16, 2024
2eb9126
Do not use NativeAOT settings when building for Mono on helix
ivanpovazan Jan 17, 2024
ce8b1a9
Recreate the state of RuntimeConfigurationOption for trimming on helix
ivanpovazan Jan 17, 2024
8ce679c
[infra] Revert RuntimeConfigurationOption and IsDebuggerTypeProxyAttr…
kotlarmilos Jan 18, 2024
057d414
Merge branch 'trim-ios-on-helix' of https://github.com/kotlarmilos/ru…
kotlarmilos Jan 18, 2024
42d5a6b
Disabling crashing System.Linq tests not related to trimming
ivanpovazan Jan 19, 2024
a679363
[tests] Disable System.Runtime.Serialization.* tests
kotlarmilos Jan 26, 2024
1459ab9
Merge branch 'main' into trim-ios-on-helix
kotlarmilos Jan 26, 2024
ffc6d6c
[tests] Disable runtime.yml jobs
kotlarmilos Jan 26, 2024
2482201
[infra] Move ioslike jobs to runtime.yml
kotlarmilos Jan 29, 2024
8e3b087
[tests] Run all library tests on Apple mobile
kotlarmilos Jan 29, 2024
46fc294
[tests] Disable non-compatible trim tests
kotlarmilos Jan 30, 2024
0f00880
Merge branch 'main' into trim-ios-on-helix
kotlarmilos Jan 30, 2024
eb92999
[tests] Add nameof(PlatformDetection.IsMonoRuntime) as a condition to…
kotlarmilos Feb 2, 2024
ec1313c
Enable runtime.yml tests
kotlarmilos Feb 2, 2024
682e42d
Merge branch 'dotnet:main' into trim-ios-on-helix
kotlarmilos Feb 2, 2024
28243cc
Disable runtime.yml jobs
kotlarmilos Feb 2, 2024
0907644
[infra] Pass additional feature switches to test trimming
kotlarmilos Feb 7, 2024
bd31109
[infra] Pass additional feature switches to test trimming
kotlarmilos Feb 8, 2024
af8bfac
[infra] Fix conditional fact attribute
kotlarmilos Feb 8, 2024
166af0d
Enable runtime.yml jobs
kotlarmilos Feb 9, 2024
1434a46
Merge branch 'dotnet:main' into trim-ios-on-helix
kotlarmilos Feb 9, 2024
835bffe
Disable runtime.yml jobs
kotlarmilos Feb 9, 2024
4d3e329
Fix System.IO.FileSystem.Tests
ivanpovazan Feb 12, 2024
3df484e
Including full path for TrimmerRootAssemblies breaks when building on…
ivanpovazan Feb 12, 2024
e486f8c
[tests] Disable failing tests
kotlarmilos Feb 19, 2024
bd73730
Add TrimmerRootDescriptor to System.Configuration.ConfigurationManage…
kotlarmilos Feb 20, 2024
b2f77b5
Add System.Configuration.AppSettingsSection to ILLink.Descriptors.xml
kotlarmilos Feb 20, 2024
c06337d
Update ILLink descriptors with System.Configuration types
kotlarmilos Feb 20, 2024
08632d4
Add new types to ILLink.Descriptors.xml
kotlarmilos Feb 20, 2024
e78e3a4
Add new types to ILLink.Descriptors.xml
kotlarmilos Feb 21, 2024
21c4423
Add missing types to ILLink.Descriptors.xml
kotlarmilos Feb 21, 2024
66ebc16
Enable runtime.yml jobs
kotlarmilos Mar 7, 2024
d808a90
Merge branch 'main' into trim-ios-on-helix
kotlarmilos Mar 7, 2024
39b2794
Disable runtime.yml jobs
kotlarmilos Mar 7, 2024
50140e6
Remove duplicates in ILLink.Descriptors.xml
kotlarmilos Mar 7, 2024
09b8a92
Fix trimming-related failures
kotlarmilos Mar 7, 2024
eb688cf
Fix trimming-related failures
kotlarmilos Mar 8, 2024
ee90b19
Add TrimmerRootAssembly for System.Text.Json.Tests
kotlarmilos Mar 8, 2024
dc45f28
Update TrimmerRootAssembly for System.Text.Json.Tests
kotlarmilos Mar 8, 2024
0ac15ec
Fix trimming-related failures
kotlarmilos Mar 8, 2024
7a3f771
Enable reflection and preserve required assemblies in System.Text.Jso…
kotlarmilos Mar 11, 2024
cf1adc6
Revert temporary changes
kotlarmilos Mar 11, 2024
81c5563
Update JsonSerializerIsReflectionEnabledByDefault condition
kotlarmilos Mar 12, 2024
6c17bce
Fix ioslike extra platforms config
kotlarmilos Mar 12, 2024
88fadfb
Add ILLink.Descriptors.xml files for linker configuration
kotlarmilos Mar 12, 2024
f374de8
Remove ActiveIssue attribute for resolved issues
kotlarmilos Mar 12, 2024
9dade72
Disable ShimsHaveOnlyTypeForwards test as forwarded types are not tri…
kotlarmilos Mar 12, 2024
ab8b60f
Remove unknown libraries from ILLink.Descriptors.xml
kotlarmilos Mar 12, 2024
a60e037
Remove unknown types from ILLink.Descriptors.xml
kotlarmilos Mar 13, 2024
c8d5633
Fix trimming issues on non-Apple mobile platforms
kotlarmilos Mar 13, 2024
ce10bb2
Fix trimming failures
kotlarmilos Mar 15, 2024
3441932
Add assemblies to ILLink.Descriptors.xml
kotlarmilos Mar 20, 2024
4e942dd
Disable failing tests
kotlarmilos Mar 21, 2024
c6caaa5
Merge branch 'main' into trim-ios-on-helix
kotlarmilos Mar 27, 2024
fda7a6b
Add iOS-specific illink descriptor
kotlarmilos Mar 28, 2024
94ba5f4
Merge branch 'dotnet:main' into trim-ios-on-helix
kotlarmilos Mar 28, 2024
f2cc82e
Revert postBuildSteps changes
kotlarmilos Apr 2, 2024
ff3b586
Merge branch 'main' into trim-ios-on-helix
kotlarmilos Apr 3, 2024
7758009
Refactor proxy project to remove redundant props and items
kotlarmilos Apr 3, 2024
d1377de
Exclude _RemovedManagedAssembly from AppleAssembliesToBundle
kotlarmilos Apr 3, 2024
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
Expand Up @@ -35,7 +35,7 @@ jobs:
testGroup: innerloop
nameSuffix: AllSubsets_Mono
isExtraPlatforms: ${{ parameters.isExtraPlatformsBuild }}
buildArgs: -s mono+libs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:RunAOTCompilation=true $(_runSmokeTestsOnlyArg) /p:BuildTestsOnHelix=true /p:EnableAdditionalTimezoneChecks=true /p:UsePortableRuntimePack=true /p:BuildDarwinFrameworks=true /p:IsManualOrRollingBuild=true
buildArgs: -s mono+libs+libs.tests -c $(_BuildConfig) /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:RunAOTCompilation=true $(_runSmokeTestsOnlyArg) /p:EnableAdditionalTimezoneChecks=true /p:EnableAggressiveTrimming=true /p:UsePortableRuntimePack=true /p:BuildDarwinFrameworks=true /p:IsManualOrRollingBuild=true /p:BuildTestsOnHelix=true
timeoutInMinutes: 480
# extra steps, run tests
postBuildSteps:
Expand Down
48 changes: 36 additions & 12 deletions eng/testing/tests.ioslike.targets
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<!-- running aot-helix tests locally, so we can test with the same project file as CI -->
<_AOTBuildCommand Condition="'$(ContinuousIntegrationBuild)' != 'true'">$(_AOTBuildCommand) /p:RuntimeSrcDir=$(RepoRoot) /p:RuntimeConfig=$(Configuration)</_AOTBuildCommand>
<!-- The command below sets default properties for runtime and library tests -->
<_AOTBuildCommand>$(_AOTBuildCommand) /p:XHARNESS_EXECUTION_DIR=&quot;$XHARNESS_EXECUTION_DIR&quot; /p:RunAOTCompilation=$(RunAOTCompilation) /p:UseNativeAOTRuntime=$(UseNativeAOTRuntime) /p:TargetOS=$(TargetOS) /p:TargetArchitecture=$(TargetArchitecture) /p:MonoForceInterpreter=$(MonoForceInterpreter) /p:MonoEnableLLVM=true /p:DevTeamProvisioning=$(DevTeamProvisioning) /p:UsePortableRuntimePack=true /p:Configuration=$(Configuration)</_AOTBuildCommand>
<_AOTBuildCommand>$(_AOTBuildCommand) /p:XHARNESS_EXECUTION_DIR=&quot;$XHARNESS_EXECUTION_DIR&quot; /p:EnableAggressiveTrimming=$(EnableAggressiveTrimming) /p:UsePortableRuntimePack=$(UsePortableRuntimePack) /p:RunAOTCompilation=$(RunAOTCompilation) /p:UseNativeAOTRuntime=$(UseNativeAOTRuntime) /p:TargetOS=$(TargetOS) /p:TargetArchitecture=$(TargetArchitecture) /p:MonoForceInterpreter=$(MonoForceInterpreter) /p:MonoEnableLLVM=true /p:DevTeamProvisioning=$(DevTeamProvisioning) /p:Configuration=$(Configuration)</_AOTBuildCommand>
Copy link
Member

Choose a reason for hiding this comment

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

Which scenarios would we not want to use the portable runtime pack?

Copy link
Member Author

Choose a reason for hiding this comment

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

We can revert this change. We were testing different options for trimming on helix and one of them was to trim on build machines.

<_AOTBuildCommand Condition="'$(NativeLib)' != ''">$(_AOTBuildCommand) /p:NativeLib=$(NativeLib) /p:BundlesResources=$(BundlesResources) /p:ForceLibraryModeGenerateAppBundle=$(ForceLibraryModeGenerateAppBundle)</_AOTBuildCommand>
<_AOTBuildCommand>$(_AOTBuildCommand) </_AOTBuildCommand>

Expand Down Expand Up @@ -46,11 +46,11 @@

<PropertyGroup>
<AppleBuildDependsOn>PrepareForAppleBuildApp;$(AppleBuildDependsOn);_CopyTestArchive</AppleBuildDependsOn>

<BundleTestAppleAppDependsOn Condition="'$(BuildTestsOn)' == 'local'">AppleBuild</BundleTestAppleAppDependsOn>
<BundleTestAppleAppDependsOn Condition="'$(BuildTestsOnHelix)' == 'true'">$(BundleTestAppleAppDependsOn);_BundleAOTTestAppleAppForHelix;_CopyTestArchive</BundleTestAppleAppDependsOn>
</PropertyGroup>

<Target Name="BundleTestAppleApp" DependsOnTargets="$(BundleTestAppleAppDependsOn)" />

<UsingTask Condition="'$(BuildTestsOnHelix)' == 'true'"
Expand All @@ -61,7 +61,7 @@
<PropertyGroup>
<AppBundlePath>$(BundleDir)publish</AppBundlePath>
</PropertyGroup>

<PropertyGroup>
<_MainAssemblyPath Condition="'%(AppleAssembliesToBundle.FileName)' == $(AssemblyName) and '%(AppleAssembliesToBundle.Extension)' == '.dll'">%(AppleAssembliesToBundle.Identity)</_MainAssemblyPath>
<RuntimeConfigFilePath>$([System.IO.Path]::ChangeExtension($(_MainAssemblyPath), '.runtimeconfig.json'))</RuntimeConfigFilePath>
Expand All @@ -76,6 +76,8 @@
<BundleFiles Include="$(MonoProjectRoot)\msbuild\apple\data\*" TargetDir="publish" />
<ExtraFiles Condition="'%(AppleAssembliesToBundle._IsNative)' == 'true'"
Include="@(AppleAssembliesToBundle)" TargetDir="extraFiles\%(AppleAssembliesToBundle.RecursiveDir)" />
<ExtraFiles Condition="Exists(%(TrimmerRootDescriptor.Identity))"
Include="@(TrimmerRootDescriptor)" TargetDir="extraFiles" />
</ItemGroup>

<ItemGroup Condition="'$(UseNativeAOTRuntime)' == 'true' and '$(HybridGlobalization)' == 'false'" >
Expand Down Expand Up @@ -104,13 +106,17 @@

<_RuntimePackFiles Include="$(MicrosoftNetCoreAppRuntimePackRidLibTfmDir)**\*.*" />
<_RuntimePackFiles Include="$(MicrosoftNetCoreAppRuntimePackNativeDir)*.*" />

<_UnusedRuntimePackFiles Include="@(_PublishBundleFiles)" Exclude="@(_RuntimePackFiles->'$(AppBundlePath)/%(FileName)%(Extension)')" />
<_UsedRuntimePackFiles Include="@(_PublishBundleFiles)" Exclude="@(_UnusedRuntimePackFiles)" />

<_RuntimePackFilesToDelete Include="@(_RuntimePackFiles->'$(AppBundlePath)/%(FileName)%(Extension)')" />
<AppleReferenceSharedPathFiles Include="%(ReferencePath.Identity)" Condition="Exists('@(ReferencePath->'$(LibrariesSharedFrameworkBinArtifactsPath)%(FileName)%(Extension)')')" />
<ReferenceExtraPathFiles Include="%(ReferencePath.Identity)" Condition="!Exists('@(ReferencePath->'$(LibrariesSharedFrameworkBinArtifactsPath)%(FileName)%(Extension)')')" />
</ItemGroup>

<Copy SourceFiles="%(ReferenceExtraPathFiles.Identity)" DestinationFolder="$(BundleDir)\extraFiles" />

<!-- Remove the runtime pack parts from the self contained app. We'll restore on helix -->
<Delete Condition="'$(UsePortableRuntimePack)' == 'true'" Files="@(_RuntimePackFilesToDelete)" />

Expand All @@ -125,20 +131,38 @@
<_ApplePropertyNames Include="UseConsoleUITemplate" />
<_ApplePropertyNames Include="UseRuntimeComponents" />
<_ApplePropertyNames Include="IncludesTestRunner" />
<_ApplePropertyNames Include="_NetCoreAppToolCurrent" />
<_ApplePropertyNames Include="ShouldILStrip" />

<_ApplePropertyNames Include="DebuggerSupport" />
<_ApplePropertyNames Include="MetadataUpdaterSupport" />
<_ApplePropertyNames Include="EventSourceSupport" />
<_ApplePropertyNames Include="JsonSerializerIsReflectionEnabledByDefault" />

<_ApplePropertiesToPass
Include="$(%(_ApplePropertyNames.Identity))"
Name="%(_ApplePropertyNames.Identity)"
ConditionToUse__="%(_ApplePropertyNames.ConditionToUse__)" />

<_AppleUsedRuntimePackFiles
Include="@(_UsedRuntimePackFiles->'%(FileName)%(Extension)')"
<_AppleUsedRuntimePackFiles
Include="@(_UsedRuntimePackFiles->'%(FileName)%(Extension)')"
RemoveMetadata="_IsNative;TargetDir" />

<_AppleItemsToPass Include="@(_AppleUsedRuntimePackFiles)"
OriginalItemName__="_AppleUsedRuntimePackFiles" />

<_AppleItemsToPass Include="@(AppleReferenceSharedPathFiles->'%(FileName)%(Extension)')"
OriginalItemName__="AppleReferenceSharedPathFiles" />

<_AppleItemsToPass Include="@(ReferenceExtraPathFiles->'%(FileName)%(Extension)')"
OriginalItemName__="AppleReferenceExtraPathFiles" />

<_AppleItemsToPass Include="@(RuntimeHostConfigurationOption)"
OriginalItemName__="_AppleUsedRuntimeHostConfigurationOption" />

<_AppleItemsToPass Include="@(TrimmerRootAssembly)"
OriginalItemName__="TrimmerRootAssembly" />

<!-- Example of passing items to the project

<_AppleItemsToPass Include="@(BundleFiles)" OriginalItemName__="BundleFiles" ConditionToUse__="'$(Foo)' != 'true'" />
Expand All @@ -164,7 +188,7 @@
<IncludesTestRunner Condition="'$(IncludesTestRunner)' == ''">true</IncludesTestRunner>
<Optimized Condition="'$(Configuration)' == 'Release'">true</Optimized>
<MainLibraryFileName Condition="'$(MainLibraryFileName)' == '' and '$(IsRuntimeTests)' != 'true' and '$(IncludesTestRunner)' == 'true'">AppleTestRunner.dll</MainLibraryFileName>

<AppleBuildDir>$(PublishDir)</AppleBuildDir>
<AppleBundleDir>$(BundleDir)</AppleBundleDir>
</PropertyGroup>
Expand All @@ -181,7 +205,7 @@
<_InternalForceInterpret>true</_InternalForceInterpret>
<_IsNative>true</_IsNative>
</AppleAssembliesToBundle>

<_PublishAssemblies Include="$(PublishDir)\**\*.dll" Exclude="$(PublishDir)\**\*.resources.dll" />
<_SatelliteAssemblies Include="$(PublishDir)\**\*.resources.dll" />

Expand Down Expand Up @@ -212,4 +236,4 @@
<RemoveDir Condition="'$(NeedsToBuildAppsOnHelixLocal)' != 'true'" Directories="$(OutDir)" />
</Target>

</Project>
</Project>
4 changes: 2 additions & 2 deletions eng/testing/tests.mobile.targets
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<DotnetPgoToolPath>$([MSBuild]::NormalizePath('$(DotnetPgoToolDir)', 'dotnet-pgo'))</DotnetPgoToolPath>
</PropertyGroup>

<PropertyGroup Condition="'$(EnableAggressiveTrimming)' == 'true' or '$(EnableSoftTrimming)' == 'true'">
<PropertyGroup Condition="('$(EnableAggressiveTrimming)' == 'true' or '$(EnableSoftTrimming)' == 'true') and '$(BuildTestsOnHelix)' != 'true'">
<PublishTrimmed>true</PublishTrimmed>
<!-- Suppress trimming warnings as these are tests -->
<SuppressTrimAnalysisWarnings>true</SuppressTrimAnalysisWarnings>
Expand Down Expand Up @@ -124,7 +124,7 @@
as a root -->
<TrimmerRootAssembly
Condition="$([System.String]::Copy('%(ResolvedFileToPublish.FileName)%(ResolvedFileToPublish.Extension)').EndsWith('TestRunner.dll'))"
Include="%(ResolvedFileToPublish.FullPath)" />
Include="%(ResolvedFileToPublish.FileName)" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ public static bool IsMetadataTokenSupported
public static bool UsesMobileAppleCrypto => IsMacCatalyst || IsiOS || IstvOS;

// Changed to `true` when trimming
public static bool IsBuiltWithAggressiveTrimming => IsNativeAot;
public static bool IsBuiltWithAggressiveTrimming => IsNativeAot || IsAppleMobile;
public static bool IsNotBuiltWithAggressiveTrimming => !IsBuiltWithAggressiveTrimming;
public static bool IsTrimmedWithILLink => IsBuiltWithAggressiveTrimming && !IsNativeAot;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2118,7 +2118,7 @@ public void ComplexObj_As_Enumerable_Element()
}

#if !BUILDING_SOURCE_GENERATOR_TESTS
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser), nameof(PlatformDetection.IsNotAppleMobile))]
public void TraceSwitchTest()
{
var dic = new Dictionary<string, string>
Expand Down Expand Up @@ -2147,7 +2147,7 @@ private void ValidateGeolocation(IGeolocation location)

[Fact]
#if !BUILDING_SOURCE_GENERATOR_TESTS
[ActiveIssue("Investigate Build browser-wasm linux Release LibraryTests_EAT CI failure for reflection impl", TestPlatforms.Browser)]
[ActiveIssue("Investigate Build browser-wasm linux Release LibraryTests_EAT CI failure for reflection impl", TestPlatforms.Browser | TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
#endif
public void TestGraphWithUnsupportedMember()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ public static IEnumerable<object[]> LateCall_OptionalValues_Data()

[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/51834", typeof(PlatformDetection), nameof(PlatformDetection.IsBuiltWithAggressiveTrimming), nameof(PlatformDetection.IsBrowser))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/51834", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsBuiltWithAggressiveTrimming), nameof(PlatformDetection.IsAppleMobile))]
simonrozsival marked this conversation as resolved.
Show resolved Hide resolved
[MemberData(nameof(LateCall_OptionalValues_Data))]
public void LateCall_OptionalValues(string memberName, object[] arguments, Type[] typeArguments, string expectedValue)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<linker>
<assembly fullname="System" />
<assembly fullname="System.Private.CoreLib" />
<assembly fullname="System.Configuration" />
<assembly fullname="System.Configuration.ConfigurationManager" />
</linker>
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\src\System.Configuration.ConfigurationManager.csproj" />
<TrimmerRootDescriptor Include="$(MSBuildThisFileDirectory)ILLink.Descriptors.xml" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<Reference Include="System.Configuration" />
Expand Down
3 changes: 3 additions & 0 deletions src/libraries/System.Data.Common/tests/ILLink.Descriptors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<linker>
<assembly fullname="System.Data" />
</linker>
Original file line number Diff line number Diff line change
Expand Up @@ -123,5 +123,7 @@
<ItemGroup>
<PackageReference Include="System.Data.Common.TestData" Version="$(SystemDataCommonTestDataVersion)" />
<PackageReference Include="System.Data.SqlClient" Version="$(SystemDataSqlClientVersion)" />

<TrimmerRootDescriptor Include="$(MSBuildThisFileDirectory)ILLink.Descriptors.xml" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public class XmlDataReaderTest
{
[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/51369", typeof(PlatformDetection), nameof(PlatformDetection.IsBuiltWithAggressiveTrimming), nameof(PlatformDetection.IsBrowser))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/51369", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsBuiltWithAggressiveTrimming), nameof(PlatformDetection.IsAppleMobile))]
public void XmlLoadTest()
{
var ds = new DataSet();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<linker>
<assembly fullname="System.Diagnostics.FileVersionInfo.TestAssembly" />
</linker>
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,6 @@
<!-- R2R testing does not tolerate the combination of a regular project reference and a content reference. -->
<!-- This is a bug in the SDK tracked here: https://github.com/dotnet/sdk/issues/30718 -->
<PublishReadyToRunExclude Include="System.Diagnostics.FileVersionInfo.TestAssembly.dll" />
<TrimmerRootDescriptor Include="$(MSBuildThisFileDirectory)ILLink.Descriptors.xml" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public class TrimCompatibilityTests
/// </summary>
[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/50712", typeof(PlatformDetection), nameof(PlatformDetection.IsBuiltWithAggressiveTrimming), nameof(PlatformDetection.IsBrowser))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/50712", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsBuiltWithAggressiveTrimming), nameof(PlatformDetection.IsAppleMobile))]
public static void QueryableMethodsContainCorrectDynamicDependency()
{
IEnumerable<MethodInfo> dependentMethods =
Expand Down
5 changes: 5 additions & 0 deletions src/libraries/System.Linq/tests/ILLink.Descriptors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<linker>
<assembly fullname="System.Linq" />
<assembly fullname="System.Linq.Tests" />
<assembly fullname="System.Runtime" />
</linker>
1 change: 1 addition & 0 deletions src/libraries/System.Linq/tests/System.Linq.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
</PropertyGroup>
<ItemGroup>
<RdXmlFile Include="default.rd.xml" />
<TrimmerRootDescriptor Include="$(MSBuildThisFileDirectory)ILLink.Descriptors.xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="AggregateTests.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-unix;$(NetCoreAppCurrent)-browser;$(NetCoreAppCurrent)-osx;$(NetCoreAppCurrent)-ios</TargetFrameworks>
<IgnoreForCI Condition="'$(TargetOS)' == 'browser'">true</IgnoreForCI>
<EnablePreviewFeatures>true</EnablePreviewFeatures>
<EventSourceSupport Condition="'$(TestNativeAot)' == 'true'">true</EventSourceSupport>
<EventSourceSupport Condition="'$(TestNativeAot)' == 'true' or '$(TargetsAppleMobile)' == 'true'">true</EventSourceSupport>
</PropertyGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public void SerializeDeserialize_Roundtrips(ObservableCollection<int> c)

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/57588", typeof(PlatformDetection), nameof(PlatformDetection.IsBuiltWithAggressiveTrimming), nameof(PlatformDetection.IsBrowser))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/57588", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsBuiltWithAggressiveTrimming), nameof(PlatformDetection.IsAppleMobile))]
public void OnDeserialized_MonitorNotInitialized_ExpectSuccess()
{
var observableCollection = new ObservableCollection<int>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public static void VarArgsCaller()
}

// Test as much as we can with simple C# examples inline below.
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.HasAssemblyFiles))]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.HasAssemblyFiles), nameof(PlatformDetection.IsNotAppleMobile))]
public void SimpleSignatureProviderCoverage()
{
using (FileStream stream = File.OpenRead(AssemblyPathHelper.GetAssemblyLocation(typeof(SignaturesToDecode<>).GetTypeInfo().Assembly)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
-->
<assembly fullname="mscorlib" />
<assembly fullname="TestILAssembly" />
<assembly fullname="System.Private.CoreLib" />
</linker>
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
<Compile Include="$(CommonTestPath)System\ModifiedTypeTests.cs" Link="Common\System\ModifiedTypeTests.cs" />
</ItemGroup>

<ItemGroup Condition="'$(TargetOS)' == 'browser'">
<ItemGroup Condition="'$(TargetOS)' == 'browser' or ('$(EnableAggressiveTrimming)' == 'true' and '$(UseNativeAotRuntime)' != 'true')">
<WasmFilesToIncludeFromPublishDir Include="System.Private.CoreLib.dll" />
<WasmFilesToIncludeFromPublishDir Include="System.Reflection.MetadataLoadContext.Tests.dll" />
<WasmFilesToIncludeFromPublishDir Include="mscorlib.dll" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<linker>
<assembly fullname="TinyAssembly" />
</linker>
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public void GetModuleVersionId_HasModuleVersionId_BehaveConsistently()

// This calls Assembly.Load, but xUnit turn is into a LoadFrom because TinyAssembly is just a Content item in the project.
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsAssemblyLoadingSupported))]
[SkipOnPlatform(TestPlatforms.Browser | TestPlatforms.iOS | TestPlatforms.MacCatalyst | TestPlatforms.tvOS, "TinyAssembly GUID differs when trimming is enabled.")]
public void GetModuleVersionId_KnownAssembly_ReturnsExpected()
{
Module module = Assembly.Load(new AssemblyName("TinyAssembly")).ManifestModule;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,7 @@
<Link>TinyAssembly.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>

<TrimmerRootDescriptor Condition="'$(TargetsAppleMobile)' == 'true' and '$(EnableAggressiveTrimming)' == 'true' and '$(UseNativeAotRuntime)' != 'true'" Include="$(MSBuildThisFileDirectory)ILLink.Descriptors.xml" />
</ItemGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<linker>
<assembly fullname="System.Drawing" />
<assembly fullname="System.Resources.Extensions" />
</linker>
Loading
Loading