From c8b35f9b6a11cbeba300f040401959d2978ef4f4 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 26 May 2016 15:15:08 +0200 Subject: [PATCH] [xharness] Fix mlaunch lookup. --- tests/xharness/Harness.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/xharness/Harness.cs b/tests/xharness/Harness.cs index c35c1fc2b5..a89ba62050 100644 --- a/tests/xharness/Harness.cs +++ b/tests/xharness/Harness.cs @@ -77,9 +77,15 @@ namespace xharness public string MlaunchPath { get { - var path = Path.GetFullPath (Path.Combine (Path.GetDirectoryName (RootDirectory), "tools", "mlaunch", "mlaunch")); + var path = Path.GetFullPath (Path.Combine (Path.GetDirectoryName (Path.GetDirectoryName (RootDirectory)), "maccore", "tools", "mlaunch", "mlaunch")); + if (!File.Exists (path)) { + Log ("Could not find mlaunch locally ({0}), will try in Xamarin Studio.app.", path); + path = "/Applications/Xamarin Studio.app/Contents/Resources/lib/monodevelop/AddIns/MonoDevelop.IPhone/mlaunch.app/Contents/MacOS/mlaunch"; + } + if (!File.Exists (path)) throw new FileNotFoundException (string.Format ("Could not find mlaunch: {0}", path)); + return path; } }