The ProtocolTest test is located in the bindings-test assembly, and it requires certain conditional compilation defines to be set in order to behave properly. With this fix we correctly set these defines when cloning the bindings-test project (in addition to when we set the defines for the main project, which is either monotouch-test or linkall for this test). Fixes https://github.com/xamarin/maccore/issues/655.
This commit is contained in:
Родитель
27e757e45e
Коммит
7ddb263e7d
|
@ -245,8 +245,16 @@ namespace xharness
|
||||||
clone.Xml.AddMonoBundlingExtraArgs (bundling_extra_args, task.ProjectPlatform, configuration);
|
clone.Xml.AddMonoBundlingExtraArgs (bundling_extra_args, task.ProjectPlatform, configuration);
|
||||||
if (!string.IsNullOrEmpty (link_mode))
|
if (!string.IsNullOrEmpty (link_mode))
|
||||||
clone.Xml.SetNode (isMac ? "LinkMode" : "MtouchLink", link_mode, task.ProjectPlatform, configuration);
|
clone.Xml.SetNode (isMac ? "LinkMode" : "MtouchLink", link_mode, task.ProjectPlatform, configuration);
|
||||||
if (!string.IsNullOrEmpty (defines))
|
if (!string.IsNullOrEmpty (defines)) {
|
||||||
clone.Xml.AddAdditionalDefines (defines, task.ProjectPlatform, configuration);
|
clone.Xml.AddAdditionalDefines (defines, task.ProjectPlatform, configuration);
|
||||||
|
if (clone.ProjectReferences != null) {
|
||||||
|
foreach (var pr in clone.ProjectReferences) {
|
||||||
|
pr.Xml.AddAdditionalDefines (defines, task.ProjectPlatform, configuration);
|
||||||
|
pr.Xml.Save (pr.Path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
clone.Xml.SetNode (isMac ? "Profiling" : "MTouchProfiling", profiling ? "True" : "False", task.ProjectPlatform, configuration);
|
clone.Xml.SetNode (isMac ? "Profiling" : "MTouchProfiling", profiling ? "True" : "False", task.ProjectPlatform, configuration);
|
||||||
|
|
||||||
if (!debug && !isMac)
|
if (!debug && !isMac)
|
||||||
|
|
|
@ -661,7 +661,7 @@ namespace xharness
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
var defines = csproj.CreateElement ("DefineConstants", MSBuild_Namespace);
|
var defines = csproj.CreateElement ("DefineConstants", MSBuild_Namespace);
|
||||||
defines.InnerText = value;
|
defines.InnerText = "$(DefineConstants);" + value;
|
||||||
xmlnode.AppendChild (defines);
|
xmlnode.AppendChild (defines);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,8 @@ namespace xharness
|
||||||
public bool GenerateVariations = true;
|
public bool GenerateVariations = true;
|
||||||
public string [] Configurations;
|
public string [] Configurations;
|
||||||
|
|
||||||
|
public IEnumerable<TestProject> ProjectReferences;
|
||||||
|
|
||||||
public TestProject ()
|
public TestProject ()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -120,11 +122,14 @@ namespace xharness
|
||||||
}
|
}
|
||||||
doc.ResolveAllPaths (original_path);
|
doc.ResolveAllPaths (original_path);
|
||||||
|
|
||||||
|
var projectReferences = new List<TestProject> ();
|
||||||
foreach (var pr in doc.GetProjectReferences ()) {
|
foreach (var pr in doc.GetProjectReferences ()) {
|
||||||
var tp = new TestProject (pr.Replace ('\\', '/'));
|
var tp = new TestProject (pr.Replace ('\\', '/'));
|
||||||
await tp.CreateCopyAsync (test);
|
await tp.CreateCopyAsync (test);
|
||||||
doc.SetProjectReferenceInclude (pr, tp.Path.Replace ('/', '\\'));
|
doc.SetProjectReferenceInclude (pr, tp.Path.Replace ('/', '\\'));
|
||||||
|
projectReferences.Add (tp);
|
||||||
}
|
}
|
||||||
|
this.ProjectReferences = projectReferences;
|
||||||
|
|
||||||
doc.Save (Path);
|
doc.Save (Path);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче