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

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: 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
« no previous file with comments | « pylib/gyp/generator/xcode.py ('k') | pylib/gyp/xcodeproj_file.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/xcode_emulation.py
diff --git a/pylib/gyp/xcode_emulation.py b/pylib/gyp/xcode_emulation.py
index 0e5031028531cc5e39138199d494c03f33bc5239..2d7ad771fd3e6311da1ad45189811357f5b231bd 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
@@ -333,6 +337,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',
@@ -1420,6 +1428,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:
« no previous file with comments | « pylib/gyp/generator/xcode.py ('k') | pylib/gyp/xcodeproj_file.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698