Enable NativeAOT library tests on Apple mobile platforms#125437
Enable NativeAOT library tests on Apple mobile platforms#125437kotlarmilos wants to merge 81 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.
…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.
The IsNativeAot ActiveIssue lines are reverted per request — the 3 tests (ModuleTests.Name, ModuleTests.FullyQualifiedName, DoubleTests.ParsePatterns) will now fail again on the NativeAOT smoke leg. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The Directory.Build.props auto-import already builds the chain, and the proxy header at line 10 prepends the Helix-specific targets and appends _AfterAppleBuildOnHelix. Setting _AotCompileTargetName=_NoOpNativeAotCompileOnHelix is enough — the default chain expands $(_AotCompileTargetName) to it. The remaining default targets (_ScanAssembliesDecideLightweightMarshaler, $(_ProcessRuntimeComponentsForLibraryMode), _BuildNativeLibrary) are gated to no-op for NativeAOT. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…tOnHelix - Single shorthand property gates all NativeAOT library-test additions. - Group the related PropertyGroup, ItemGroup, and Target adjacently. - Rename _NoOpNativeAotCompileOnHelix to _StageNativeAotLinkInputsOnHelix. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
AppleBuild.props eagerly expands $(_AotCompileTargetName) when defining AppleBuildDependsOn. The override of _AotCompileTargetName in the proxy therefore never reaches the chain, leaving _AppleNativeAotCompile (which depends on IlcCompile) in the dependency list. ILC then runs on Helix and crashes because the host build only emitted lib<Name>.a, not a .dll. Replace _AppleNativeAotCompile with _StageNativeAotLinkInputsOnHelix in AppleBuildDependsOn directly via String.Replace. This restores the chain shape that worked in build 1401875. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The String.Replace approach produced a multi-line value that MSBuild collapsed into a single target name (MSB4057). Use the explicit single-line chain that previously worked in build 1401875. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Tracked under dotnet#127786. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Drop /p:RunSmokeTestsOnly=true from the four NativeAOT Apple-mobile legs (ios-arm64, iossimulator, maccatalyst, maccatalyst AppSandbox) and rename the legs from AllSubsets_NativeAOT_Smoke to AllSubsets_NativeAOT. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Functional tests with custom Main (IncludesTestRunner=false) PInvoke into mono_ios_set_summary in the AppleAppBuilder-generated objc main. They run ILC on Helix via the proxy, so the proxy must emit DirectPInvoke __Internal for them too — not just for library tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Multi-targeted test projects (e.g. Microsoft.Extensions.Hosting.Abstractions.Tests targeting net481+net11.0) hit NU1202 because Microsoft.DotNet.XHarness.TestRunners.Xunit isn't compatible with .NETFramework. The smoke set (System.Runtime.Tests) is single-TFM so the issue surfaced only when the full library test set was enabled. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
- AppleTestRunner.GetTestAssemblies: suppress IL2026 since the Assembly.LoadFrom branch is unreachable on NativeAOT (s_testAssemblies is populated from AppDomain.CurrentDomain.GetAssemblies()). - src/libraries/tests.proj: exclude the ReflectionInvokeEmit and ReflectionInvokeInterpreted tests on Apple-mobile NativeAOT. They use runtimeconfig.template.json which PublishAot rejects, the Emit path is not supported on NativeAOT, and the interpreted path is already the NativeAOT default. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
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