Skip to content

Conversation

@grendello
Copy link
Contributor

No description provided.

@grendello grendello force-pushed the dev/grendel/test-runtimes-13 branch 2 times, most recently from 7e3f8f4 to a45dafc Compare December 9, 2025 19:43
@grendello grendello marked this pull request as ready for review December 10, 2025 15:07
@grendello grendello force-pushed the dev/grendel/test-runtimes-13 branch from 1fc2bd5 to f728327 Compare December 12, 2025 08:38
@grendello
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@grendello grendello force-pushed the dev/grendel/test-runtimes-13 branch 3 times, most recently from a6f8ea0 to f802ad8 Compare January 14, 2026 09:58
@grendello grendello force-pushed the dev/grendel/test-runtimes-13 branch from 4a71530 to e5a3fb0 Compare February 2, 2026 10:04
@grendello grendello force-pushed the dev/grendel/test-runtimes-13 branch from e5a3fb0 to d305b94 Compare February 4, 2026 09:06
Copilot AI review requested due to automatic review settings February 4, 2026 09:06
Copy link

Copilot AI left a 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 IgnoreUnsupportedConfiguration checks and runtime-specific Assert.Ignore statements for known limitations
  • Created test data generator methods Get_DotNetRun_Data and Get_SmokeTestBuildAndRunWithSpecialCharacters_Data to 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 ()}"");

/
Copy link

Copilot AI Feb 4, 2026

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.

Suggested change
/
//

Copilot uses AI. Check for mistakes.

if (runtime == AndroidRuntime.CoreCLR || runtime == AndroidRuntime.NativeAOT) {
Assert.Ignore ("AppDomain.CurrentDomain.UnhandledException doesn't work in CoreCLR or NativeAOT");
return;
Copy link

Copilot AI Feb 4, 2026

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.

Suggested change
return;

Copilot uses AI. Check for mistakes.
return;
}

if (!isRelease && !embedAssembliesIntoApk) {
Copy link

Copilot AI Feb 4, 2026

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.

Suggested change
if (!isRelease && !embedAssembliesIntoApk) {
if (isRelease && embedAssembliesIntoApk) {

Copilot uses AI. Check for mistakes.
// 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
Copy link

Copilot AI Feb 4, 2026

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"

Suggested change
// 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

Copilot uses AI. Check for mistakes.

// 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");
Copy link

Copilot AI Feb 4, 2026

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"

Suggested change
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");

Copilot uses AI. Check for mistakes.
Assert.Ignore ("Type and member mapping is currently unsupported under NativeAOT");
}

var proj = new XamarinAndroidApplicationProject (packageName: PackageUtils.MakePackageName (runtime)) {
Copy link

Copilot AI Feb 4, 2026

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.

Copilot uses AI. Check for mistakes.
Assert.Ignore ("Currently broken on NativeAOT");
}

var proj = new XamarinAndroidApplicationProject (packageName: PackageUtils.MakePackageName (runtime)) {
Copy link

Copilot AI Feb 4, 2026

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.

Copilot uses AI. Check for mistakes.
}

var proj = new XamarinAndroidApplicationProject {
var proj = new XamarinAndroidApplicationProject (packageName: PackageUtils.MakePackageName (runtime)) {
Copy link

Copilot AI Feb 4, 2026

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.

Suggested change
var proj = new XamarinAndroidApplicationProject (packageName: PackageUtils.MakePackageName (runtime)) {
var fastDeployProj = new XamarinAndroidApplicationProject (packageName: PackageUtils.MakePackageName (runtime)) {

Copilot uses AI. Check for mistakes.
gradleProject.Create ();

var proj = new XamarinAndroidApplicationProject {
var proj = new XamarinAndroidApplicationProject (packageName: PackageUtils.MakePackageName (runtime)) {
Copy link

Copilot AI Feb 4, 2026

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.

Copilot uses AI. Check for mistakes.
return;
}

var proj = new XamarinAndroidApplicationProject (packageName: PackageUtils.MakePackageName (runtime)) {
Copy link

Copilot AI Feb 4, 2026

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.

Copilot uses AI. Check for mistakes.
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.

2 participants