Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ protected override void ProcessAssembly (AssemblyDefinition assembly)
}

if (changed) {
Context.SafeReadSymbols (assembly);
AssemblyAction action = Annotations.HasAction (assembly) ? Annotations.GetAction (assembly) : AssemblyAction.Skip;
if (action == AssemblyAction.Skip || action == AssemblyAction.Copy || action == AssemblyAction.Delete)
Annotations.SetAction (assembly, AssemblyAction.Save);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,70 @@ public void BuildBasicApplicationCheckMdbRepeatBuild ()
}
}

[Test]
public void BuildAppCheckDebugSymbols ()
{
var path = Path.Combine ("temp", TestContext.CurrentContext.Test.Name);
var lib = new XamarinAndroidLibraryProject () {
IsRelease = false,
ProjectName = "Library1",
Sources = {
new BuildItem.Source ("Class1.cs") {
TextContent = () => @"using System;
namespace Library1 {
public class Class1 : Java.Lang.Object, global::Android.Views.View.IOnClickListener {
void global::Android.Views.View.IOnClickListener.OnClick(global::Android.Views.View v)
{
}
}
}
",
},
},
};
var proj = new XamarinAndroidApplicationProject () {
IsRelease = false,
ProjectName = "App1",
References = { new BuildItem ("ProjectReference", "..\\Library1\\Library1.csproj") },
Sources = {
new BuildItem.Source ("Class2.cs") {
TextContent= () => @"
using System;
namespace App1
{
public class Class2
{
Library1.Class1 c;
public Class2 ()
{
}
}
}"
},
},
};
proj.SetProperty (KnownProperties.AndroidLinkMode, AndroidLinkMode.None.ToString ());
using (var libb = CreateDllBuilder (Path.Combine (path, "Library1"))) {
Assert.IsTrue (libb.Build (lib), "Library1 Build should have succeeded.");
using (var b = CreateApkBuilder (Path.Combine (path, "App1"))) {
Assert.IsTrue (b.Build (proj), "App1 Build should have succeeded.");
var assetsPdb = Path.Combine (Root, b.ProjectDirectory, proj.IntermediateOutputPath, "android", "assets", "Library1.pdb");
var linkDst = Path.Combine (Root, b.ProjectDirectory, proj.IntermediateOutputPath, "linkdst", "Library1.pdb");
var linkSrc = Path.Combine (Root, b.ProjectDirectory, proj.IntermediateOutputPath, "linksrc", "Library1.pdb");
Assert.IsTrue (
File.Exists (assetsPdb),
"Library1.pdb must be copied to Intermediate directory");
Assert.IsTrue (
File.Exists (linkDst),
"Library1.pdb must be copied to linkdst directory");
Assert.IsTrue (
File.Exists (linkSrc),
"Library1.pdb must be copied to linksrc directory");
FileAssert.AreEqual (linkDst, assetsPdb, $"Library1.pdb in {assetsPdb} should match {linkDst}");
}
}
}

[Test]
public void BuildBasicApplicationCheckMdbAndPortablePdb ()
{
Expand Down