-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Testing] Run UI tests with CoreCLR on Android #30842
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request introduces CoreCLR runtime support to the .NET MAUI UI testing infrastructure. The changes enable building and testing MAUI applications using the CoreCLR runtime alongside the existing Mono and NativeAOT variants.
Key changes include:
- Added CoreCLR as a new runtime variant in build and pipeline configurations
- Enhanced UI test pipelines to support CoreCLR-specific build and test stages
- Updated build infrastructure to handle CoreCLR-specific properties and configurations
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
Controls.TestCases.HostApp.csproj |
Added warning suppressions for IL analyzer warnings |
ui-tests.yml |
Updated macOS version and Android API levels for test environments |
ui-tests.yml (common) |
Added CoreCLR build and test stages for Android UI tests |
ui-tests-steps.yml |
Added artifact download step for CoreCLR test samples |
ui-tests-build-sample.yml |
Added CoreCLR-specific artifact publishing conditions |
dotnet.cake |
Implemented CoreCLR runtime variant support and build configuration |
Comments suppressed due to low confidence (1)
src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj:26
- Adding new warning suppressions (IL2026, IL2091, IL2067, IL2072, IL2087, IL3050) without corresponding test cases. These IL analyzer warnings are related to trimming and AOT compatibility. Please ensure there are test cases in TestCases.Shared.Tests that verify the behavior when these warnings would normally be triggered, particularly for CoreCLR scenarios.
<NoWarn>$(NoWarn);CS0618;CS0672;XC0618;XC0022;XC0023;IL2026;IL2091;IL2067;IL2072;IL2087;IL3050</NoWarn>
<WindowsPackageType>None</WindowsPackageType> | ||
<!-- TODO: remove these obsolete nowarns and fix it in code --> | ||
<NoWarn>$(NoWarn);CS0618;CS0672;XC0618;XC0022;XC0023</NoWarn> | ||
<NoWarn>$(NoWarn);CS0618;CS0672;XC0618;XC0022;XC0023;IL2026;IL2091;IL2067;IL2072;IL2087;IL3050</NoWarn> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this was not running with NAtiveAOT it was throwing the errors.
/rebase |
be931e9
to
da836c4
Compare
/rebase |
da836c4
to
fd905c3
Compare
/rebase |
Description of Change
Add UITests stage for using CoreCLR, enable NativeAOT for UITEsts.
This pull request introduces support for the CoreCLR runtime variant, refactors build and test scripts for better maintainability, and updates the pipeline configurations. The most significant changes include adding CoreCLR as a runtime option, enhancing build tasks to accommodate the new runtime, and updating pipeline files to support CoreCLR-specific builds and tests.
Seems we weren't actually build also the NativeAOT uitest step correctly, so fixing that too on this PR.
CoreCLR Runtime Support:
CoreCLR
as a new runtime variant in theRuntimeVariant
enum and introduced a corresponding flagUSE_CORECLR
ineng/cake/dotnet.cake
.Task("uitests-apphost")
to include CoreCLR-specific build properties, such asUseMonoRuntime
andTargetFramework
.Build Script Refactoring:
DefaultDotnetVersion
to support dynamic target framework versions via arguments or environment variables.dotnet
,dotnet-local-workloads
, anddotnet-samples
. [1] [2] [3]GenerateCgManifest
task andRunTestWithLocalDotNet
method. [1] [2]Pipeline Updates:
ui-tests-build-sample.yml
to include CoreCLR as a runtime variant and added conditions for publishing CoreCLR-specific artifacts. [1] [2]ui-tests.yml
for both build and test workflows. [1] [2]macOS-15
and Android API levels to36
inui-tests.yml
. [1] [2]Project Configuration:
IL2026
,IL2091
, etc.) in theControls.TestCases.HostApp.csproj
file to address compatibility issues.Issues Fixed
Fixes #30278