Skip to content

Commit 3c2bf82

Browse files
committed
InstallAndRunTests.CustomLinkDescriptionPreserve updated, broken on NAOT too
1 parent 17a8b46 commit 3c2bf82

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

tests/MSBuildDeviceIntegration/Tests/InstallAndRunTests.cs

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -379,10 +379,28 @@ public void SmokeTestBuildAndRunWithSpecialCharacters (string testName, AndroidR
379379
[Test]
380380
public void CustomLinkDescriptionPreserve (
381381
[Values (AndroidLinkMode.SdkOnly, AndroidLinkMode.Full)] AndroidLinkMode linkMode,
382-
[Values (AndroidRuntime.MonoVM)] AndroidRuntime runtime
382+
[Values] AndroidRuntime runtime
383383
)
384384
{
385+
const bool isRelease = true;
386+
if (IgnoreUnsupportedConfiguration (runtime, release: isRelease)) {
387+
return;
388+
}
389+
390+
if (runtime == AndroidRuntime.CoreCLR) {
391+
Assert.Ignore ("Currently broken on CoreCLR");
392+
}
393+
394+
// TODO: NativeAOT perhaps should work here (ignoring all the MonoAOT settings?), but for now it fails with
395+
//
396+
// Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(120,5): error NETSDK1207: Ahead-of-time compilation is not supported for the target framework.
397+
//
398+
if (runtime == AndroidRuntime.NativeAOT) {
399+
Assert.Ignore ("NativeAOT is currently broken here");
400+
}
401+
385402
var lib1 = new XamarinAndroidLibraryProject () {
403+
IsRelease = isRelease,
386404
ProjectName = "Library1",
387405
Sources = {
388406
new BuildItem.Source ("SomeClass.cs") {
@@ -420,6 +438,7 @@ public class LinkModeFullClass {
420438
lib1.SetRuntime (runtime);
421439

422440
var lib2 = new DotNetStandard {
441+
IsRelease = isRelease,
423442
ProjectName = "LinkTestLib",
424443
Sdk = "Microsoft.NET.Sdk",
425444
TargetFramework = "netstandard2.0",
@@ -446,8 +465,8 @@ public class LinkModeFullClass {
446465
};
447466
lib2.SetRuntime (runtime);
448467

449-
proj = new XamarinFormsAndroidApplicationProject () {
450-
IsRelease = true,
468+
proj = new XamarinFormsAndroidApplicationProject (packageName: PackageUtils.MakePackageName (runtime)) {
469+
IsRelease = isRelease,
451470
AndroidLinkModeRelease = linkMode,
452471
References = {
453472
new BuildItem ("ProjectReference", "..\\Library1\\Library1.csproj"),

0 commit comments

Comments
 (0)