Skip to content

Conversation

@grendello
Copy link
Contributor

@grendello grendello commented Nov 18, 2025

This pull request expands test coverage across the Xamarin.Android build task tests to support and validate multiple Android runtimes (such as MonoVM, CoreCLR, and NativeAOT). The changes systematically update test cases to parameterize the runtime, ensure correct configuration for each runtime, and handle unsupported scenarios gracefully. Helper methods and test data sources are also refactored to facilitate multi-runtime testing.

Multi-runtime test support and parameterization:

  • Updated test methods in AidlTest.cs, AndroidDependenciesTests.cs, and AndroidGradleProjectTests.cs to accept an AndroidRuntime parameter using the [Values] attribute, enabling tests to run across all supported runtimes. Tests now call proj.SetRuntime(runtime) and set the IsRelease property based on the runtime. Unsupported configurations are skipped using IgnoreUnsupportedConfiguration.

Test data refactoring for runtime coverage:

  • Refactored test case sources (e.g., Get_AGPMetadataTestSources, Get_GetDependencyNdkRequiredConditionsData) to generate test data for each runtime, ensuring comprehensive coverage and reducing code duplication.

Test output and assertion improvements:

  • Adjusted file assertions to account for runtime-specific configuration, such as lowercasing configuration names to avoid failures on case-sensitive filesystems.

Graceful handling of unsupported scenarios:

  • Incorporated logic to skip or ignore tests for runtimes that do not support certain features (e.g., AOT or profiled AOT), improving reliability and clarity of test results.

Consistency and maintainability enhancements:

  • Applied consistent runtime and release configuration handling across all affected tests, improving maintainability and making it easier to add or update supported runtimes in the future.

@grendello grendello force-pushed the dev/grendel/test-runtimes-5 branch from e7943a7 to e76d59d Compare November 19, 2025 12:14
@grendello grendello marked this pull request as ready for review November 19, 2025 12:14
@grendello grendello force-pushed the dev/grendel/test-runtimes-5 branch from e76d59d to c59293f Compare November 21, 2025 11:19
Copy link
Member

@jonathanpeppers jonathanpeppers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debugger test timed out booting emulator, and these are OK to ignore for now:

Image

@jonathanpeppers jonathanpeppers merged commit 18e51d1 into main Nov 24, 2025
56 of 59 checks passed
@jonathanpeppers jonathanpeppers deleted the dev/grendel/test-runtimes-5 branch November 24, 2025 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants