Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2643)

Unified Diff: pylib/gyp/xcode_emulation.py

Issue 1876623002: Adds support for a new target spec: 'mac_xcuitest_bundle'. This allows us to create UI testing bund… (Closed) Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: Line length Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pylib/gyp/xcode_emulation.py
diff --git a/pylib/gyp/xcode_emulation.py b/pylib/gyp/xcode_emulation.py
index 2dec19e5d6fb548bd2002c37f88dbcf0086eecab..c66a5fe1cf6e9c216ffd06b9edee14e6a8fce925 100644
--- a/pylib/gyp/xcode_emulation.py
+++ b/pylib/gyp/xcode_emulation.py
@@ -229,11 +229,15 @@ class XcodeSettings(object):
self.isIOS
def _IsBundle(self):
- return int(self.spec.get('mac_bundle', 0)) != 0 or self._IsXCTest()
+ return int(self.spec.get('mac_bundle', 0)) != 0 or self._IsXCTest() or \
+ self._IsXCUiTest()
def _IsXCTest(self):
return int(self.spec.get('mac_xctest_bundle', 0)) != 0
+ def _IsXCUiTest(self):
+ return int(self.spec.get('mac_xcuitest_bundle', 0)) != 0
+
def _IsIosAppExtension(self):
return int(self.spec.get('ios_app_extension', 0)) != 0
@@ -332,6 +336,10 @@ class XcodeSettings(object):
assert self._IsBundle(), ('ios_watch_app flag requires mac_bundle '
'(target %s)' % self.spec['target_name'])
return 'com.apple.product-type.application.watchapp'
+ if self._IsXCUiTest():
+ assert self._IsBundle(), ('mac_xcuitest_bundle flag requires mac_bundle '
+ '(target %s)' % self.spec['target_name'])
+ return 'com.apple.product-type.bundle.ui-testing'
if self._IsBundle():
return {
'executable': 'com.apple.product-type.application',
@@ -1379,6 +1387,7 @@ def IsMacBundle(flavor, spec):
just a single file. Bundle rules do not produce a binary but also package
resources into that directory."""
is_mac_bundle = int(spec.get('mac_xctest_bundle', 0)) != 0 or \
+ int(spec.get('mac_xcuitest_bundle', 0)) != 0 or \
(int(spec.get('mac_bundle', 0)) != 0 and flavor == 'mac')
if is_mac_bundle:

Powered by Google App Engine
This is Rietveld 408576698