-
Notifications
You must be signed in to change notification settings - Fork 565
Enable more tests to run on all 3 runtimes, part 13 #10635
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
base: main
Are you sure you want to change the base?
Conversation
7e3f8f4 to
a45dafc
Compare
1fc2bd5 to
f728327
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
a6f8ea0 to
f802ad8
Compare
4a71530 to
e5a3fb0
Compare
… broken on NativeAOT
…locally It might work on CI, we'll see
It may be broken on CI with CoreCLR+FastDev
e5a3fb0 to
d305b94
Compare
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 extends test coverage in InstallAndRunTests.cs by modifying test methods to run on all three Android runtimes (MonoVM, CoreCLR, and NativeAOT) instead of being limited to specific runtimes. The PR is part of a series (part 13) aimed at improving runtime test coverage.
Changes:
- Converted multiple test methods from [TestCase] attributes to [Values] attributes with AndroidRuntime parameter
- Added runtime-specific package name generation using
PackageUtils.MakePackageName(runtime) - Added
IgnoreUnsupportedConfigurationchecks and runtime-specificAssert.Ignorestatements for known limitations - Created test data generator methods
Get_DotNetRun_DataandGet_SmokeTestBuildAndRunWithSpecialCharacters_Datato generate test combinations
Comments suppressed due to low confidence (1)
tests/MSBuildDeviceIntegration/Tests/InstallAndRunTests.cs:448
- Condition is always false because of ... == ....
AndroidRuntime.CoreCLR => null, // CoreCLR explicitly passes a `null` sender
|
|
||
| Console.WriteLine ($""JSON Person representation: {sr.ReadToEnd ()}""); | ||
|
|
||
| / |
Copilot
AI
Feb 4, 2026
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.
This line appears to contain only a forward slash character, which seems to be a typo or incomplete code. This line should likely be removed or the comment should be completed.
| / | |
| // |
|
|
||
| if (runtime == AndroidRuntime.CoreCLR || runtime == AndroidRuntime.NativeAOT) { | ||
| Assert.Ignore ("AppDomain.CurrentDomain.UnhandledException doesn't work in CoreCLR or NativeAOT"); | ||
| return; |
Copilot
AI
Feb 4, 2026
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.
The return statement after Assert.Ignore is unreachable because Assert.Ignore throws an exception. This return statement should be removed as it's dead code.
| return; |
| return; | ||
| } | ||
|
|
||
| if (!isRelease && !embedAssembliesIntoApk) { |
Copilot
AI
Feb 4, 2026
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.
This condition logic appears to be incorrect. The original test cases were (false, true), (false, false), and (true, false), meaning Debug with embedAssembliesIntoApk=false (the FastDev configuration) WAS tested. The condition should likely be "if (isRelease && embedAssembliesIntoApk)" to skip the Release+embedded combination which was not in the original test cases. As written, this incorrectly skips the Debug+not-embedded case which is the actual FastDev configuration that should be tested.
| if (!isRelease && !embedAssembliesIntoApk) { | |
| if (isRelease && embedAssembliesIntoApk) { |
| // java.lang.UnsatisfiedLinkError: dlopen failed: library "lib中国.so" not found | ||
| // java.lang.UnsatisfiedLinkError: dlopen failed: library "lib随机生成器.so" not found | ||
| // | ||
| // It might be an issue with the Android shared libary loader or name encoding in the archive. It might |
Copilot
AI
Feb 4, 2026
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.
Spelling: "libary" should be "library"
| // It might be an issue with the Android shared libary loader or name encoding in the archive. It might | |
| // It might be an issue with the Android shared library loader or name encoding in the archive. It might |
|
|
||
| // Mono-only test for the moment (until net10 or later is the "previous" framework) | ||
| if (runtime != AndroidRuntime.MonoVM) { | ||
| Assert.Ignore ("Mono-only test util net9 is no longer the 'previous' SDK"); |
Copilot
AI
Feb 4, 2026
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.
Spelling: "util" should be "until"
| Assert.Ignore ("Mono-only test util net9 is no longer the 'previous' SDK"); | |
| Assert.Ignore ("Mono-only test until net9 is no longer the 'previous' SDK"); |
| Assert.Ignore ("Type and member mapping is currently unsupported under NativeAOT"); | ||
| } | ||
|
|
||
| var proj = new XamarinAndroidApplicationProject (packageName: PackageUtils.MakePackageName (runtime)) { |
Copilot
AI
Feb 4, 2026
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.
Local scope variable 'proj' shadows InstallAndRunTests.proj.
| Assert.Ignore ("Currently broken on NativeAOT"); | ||
| } | ||
|
|
||
| var proj = new XamarinAndroidApplicationProject (packageName: PackageUtils.MakePackageName (runtime)) { |
Copilot
AI
Feb 4, 2026
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.
Local scope variable 'proj' shadows InstallAndRunTests.proj.
| } | ||
|
|
||
| var proj = new XamarinAndroidApplicationProject { | ||
| var proj = new XamarinAndroidApplicationProject (packageName: PackageUtils.MakePackageName (runtime)) { |
Copilot
AI
Feb 4, 2026
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.
Local scope variable 'proj' shadows InstallAndRunTests.proj.
| var proj = new XamarinAndroidApplicationProject (packageName: PackageUtils.MakePackageName (runtime)) { | |
| var fastDeployProj = new XamarinAndroidApplicationProject (packageName: PackageUtils.MakePackageName (runtime)) { |
| gradleProject.Create (); | ||
|
|
||
| var proj = new XamarinAndroidApplicationProject { | ||
| var proj = new XamarinAndroidApplicationProject (packageName: PackageUtils.MakePackageName (runtime)) { |
Copilot
AI
Feb 4, 2026
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.
Local scope variable 'proj' shadows InstallAndRunTests.proj.
| return; | ||
| } | ||
|
|
||
| var proj = new XamarinAndroidApplicationProject (packageName: PackageUtils.MakePackageName (runtime)) { |
Copilot
AI
Feb 4, 2026
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.
Local scope variable 'proj' shadows InstallAndRunTests.proj.
No description provided.