diff options
author | Justin Cohen <justincohen@google.com> | 2018-06-05 15:30:25 +0000 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2018-09-25 08:27:12 +0000 |
commit | d8b71bac52ac483802975b9629575820cee04600 (patch) | |
tree | be77eb2114d7f7f798fe888c28a128df617262eb | |
parent | 91e04d13ea711db3fd6cb711cbf5012b11db2a96 (diff) |
[Backport] Various build fixes for Xcode 10.
* Removes IDEBundleInjection.framework from egtests.
* Corrects the DTXcode generation function to handle leading '10'.
* Fixes a main_application_delegate SDK change
* Fixes a non-null SDK change in a net unittest.
Bug: 843234, 849676
TBR: davidben@chromium.org
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I6555bd396e4b4bb4d05822ee5867f878d7928c65
Reviewed-on: https://chromium-review.googlesource.com/1086233
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Rohit Rao <rohitrao@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#564512}
Task-number: QTBUG-69476
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r-- | chromium/build/config/mac/sdk_info.py | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/chromium/build/config/mac/sdk_info.py b/chromium/build/config/mac/sdk_info.py index e63ac0bd19b..dcbc90a00cd 100644 --- a/chromium/build/config/mac/sdk_info.py +++ b/chromium/build/config/mac/sdk_info.py @@ -3,6 +3,8 @@ # found in the LICENSE file. import argparse +import doctest +import itertools import os import subprocess import sys @@ -10,16 +12,32 @@ import sys # This script prints information about the build system, the operating # system and the iOS or Mac SDK (depending on the platform "iphonesimulator", # "iphoneos" or "macosx" generally). -# -# In the GYP build, this is done inside GYP itself based on the SDKROOT -# variable. + +def SplitVersion(version): + """Splits the Xcode version to 3 values. + + >>> list(SplitVersion('8.2.1.1')) + ['8', '2', '1'] + >>> list(SplitVersion('9.3')) + ['9', '3', '0'] + >>> list(SplitVersion('10.0')) + ['10', '0', '0'] + """ + version = version.split('.') + return itertools.islice(itertools.chain(version, itertools.repeat('0')), 0, 3) def FormatVersion(version): - """Converts Xcode version to a format required for Info.plist.""" - version = version.replace('.', '') - version = version + '0' * (3 - len(version)) - return version.zfill(4) + """Converts Xcode version to a format required for DTXcode in Info.plist + >>> FormatVersion('8.2.1') + '0821' + >>> FormatVersion('9.3') + '0930' + >>> FormatVersion('10.0') + '1000' + """ + major, minor, patch = SplitVersion(version) + return ('%2s%s%s' % (major, minor, patch)).replace(' ', '0') def FillXcodeVersion(settings): """Fills the Xcode version and build number into |settings|.""" @@ -52,6 +70,8 @@ def FillSDKPathAndVersion(settings, platform, xcode_version): if __name__ == '__main__': + doctest.testmod() + parser = argparse.ArgumentParser() parser.add_argument("--developer_dir", required=False) args, unknownargs = parser.parse_known_args() |