From 927d66de8b1eefdf7a5b88b5c7b5ee0dd7651777 Mon Sep 17 00:00:00 2001 From: Dean Ellis Date: Wed, 25 Oct 2017 21:02:43 +0100 Subject: [PATCH] [Xamarin.Android.Build.Tests] DebugType="None" test changes (#974) Commit 8643ded9 added support for running the tests in `msbuild`. Part of that change was altering the behaviour of `xbuild` to match that of `msbuild`, regarding the way they handle `$(DebugType) == "None"`. The commit altered `Xamarin.Android.Common.targets` to reset `$(DebugType)` to `portable` if `None` is detected. It also resets `$(DebugSymbols)` to `false` in the same senario. As a result the code these some tests which do the same thing should not longer be required. Remove this redundant code. --- .../Tests/Xamarin.Android.Build.Tests/BuildTest.cs | 2 -- .../Tests/Xamarin.Android.Build.Tests/ManifestTest.cs | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest.cs index ae9a00fe7..86aef0813 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest.cs +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest.cs @@ -1073,8 +1073,6 @@ namespace App1 Assert.IsTrue (b.Build (proj), "Build should have succeeded."); var apkPath = Path.Combine (Root, b.ProjectDirectory, proj.IntermediateOutputPath,"android", "bin", "UnnamedProject.UnnamedProject.apk"); - if (debugSymbols && optimize.HasValue && optimize.Value && debugType == "" && !b.RunningMSBuild) - expectedRuntime = "debug"; using (var apk = ZipHelper.OpenZip (apkPath)) { foreach (var abi in supportedAbi) { var runtime = runtimeInfo.FirstOrDefault (x => x.Abi == abi && x.Runtime == expectedRuntime); diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/ManifestTest.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/ManifestTest.cs index b58e07a75..a188ae030 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/ManifestTest.cs +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/ManifestTest.cs @@ -480,8 +480,6 @@ namespace Bug12935 using (var builder = CreateApkBuilder (Path.Combine ("temp", $"DebuggerAttribute_{debugType}_{isRelease}_{expected}"), false, false)) { Assert.IsTrue (builder.Build (proj), "Build should have succeeded"); var manifest = builder.Output.GetIntermediaryAsText (Root, Path.Combine ("android", "AndroidManifest.xml")); - if (!isRelease && debugType == "None" && !builder.RunningMSBuild) - expected = false; Assert.AreEqual (expected, manifest.Contains ("android:debuggable=\"true\""), $"Manifest {(expected ? "should" : "should not")} contain the andorid:debuggable attribute"); } }