Enable more tests to run on all 3 runtimes, part 14#10644
Merged
jonathanpeppers merged 10 commits intomainfrom Jan 7, 2026
Merged
Enable more tests to run on all 3 runtimes, part 14#10644jonathanpeppers merged 10 commits intomainfrom
jonathanpeppers merged 10 commits intomainfrom
Conversation
On-device tests which run the same project but with different runtimes must use different package names or we might find ourselves in a situation when an application built for a different runtime and installed over a previous version which uses another runtime, won't even start. This happened with NativeAOT in the InstallAndRunTests.DotNetRun test.
1668ab8 to
834ad60
Compare
jonathanpeppers
approved these changes
Jan 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces improvements to how Android runtime variants are handled in device integration tests. The key change is to parameterize tests by
AndroidRuntime, ensuring that each runtime uses a unique package name and configuration. This prevents cross-runtime interference and enables broader test coverage. Additionally, a utility method is introduced to standardize package name generation.Test parameterization and runtime handling:
Major device integration tests (
LocalizationTests,TimeZoneInfoTests,SystemApplicationTests,UncaughtExceptionTests,MonoAndroidExportTest, andMarshalMethodsGCHangTests) are updated to run against allAndroidRuntimevalues using[Values]or[TestFixtureSource], with appropriate handling for unsupported configurations and unique per-runtime package names.Tests now set the runtime explicitly on
XamarinAndroidApplicationProjectand related objects, and adjust build configurations such asIsReleaseandSupportedOSPlatformVersionbased on the runtime.Utility and infrastructure improvements:
A new
PackageUtils.MakePackageNamemethod is added to generate unique package names per runtime, and is used throughout the updated tests to avoid conflicts.Test project creation and setup now use the test name and runtime to ensure isolation and reproducibility.
Test codebase maintenance:
Xamarin.Android.Tasksare added to relevant test files to support the new runtime and package utilities.These changes collectively improve test reliability and coverage across different Android runtime implementations.