-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Add NativeAOT on Android tests for Globalization, Interop, and Cryptography #118651
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
- Don't use BundleDir for android bundle dir: This is PublishDir when TestSingleFile=true (which it is). Android deletes this dir before packaging, deleting the files that were just published. - Don't add the singleFileTestRunner.cs when the test sets IsFunctionalTest=true - Don't run regular nativeaot smoke tests on android yet. - Enable android tests to publish as libs when TestSingleFile=true (default when TestNativeAOT=true)
…/runtime into AndroidAppBuilderNaot
…/runtime into AndroidAppBuilderNaot
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 PR adds NativeAOT support for running System.Globalization.Tests, System.Security.Cryptography.Tests, and System.Runtime.InteropServices.Tests on Android, along with shared MSBuild logic for NativeAOT Android builds.
Key changes include:
- Enhanced monodroid-nativeaot.cs template to support command-line arguments and selective test execution
- Modified build infrastructure to properly handle NativeAOT Android test scenarios
- Added platform-specific test exclusions for unsupported algorithms on Android
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
src/tasks/AndroidAppBuilder/Templates/monodroid-nativeaot.cs | Enhanced to support command-line arguments, JNI array operations, and conditional test execution |
src/tests/FunctionalTests/Android/Device_Emulator/NativeAOT/Program.cs | Updated Main method signature to accept command-line arguments |
src/tests/FunctionalTests/Android/Device_Emulator/JIT/Program.cs | Updated Main method signature to accept command-line arguments |
src/libraries/tests.proj | Added three new test projects to NativeAOT Android smoke tests |
eng/testing/tests.android.targets | Added NativeAOT-specific build configuration and compile includes |
src/libraries/System.Security.Cryptography/tests/X509Certificates/TestFiles.cs | Modified test data path resolution to support Android asset directory |
Multiple cryptography test files | Added Android platform exclusions for unsupported algorithms |
Build configuration files | Updated MSBuild properties and dependencies for NativeAOT Android builds |
src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets
Outdated
Show resolved
Hide resolved
/azp run runtime-android |
Azure Pipelines successfully started running 1 pipeline(s). |
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.
Infra changes lgtm!
src/libraries/System.Security.Cryptography/tests/Rfc2898OneShotTests.cs
Outdated
Show resolved
Hide resolved
/azp run runtime-android |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-android |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-android |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-android |
Azure Pipelines successfully started running 1 pipeline(s). |
Run System.Globalization.Tests, System.Security.Cryptography.Tests.csproj, and System.Runtime.InteropServices.Tests on Android with NativeAOT.
Add shared msbuild logic for running NativeAOT on Android.