Skip to content

Commit

Permalink
X
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Baulig committed Oct 30, 2018
1 parent 3416bdb commit b4185d8
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 56 deletions.
9 changes: 0 additions & 9 deletions tests/xharness/Harness.cs
Original file line number Diff line number Diff line change
Expand Up @@ -505,13 +505,9 @@ void ConfigureIOS ()
var file = proj.Path;
if (proj.MonoNativeInfo != null)
file = proj.MonoNativeInfo.TemplatePath;

if (!File.Exists (file))
throw new FileNotFoundException (file);

if (proj.MonoNativeInfo != null)
file = proj.MonoNativeInfo.TemplatePath;

if (!proj.SkipwatchOSVariation) {
var watchos = new WatchOSTarget () {
TemplateProjectPath = file,
Expand Down Expand Up @@ -541,11 +537,6 @@ void ConfigureIOS ()
unified.Execute ();
unified_targets.Add (unified);

if (proj.MonoNativeInfo != null) {
//FIXME
continue;
}

var today = new TodayExtensionTarget {
TemplateProjectPath = file,
Harness = this,
Expand Down
2 changes: 2 additions & 0 deletions tests/xharness/MonoNativeInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ public MonoNativeInfo (Harness harness, MonoNativeFlavor flavor)

public void Convert ()
{
return;

var inputProject = new XmlDocument ();

var xml = File.ReadAllText (TemplatePath);
Expand Down
2 changes: 1 addition & 1 deletion tests/xharness/TVOSTarget.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class TVOSTarget : iOSTarget
{
public override string Suffix {
get {
return MonoNativeInfo != null ? MonoNativeInfo.FlavorSuffix + "-tvos" : "-tvos";
return "-tvos";
}
}

Expand Down
8 changes: 0 additions & 8 deletions tests/xharness/Target.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,6 @@ protected void CreateExecutableProject ()
info_plist.SetMinimumOSVersion (GetMinimumOSVersion (info_plist.GetMinimumOSVersion ()));
info_plist.SetUIDeviceFamily (UIDeviceFamily);
Harness.Save (info_plist, target_info_plist);

var linker_defs = Path.Combine (TargetDirectory, "extra-linker-defs.xml");
var target_linker_defs = Path.Combine (TargetDirectory, "extra-linker-defs" + Suffix + ".xml");
if (File.Exists (linker_defs) && !File.Exists (target_linker_defs)) {
XmlDocument linker_defs_doc = new XmlDocument ();
linker_defs_doc.LoadWithoutNetworkAccess (target_linker_defs);
Harness.Save (linker_defs_doc, target_linker_defs);
}
}
}

Expand Down
17 changes: 1 addition & 16 deletions tests/xharness/TodayExtensionTarget.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class TodayExtensionTarget : UnifiedTarget

public override string Suffix {
get {
return MonoNativeInfo != null ? MonoNativeInfo.FlavorSuffix + "-today" : "-today";
return "-today";
}
}

Expand All @@ -30,8 +30,6 @@ public override string ExtraLinkerDefsSuffix {

public override string ProjectFileSuffix {
get {
if (MonoNativeInfo != null)
return MonoNativeInfo.FlavorSuffix + "-today";
return "-today";
}
}
Expand Down Expand Up @@ -96,8 +94,6 @@ void CreateTodayExtensionProject ()

Harness.Save (csproj, TodayExtensionProjectPath);

CreateExtraLinkerDefs (Suffix);

TodayExtensionGuid = csproj.GetProjectGuid ();

XmlDocument info_plist = new XmlDocument ();
Expand All @@ -118,17 +114,6 @@ void CreateTodayExtensionProject ()
Harness.Save (info_plist, target_info_plist);
}

void CreateExtraLinkerDefs (string suffix)
{
var linker_defs = Path.Combine (TargetDirectory, "extra-linker-defs.xml");
var target_linker_defs = Path.Combine (TargetDirectory, "extra-linker-defs" + suffix + ".xml");
if (File.Exists (linker_defs) && !File.Exists (target_linker_defs)) {
XmlDocument linker_defs_doc = new XmlDocument ();
linker_defs_doc.LoadWithoutNetworkAccess (linker_defs);
Harness.Save (linker_defs_doc, target_linker_defs);
}
}

protected override void ExecuteInternal ()
{
ExtensionName = Name + " Today Extension";
Expand Down
4 changes: 2 additions & 2 deletions tests/xharness/UnifiedTarget.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class UnifiedTarget : iOSTarget
{
public override string Suffix {
get {
return MonoNativeInfo != null ? MonoNativeInfo.FlavorSuffix : "-ios";
return "-ios";
}
}

Expand Down Expand Up @@ -124,7 +124,7 @@ protected override bool SupportsBitcode {

protected override void ExecuteInternal ()
{
if (MonoNativeInfo == null)
if (true || MonoNativeInfo == null)
return;

MonoNativeInfo.AddProjectDefines (inputProject);
Expand Down
22 changes: 2 additions & 20 deletions tests/xharness/WatchOSTarget.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ void CreateWatchOSExtensionProject ()

Harness.Save (csproj, WatchOSExtensionProjectPath);

CreateExtraLinkerDefs (Suffix);

WatchOSExtensionGuid = csproj.GetProjectGuid ();

XmlDocument info_plist = new XmlDocument ();
Expand All @@ -120,10 +118,7 @@ void CreateWatchOSExtensionProject ()
if (BundleIdentifier.Length >= 58)
BundleIdentifier = BundleIdentifier.Substring (0, 57); // If the main app's bundle id is 58 characters (or sometimes more), then the watch extension crashes at launch. radar #29847128.
info_plist.SetCFBundleIdentifier (BundleIdentifier + ".watchkitapp.watchkitextension");
if (MonoNativeInfo != null)
info_plist.SetMinimumOSVersion (MonoNativeInfo.GetMinimumWatchOSVersion ());
else
info_plist.SetMinimumOSVersion ("2.0");
info_plist.SetMinimumOSVersion ("2.0");
info_plist.SetUIDeviceFamily (4);
info_plist.AddPListStringValue ("RemoteInterfacePrincipleClass", "InterfaceController");
info_plist.AddPListKeyValuePair ("NSExtension", "dict", string.Format (
Expand Down Expand Up @@ -174,19 +169,6 @@ void CreateWatchOSLibraryProject ()
Harness.Save (csproj, WatchOSProjectPath);

WatchOSGuid = csproj.GetProjectGuid ();

CreateExtraLinkerDefs (Suffix);
}

void CreateExtraLinkerDefs (string suffix)
{
var linker_defs = Path.Combine (TargetDirectory, "extra-linker-defs.xml");
var target_linker_defs = Path.Combine (TargetDirectory, "extra-linker-defs" + suffix + ".xml");
if (File.Exists (linker_defs) && !File.Exists (target_linker_defs)) {
XmlDocument linker_defs_doc = new XmlDocument ();
linker_defs_doc.LoadWithoutNetworkAccess (linker_defs);
Harness.Save (linker_defs_doc, target_linker_defs);
}
}

protected override void ExecuteInternal ()
Expand Down Expand Up @@ -238,7 +220,7 @@ protected override string GetMinimumOSVersion (string templateMinimumOSVersion)

public override string Suffix {
get {
return MonoNativeInfo != null ? MonoNativeInfo.FlavorSuffix + "-watchos" : "-watchos";
return "-watchos";
}
}

Expand Down

0 comments on commit b4185d8

Please sign in to comment.