Skip to content

Commit aa34a0f

Browse files
kotlarmilosmikelle-rogers
authored andcommitted
Re-enable trimming of library tests on Apple mobile (dotnet#104097)
* Re-enable trimming of library tests on Apple mobile
1 parent 1fc82b2 commit aa34a0f

File tree

6 files changed

+29
-4
lines changed

6 files changed

+29
-4
lines changed

eng/pipelines/extra-platforms/runtime-extra-platforms-ioslike.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ jobs:
3131
value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ]
3232
- name: monoContainsChange
3333
value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'] ]
34+
- name: illinkContainsChange
35+
value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'] ]
3436
jobParameters:
3537
testGroup: innerloop
3638
nameSuffix: AllSubsets_Mono
@@ -39,8 +41,7 @@ jobs:
3941
${{ if eq(variables['isRollingBuild'], true) }}:
4042
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 /p:EnableAggressiveTrimming=false
4143
${{ else }}:
42-
# Tracking issue: https://github.com/dotnet/runtime/issues/82637
43-
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 /p:EnableAggressiveTrimming=false
44+
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 /p:EnableAggressiveTrimming=true
4445
timeoutInMinutes: 480
4546
# extra steps, run tests
4647
postBuildSteps:

eng/pipelines/runtime.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -989,17 +989,19 @@ extends:
989989
value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ]
990990
- name: monoContainsChange
991991
value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'] ]
992+
- name: illinkContainsChange
993+
value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'] ]
992994
jobParameters:
993995
testGroup: innerloop
994996
nameSuffix: AllSubsets_Mono
995-
# Tracking issue: https://github.com/dotnet/runtime/issues/82637
996-
buildArgs: -s mono+libs+libs.tests+host+packs -c $(_BuildConfig) /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:RunAOTCompilation=true /p:RunSmokeTestsOnly=true /p:BuildTestsOnHelix=true /p:EnableAdditionalTimezoneChecks=true /p:UsePortableRuntimePack=true /p:BuildDarwinFrameworks=true /p:EnableAggressiveTrimming=false
997+
buildArgs: -s mono+libs+libs.tests+host+packs -c $(_BuildConfig) /p:ArchiveTests=true /p:DevTeamProvisioning=- /p:RunAOTCompilation=true /p:RunSmokeTestsOnly=true /p:BuildTestsOnHelix=true /p:EnableAdditionalTimezoneChecks=true /p:UsePortableRuntimePack=true /p:BuildDarwinFrameworks=true /p:EnableAggressiveTrimming=true
997998
timeoutInMinutes: 480
998999
condition: >-
9991000
or(
10001001
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
10011002
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_mono_excluding_wasm.containsChange'], true),
10021003
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true),
1004+
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_tools_illink.containsChange'], true),
10031005
eq(variables['isRollingBuild'], true))
10041006
# extra steps, run tests
10051007
postBuildSteps:
@@ -1012,6 +1014,7 @@ extends:
10121014
or(
10131015
eq(variables['librariesContainsChange'], true),
10141016
eq(variables['monoContainsChange'], true),
1017+
eq(variables['illinkContainsChange'], true),
10151018
eq(variables['isRollingBuild'], true))
10161019
10171020
#

eng/testing/tests.mobile.targets

+7
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@
4040
<UseNativeHttpHandler Condition="'$(UseNativeHttpHandler)' == ''">false</UseNativeHttpHandler>
4141
</PropertyGroup>
4242

43+
<!-- When tests are built on Helix, override default trimming switches -->
44+
<PropertyGroup Condition="'$(EnableAggressiveTrimming)' == 'true' and '$(BuildTestsOnHelix)' == 'true'">
45+
<DynamicCodeSupport Condition="'$(DynamicCodeSupport)' == '' and '$(MonoForceInterpreter)' != 'true'">false</DynamicCodeSupport>
46+
<_DefaultValueAttributeSupport Condition="'$(OverrideDefaultValueAndDesignerHostSupport)' == 'true'">true</_DefaultValueAttributeSupport>
47+
<_DesignerHostSupport Condition="'$(OverrideDefaultValueAndDesignerHostSupport)' == 'true'">true</_DesignerHostSupport>
48+
</PropertyGroup>
49+
4350
<!-- When trimming non-exe projects, root the whole intermediate assembly.
4451
The SDK settings root only the entry point by default. These targets are used not only for standard
4552
console apps, but also for test projects without an entry point. -->

src/libraries/System.ComponentModel.TypeConverter/tests/System.ComponentModel.TypeConverter.Tests.csproj

+5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
<AssemblyVersion>9.9.9.9</AssemblyVersion>
77
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
88
</PropertyGroup>
9+
10+
<PropertyGroup Condition="'$(TargetsAppleMobile)' == 'true' and '$(EnableAggressiveTrimming)' == 'true' and '$(UseNativeAotRuntime)' != 'true'">
11+
<OverrideDefaultValueAndDesignerHostSupport>true</OverrideDefaultValueAndDesignerHostSupport>
12+
</PropertyGroup>
13+
914
<ItemGroup>
1015
<Compile Include="Drawing\ColorConverterTests.cs" />
1116
<Compile Include="Drawing\PointConverterTests.cs" />

src/libraries/System.Private.Xml/tests/XmlSerializer/ReflectionOnly/System.Xml.XmlSerializer.ReflectionOnly.Tests.csproj

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
<DefineConstants>$(DefineConstants);ReflectionOnly</DefineConstants>
44
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
55
</PropertyGroup>
6+
7+
<PropertyGroup Condition="'$(TargetsAppleMobile)' == 'true' and '$(EnableAggressiveTrimming)' == 'true' and '$(UseNativeAotRuntime)' != 'true'">
8+
<OverrideDefaultValueAndDesignerHostSupport>true</OverrideDefaultValueAndDesignerHostSupport>
9+
</PropertyGroup>
10+
611
<ItemGroup>
712
<ProjectReference Include="..\..\..\..\Microsoft.XmlSerializer.Generator\tests\SerializableAssembly.csproj" />
813
<TrimmerRootAssembly Include="SerializableAssembly" />

src/libraries/System.Runtime/tests/System.Runtime.Tests/System.Runtime.Tests.csproj

+4
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828
<WithoutCategories Condition="'$(EnableAdditionalTimezoneChecks)' != 'true'">$(WithoutCategories);AdditionalTimezoneChecks</WithoutCategories>
2929
</PropertyGroup>
3030

31+
<PropertyGroup Condition="'$(TargetsAppleMobile)' == 'true' and '$(EnableAggressiveTrimming)' == 'true' and '$(UseNativeAotRuntime)' != 'true'">
32+
<OverrideDefaultValueAndDesignerHostSupport>true</OverrideDefaultValueAndDesignerHostSupport>
33+
</PropertyGroup>
34+
3135
<ItemGroup>
3236
<RdXmlFile Include="default.rd.xml" />
3337
</ItemGroup>

0 commit comments

Comments
 (0)