Enable NativeAOT library tests on Apple mobile platforms#125437
Enable NativeAOT library tests on Apple mobile platforms#125437kotlarmilos wants to merge 42 commits intodotnet:mainfrom
Conversation
Replace NativeAOT runtime test legs with library test legs on iOS/tvOS devices, iOS/tvOS simulators, and Mac Catalyst. The runtime tests (nativeaot/SmokeTests) provide minimal value on mobile since the compiler doesn't meaningfully distinguish between iOS and macOS. Library tests exercise OS-specific APIs (crypto, networking, etc.) that are the real quality gate. Changes: - ioslike: remove NativeAOT runtime test leg, update existing library test leg to use dynamic smoke test arg - ioslikesimulator: replace NativeAOT runtime test leg with library test leg, fix isiOSLikeSimulatorOnlyBuild parameter - maccatalyst: replace both NativeAOT runtime test legs (regular + AppSandbox) with library test legs, fix coreclrContainsChange variable (was incorrectly using monoContainsChange) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the Apple “extra platforms” CI legs to validate NativeAOT on iOS/tvOS devices, iOS/tvOS simulators, and Mac Catalyst by running libraries tests (via Helix) instead of the minimal NativeAOT runtime SmokeTests, improving OS-specific coverage (crypto/networking/globalization) on mobile.
Changes:
- Switch NativeAOT Apple-mobile legs from runtime SmokeTests submission to
eng/pipelines/libraries/helix.ymlsubmission of libraries tests. - Use
eng/pipelines/libraries/helix-queues-setup.ymland passNeedsToBuildAppsOnHelix=truefor the new legs. - Update naming/args to use
$(_runSmokeTestsOnlyArg)and fix path-evaluation variable naming in affected legs.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| eng/pipelines/extra-platforms/runtime-extra-platforms-maccatalyst.yml | Replaces NativeAOT runtime SmokeTests legs with libraries test legs (including App Sandbox variant) using libraries Helix templates/queues. |
| eng/pipelines/extra-platforms/runtime-extra-platforms-ioslikesimulator.yml | Replaces NativeAOT runtime SmokeTests on iOS/tvOS simulators with libraries tests using libraries Helix templates/queues. |
| eng/pipelines/extra-platforms/runtime-extra-platforms-ioslike.yml | Adjusts NativeAOT iOS/tvOS device leg to use $(_runSmokeTestsOnlyArg) for libraries tests and removes the old NativeAOT runtime SmokeTests device leg. |
You can also share your feedback on Copilot code review. Take the survey.
eng/pipelines/extra-platforms/runtime-extra-platforms-ioslikesimulator.yml
Show resolved
Hide resolved
…60312.1 On relative base path root Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit From Version 11.0.0-prerelease.26160.2 -> To Version 11.0.0-prerelease.26162.1
…60312.3 On relative base path root Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit From Version 11.0.0-prerelease.26160.2 -> To Version 11.0.0-prerelease.26162.3
…60314.3 On relative base path root Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit From Version 11.0.0-prerelease.26160.2 -> To Version 11.0.0-prerelease.26164.3
…60317.2 On relative base path root Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit From Version 11.0.0-prerelease.26160.2 -> To Version 11.0.0-prerelease.26167.2
…60318.1 On relative base path root Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit From Version 11.0.0-prerelease.26160.2 -> To Version 11.0.0-prerelease.26168.1
…bb6-53258cb4f260' into enable-nativeaot-libs-tests-mobile
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.
You can also share your feedback on Copilot code review. Take the survey.
|
This PR stands up Native AOT library tests on Apple mobile. It replaces a subset of runtime tests that were not relevant for Apple mobile. Note it enables only System.Runtime.Tests. The full run revealed 66 failures tracked in #126697. I briefly went through some of the failures and they look trimming related. The follow-up effort should bring these tests into the CI to improve testing coverage of Native AOT along with CoreCLR. |
…eInput handling in ProxyProjectForAOTOnHelix
01d5d83 to
a8eae52
Compare
src/libraries/System.Runtime/tests/System.Runtime.Tests/System/Reflection/ModuleTests.cs
Outdated
Show resolved
Hide resolved
…ple mobile ActiveIssue annotations Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
@jkoritzinsky @matouskozak Please take a look again |
| } | ||
|
|
||
| [Fact] | ||
| [ActiveIssue("https://github.com/dotnet/runtime/issues/67531", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot), nameof(PlatformDetection.IsAppleMobile))] |
There was a problem hiding this comment.
This issue does not look related to what the tests is testing.
Is this correct issue link?
There was a problem hiding this comment.
Likely the same underlying problem as #126730 (comment)
There was a problem hiding this comment.
Yes, it is likely related to trimming. Let's try a different approach and trim on build machines.
|
Actually looking at the changes here, all the trimming issues are likely caused by mismatch between how compilation would happen with regular publish vs what ProxyProjectForAOTOnHelix.proj sets up and we are ending up building different configurations. Do we need to keep doing ProxyProjectForAOTOnHelix.proj? Why can't we let the |
|
The only concern is build time on Helix machines. dotnet publish would include app bundling and signing, which is time consuming. However, you are correct. it should be done on build machines, and going forward this approach would only cause problems, needing to match dotnet publish with what we do on Helix. Let's try to split trimming and publish, and do trimming and ILC on build machines and app bundling on Helix. |
Worth a try but chances are good you'll timeout. Depends on how much extra time it adds on the build step. |
We use a 6 hour timeout for the libraries legs in native AOT testing. In practice it's less than that, but this accounts for Helix delays as well. I just checked a recent ARM64 mac outerloop leg build: it was about 3 hours to build the product and tests (including AOT compiling them). The Build product leg of the maccatalyst leg in this PR was 50 minutes (but we also didn't build all the tests, only System.Runtime, so it's not representative). It will take longer, but not LLVM-longer. But in return we get compat with all the switches the tests might be setting (trimming settings are not the only things we sometimes tweak per test project - it's also things like invariant globalization and bunch of others that we can set at compile time - root causing the failing tests to a missing compile-time switch can be pretty annoying). |
Description
Replace NativeAOT runtime test legs with library test legs on iOS/tvOS devices, iOS/tvOS simulators, and Mac Catalyst.
Depends on dotnet/xharness#1554
Fixes #81075