-
Notifications
You must be signed in to change notification settings - Fork 564
Enable more tests to run on all 3 runtimes, part 3 #10585
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
Merged
Merged
Conversation
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
d7d03e3 to
d756271
Compare
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
NativeAOT build doesn't export all the environment variables atm.
d756271 to
2d7a8ff
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 significantly expands the test coverage in
BuildWithLibraryTests.csto support theNativeAOTAndroid runtime, in addition to the existingMonoVMandCoreCLRruntimes. The changes ensure that all relevant tests run against all supported runtimes and adjust test logic to account for the unique behaviors and limitations ofNativeAOT. There are also improvements to parameterization, handling of release configurations, and some refactoring for clarity and maintainability.Key changes include:
Test Coverage Expansion and Parameterization:
Updated all relevant test methods to accept an
AndroidRuntime runtimeparameter (using[Values]), ensuring tests are executed for all supported runtimes, includingNativeAOT. Test logic is adjusted to skip or ignore unsupported configurations as needed.The test data source in
Get_DotNetBuildLibraryParamsnow dynamically includes allAndroidRuntimevalues, not just a hardcoded subset.NativeAOT-Specific Logic and Adjustments:
Added logic to skip or adjust tests that are not supported or behave differently with
NativeAOT, including handling of environment variables, assembly packaging, and error/warning expectations.Adjusted test assertions and file checks to account for the fact that
NativeAOTlinks PAL libraries directly into the application.sorather than packaging them separately.Release Configuration Consistency:
IsReleaseconfiguration based on the runtime, particularly forNativeAOT, which requires release builds.Project Setup Improvements:
XamarinAndroidLibraryProject,XamarinAndroidApplicationProject, etc.) have their runtime set explicitly viaSetRuntime(runtime).Refactoring and Modernization:
using varstatements for better readability and resource handling.These changes make the test suite more robust and future-proof by ensuring comprehensive coverage across all supported Android runtimes and adjusting for their specific behaviors.