Skip to content

Commit

Permalink
Enable default xcode path (#16708)
Browse files Browse the repository at this point in the history
* If specific XCODE path isn't found don't include it on args

* - always include args for CI build

* - cleanup
  • Loading branch information
PureWeen authored and rmarinho committed Aug 19, 2023
1 parent 4acbdb8 commit c393ac2
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions eng/devices/ios.cake
Original file line number Diff line number Diff line change
Expand Up @@ -175,14 +175,26 @@ Task("Test")
DeleteFiles(Directory(TEST_RESULTS).Path.Combine("*.*").FullPath);
}

var XCODE_PATH = "/Applications/Xcode_14.3.0.app";
var XCODE_PATH = Argument("xcode_path", "");

if (String.IsNullOrEmpty(XCODE_PATH) && IsCIBuild())
XCODE_PATH = "/Applications/Xcode_14.3.0.app";

string xcode_args = "";
if (!String.IsNullOrEmpty(XCODE_PATH))
{
xcode_args = $"--xcode=\"{XCODE_PATH}\" ";
}

Information("XCODE PATH: {0}", XCODE_PATH);

var settings = new DotNetToolSettings {
DiagnosticOutput = true,
ArgumentCustomization = args => args.Append("run xharness apple test " +
$"--app=\"{TEST_APP}\" " +
$"--targets=\"{TEST_DEVICE}\" " +
$"--output-directory=\"{TEST_RESULTS}\" " +
$"--xcode=\"{XCODE_PATH}\" " +
xcode_args +
$"--verbosity=\"Debug\" ")
};

Expand Down

0 comments on commit c393ac2

Please sign in to comment.