dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.45k stars 4.76k forks source link

[mono] Update tests to be trim-compatible on ios/tvos platforms #91923

Open ivanpovazan opened 1 year ago

ivanpovazan commented 1 year ago

By enabling trimming when building libraries and functional tests for ios/tvos platforms, we would greatly speed up builds on CI, lower the costs and improve user experience. With trimming enabled the configuration is also closer to what an end user experiences when building ios/tvos applications.

However, as some tests assume trimming is not enabled (e.g.: System.Runtime.Tests test suite has 11 failures on ios-arm64 device when trimming is enabled) we should investigate how to root required assemblies/tests to prevent these failures.

Related issues:

Disabled tests:

Microsoft.Extensions.Configuration.Binder.Tests.TraceSwitchTest
Microsoft.Extensions.Configuration.Binder.Tests.TestGraphWithUnsupportedMember
System.Reflection.Metadata.Decoding.Tests.SimpleSignatureProviderCoverage
System.Reflection.Tests.GetModuleVersionId_KnownAssembly_ReturnsExpected
System.Runtime.Tests.ShimsHaveOnlyTypeForwards

Follow-up tasks:

ghost commented 1 year ago

Tagging subscribers to this area: @directhex See info in area-owners.md if you want to be subscribed.

Issue Details
By enabling trimming when building libraries and functional tests for ios/tvos platforms, we would greatly speed up builds on CI, lower the costs and improve user experience. With trimming enabled the configuration is also closer to what an end user experiences when building ios/tvos applications. However, as some tests assume trimming is not enabled (e.g.: `System.Runtime.Tests` test suite has 11 failures on `ios-arm64` device when trimming is enabled) we should investigate how to root required assemblies/tests to prevent these failures.
Author: ivanpovazan
Assignees: -
Labels: `area-Infrastructure-mono`, `os-ios`
Milestone: 9.0.0
ivanpovazan commented 4 months ago

@kotlarmilos why did we reopen this issue?

jkotas commented 4 months ago

There are tests disabled against this issue.

ivanpovazan commented 4 months ago

I see thanks, I was confused as the original issue got edited and the description was not, so was wondering what is the current/end state of this. Additionally, some of the disabled tests seem to have separate issues: e.g.: ShimsHaveOnlyTypeForwards -> https://github.com/dotnet/runtime/issues/99592

We should clean this up.

kotlarmilos commented 4 months ago

Yes, there was a regression, and we want to re-enable it. It is a stale PR, but I will try to push it forward.