[xharness] Rename MacUnifiedTarget to MacTarget.
Everything is Unified now, so specifying it is redundant.
This commit is contained in:
Родитель
aaf29c559f
Коммит
d9cf090a65
|
@ -431,10 +431,10 @@ namespace xharness
|
||||||
{
|
{
|
||||||
int rv = 0;
|
int rv = 0;
|
||||||
|
|
||||||
var unified_targets = new List<MacUnifiedTarget> ();
|
var unified_targets = new List<MacTarget> ();
|
||||||
var hardcoded_unified_targets = new List<MacUnifiedTarget> ();
|
var hardcoded_unified_targets = new List<MacTarget> ();
|
||||||
|
|
||||||
Action<MacUnifiedTarget, string, bool> configureTarget = (MacUnifiedTarget target, string file, bool isNUnitProject) => {
|
Action<MacTarget, string, bool> configureTarget = (MacTarget target, string file, bool isNUnitProject) => {
|
||||||
target.TemplateProjectPath = file;
|
target.TemplateProjectPath = file;
|
||||||
target.Harness = this;
|
target.Harness = this;
|
||||||
target.IsNUnitProject = isNUnitProject;
|
target.IsNUnitProject = isNUnitProject;
|
||||||
|
@ -464,14 +464,14 @@ namespace xharness
|
||||||
}
|
}
|
||||||
|
|
||||||
if (proj.GenerateFull) {
|
if (proj.GenerateFull) {
|
||||||
var full = new MacUnifiedTarget (false);
|
var full = new MacTarget (false);
|
||||||
full.MonoNativeInfo = proj.MonoNativeInfo;
|
full.MonoNativeInfo = proj.MonoNativeInfo;
|
||||||
configureTarget (full, file, proj.IsNUnitProject);
|
configureTarget (full, file, proj.IsNUnitProject);
|
||||||
unified_targets.Add (full);
|
unified_targets.Add (full);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (proj.GenerateSystem) {
|
if (proj.GenerateSystem) {
|
||||||
var system = new MacUnifiedTarget (false);
|
var system = new MacTarget (false);
|
||||||
system.System = true;
|
system.System = true;
|
||||||
configureTarget (system, file, proj.IsNUnitProject);
|
configureTarget (system, file, proj.IsNUnitProject);
|
||||||
unified_targets.Add (system);
|
unified_targets.Add (system);
|
||||||
|
@ -480,7 +480,7 @@ namespace xharness
|
||||||
|
|
||||||
foreach (var proj in MacTestProjects.Where (v => !v.GenerateVariations)) {
|
foreach (var proj in MacTestProjects.Where (v => !v.GenerateVariations)) {
|
||||||
var file = proj.Path;
|
var file = proj.Path;
|
||||||
var unified = new MacUnifiedTarget (proj.GenerateModern, shouldSkipProjectGeneration: true);
|
var unified = new MacTarget (proj.GenerateModern, shouldSkipProjectGeneration: true);
|
||||||
unified.BCLInfo = proj.BCLInfo;
|
unified.BCLInfo = proj.BCLInfo;
|
||||||
configureTarget (unified, file, proj.IsNUnitProject);
|
configureTarget (unified, file, proj.IsNUnitProject);
|
||||||
hardcoded_unified_targets.Add (unified);
|
hardcoded_unified_targets.Add (unified);
|
||||||
|
|
|
@ -7,7 +7,7 @@ using Xamarin;
|
||||||
|
|
||||||
namespace xharness
|
namespace xharness
|
||||||
{
|
{
|
||||||
public class MacUnifiedTarget : Target
|
public class MacTarget : Target
|
||||||
{
|
{
|
||||||
public bool Mobile { get; private set; }
|
public bool Mobile { get; private set; }
|
||||||
public bool System { get; set; }
|
public bool System { get; set; }
|
||||||
|
@ -19,7 +19,7 @@ namespace xharness
|
||||||
bool SkipProjectGeneration;
|
bool SkipProjectGeneration;
|
||||||
bool SkipSuffix;
|
bool SkipSuffix;
|
||||||
|
|
||||||
public MacUnifiedTarget (bool mobile, bool shouldSkipProjectGeneration = false, bool skipSuffix = false) : base ()
|
public MacTarget (bool mobile, bool shouldSkipProjectGeneration = false, bool skipSuffix = false) : base ()
|
||||||
{
|
{
|
||||||
Mobile = mobile;
|
Mobile = mobile;
|
||||||
SkipProjectGeneration = shouldSkipProjectGeneration;
|
SkipProjectGeneration = shouldSkipProjectGeneration;
|
|
@ -26,7 +26,7 @@ namespace xharness
|
||||||
|
|
||||||
enum MacTargetNameType { Build, Clean, Exec, Run }
|
enum MacTargetNameType { Build, Clean, Exec, Run }
|
||||||
|
|
||||||
static string MakeMacUnifiedTargetName (MacUnifiedTarget target, MacTargetNameType type)
|
static string MakeMacUnifiedTargetName (MacTarget target, MacTargetNameType type)
|
||||||
{
|
{
|
||||||
var make_escaped_suffix = "-" + target.Platform.Replace (" ", "\\ ");
|
var make_escaped_suffix = "-" + target.Platform.Replace (" ", "\\ ");
|
||||||
var make_escaped_name = target.SimplifiedName.Replace (" ", "\\ ");
|
var make_escaped_name = target.SimplifiedName.Replace (" ", "\\ ");
|
||||||
|
@ -57,7 +57,7 @@ namespace xharness
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void CreateMacMakefile (Harness harness, IEnumerable<MacUnifiedTarget> targets)
|
public static void CreateMacMakefile (Harness harness, IEnumerable<MacTarget> targets)
|
||||||
{
|
{
|
||||||
var makefile = Path.Combine (harness.RootDirectory, "Makefile-mac.inc");
|
var makefile = Path.Combine (harness.RootDirectory, "Makefile-mac.inc");
|
||||||
using (var writer = new StreamWriter (makefile, false, new UTF8Encoding (false))) {
|
using (var writer = new StreamWriter (makefile, false, new UTF8Encoding (false))) {
|
||||||
|
@ -71,7 +71,7 @@ namespace xharness
|
||||||
writer.WriteLine ("\t$(Q) $(SYSTEM_MONO) /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/nuget/NuGet.exe restore tests-mac.sln");
|
writer.WriteLine ("\t$(Q) $(SYSTEM_MONO) /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/nuget/NuGet.exe restore tests-mac.sln");
|
||||||
writer.WriteLine ("\t$(Q) touch $@");
|
writer.WriteLine ("\t$(Q) touch $@");
|
||||||
|
|
||||||
var allTargets = new List<MacUnifiedTarget> ();
|
var allTargets = new List<MacTarget> ();
|
||||||
allTargets.AddRange (targets);
|
allTargets.AddRange (targets);
|
||||||
|
|
||||||
List<string> allTargetNames = new List<string> (allTargets.Count);
|
List<string> allTargetNames = new List<string> (allTargets.Count);
|
||||||
|
@ -146,7 +146,7 @@ namespace xharness
|
||||||
writer.WriteLine ("# Container targets that run multiple test projects");
|
writer.WriteLine ("# Container targets that run multiple test projects");
|
||||||
writer.WriteLine ();
|
writer.WriteLine ();
|
||||||
|
|
||||||
IEnumerable<MacUnifiedTarget> groupableTargets = allTargets;
|
IEnumerable<MacTarget> groupableTargets = allTargets;
|
||||||
|
|
||||||
var grouped = groupableTargets.GroupBy ((target) => target.SimplifiedName);
|
var grouped = groupableTargets.GroupBy ((target) => target.SimplifiedName);
|
||||||
foreach (MacTargetNameType action in Enum.GetValues (typeof (MacTargetNameType))) {
|
foreach (MacTargetNameType action in Enum.GetValues (typeof (MacTargetNameType))) {
|
||||||
|
|
|
@ -92,7 +92,7 @@
|
||||||
<Compile Include="DeviceLogCapturer.cs" />
|
<Compile Include="DeviceLogCapturer.cs" />
|
||||||
<Compile Include="MakefileGenerator.cs" />
|
<Compile Include="MakefileGenerator.cs" />
|
||||||
<Compile Include="SolutionGenerator.cs" />
|
<Compile Include="SolutionGenerator.cs" />
|
||||||
<Compile Include="MacUnifiedTarget.cs" />
|
<Compile Include="MacTarget.cs" />
|
||||||
<Compile Include="SimpleHttpListener.cs" />
|
<Compile Include="SimpleHttpListener.cs" />
|
||||||
<Compile Include="SimpleListener.cs" />
|
<Compile Include="SimpleListener.cs" />
|
||||||
<Compile Include="Jenkins.cs" />
|
<Compile Include="Jenkins.cs" />
|
||||||
|
|
Загрузка…
Ссылка в новой задаче