Diff
Modified: branches/safari-603-branch/Tools/ChangeLog (216532 => 216533)
--- branches/safari-603-branch/Tools/ChangeLog 2017-05-09 19:15:31 UTC (rev 216532)
+++ branches/safari-603-branch/Tools/ChangeLog 2017-05-09 19:27:39 UTC (rev 216533)
@@ -1,3 +1,33 @@
+2017-05-09 Ryan Haddad <ryanhad...@apple.com>
+
+ Merge r213654. rdar://problem/32074957
+
+ 2017-03-09 Jonathan Bedard <jbed...@apple.com>
+
+ Standardize device/simulator naming conventions
+ https://bugs.webkit.org/show_bug.cgi?id=169083
+ <rdar://problem/30810466>
+
+ Reviewed by Alexey Proskuryakov.
+
+ * Scripts/build-webkit: Document --ios-device and --simulator options.
+ * Scripts/package-root:
+ (usage): Ditto.
+ * Scripts/run-api-tests: Document --simulator option.
+ * Scripts/webkitdirs.pm:
+ (argumentsForConfiguration): Use --ios-device by default rather than --device.
+ (determineXcodeSDK): Parse --ios-device and --simulator options.
+ * Scripts/webkitpy/common/config/ews.json: Change port name from ios to ios-device.
+ * Scripts/webkitpy/common/config/ports.py: Ditto.
+ (DeprecatedPort.port):
+ (IOSPort): Change port name from ios to ios-device.
+ * Scripts/webkitpy/port/factory.py:
+ (platform_options): Add --simulator option.
+ (PortFactory): Update comment.
+ * Scripts/webkitpy/port/ios_device.py:
+ (IOSDevicePort): Change port name from ios to ios-device.
+ (IOSDevicePort.operating_system): Ditto.
+
2017-04-16 Jason Marcell <jmarc...@apple.com>
Roll out r211294 vi 215335. rdar://problem/31512298
Modified: branches/safari-603-branch/Tools/Scripts/build-webkit (216532 => 216533)
--- branches/safari-603-branch/Tools/Scripts/build-webkit 2017-05-09 19:15:31 UTC (rev 216532)
+++ branches/safari-603-branch/Tools/Scripts/build-webkit 2017-05-09 19:27:39 UTC (rev 216533)
@@ -88,8 +88,10 @@
--debug Compile with Debug configuration
--release Compile with Release configuration
--sdk=<sdk> Use a specific Xcode SDK (iOS and Mac only)
- --device Use "iphoneos.internal" SDK if installed, else "iphoneos" SDK (iOS only)
+ --ios-device Use "iphoneos.internal" SDK if installed, else "iphoneos" SDK (iOS only)
+ --device DEPRECATED alias of --ios-device
--ios-simulator Use the current iphonesimulator SDK (iOS only)
+ --simulator DEPRECATED alias of --ios-simulator
--coverage Enable code coverage support (Mac only)
--analyze Enable static anaylsis (iOS and Mac only)
Modified: branches/safari-603-branch/Tools/Scripts/package-root (216532 => 216533)
--- branches/safari-603-branch/Tools/Scripts/package-root 2017-05-09 19:15:31 UTC (rev 216532)
+++ branches/safari-603-branch/Tools/Scripts/package-root 2017-05-09 19:27:39 UTC (rev 216533)
@@ -46,8 +46,10 @@
--help Show this help message
--sdk Specifies SDK for which the roots are staged
(Default: currently installed Base SDK)
- --device Equivalent to --sdk iphoneos.internal
+ --ios-device Equivalent to --sdk iphoneos.internal
+ --device DEPRECATED alias of --ios-device
--ios-simulator Equivalent to --sdk iphonesimulator
+ --simulator DEPRECATED alias of --ios-simulator
--debug Package roots from Debug-<platform>
--release Package roots from Release-<platform>
Modified: branches/safari-603-branch/Tools/Scripts/run-api-tests (216532 => 216533)
--- branches/safari-603-branch/Tools/Scripts/run-api-tests 2017-05-09 19:15:31 UTC (rev 216532)
+++ branches/safari-603-branch/Tools/Scripts/run-api-tests 2017-05-09 19:27:39 UTC (rev 216533)
@@ -78,6 +78,7 @@
Platform options:
--ios-simulator Run tests in the iOS Simulator
+ --simulator DEPRECATED alias of --ios-simulator
@{[ sharedCommandLineOptionsUsage(indent => 2, switchWidth => 21) ]}
Examples
Modified: branches/safari-603-branch/Tools/Scripts/webkitdirs.pm (216532 => 216533)
--- branches/safari-603-branch/Tools/Scripts/webkitdirs.pm 2017-05-09 19:15:31 UTC (rev 216532)
+++ branches/safari-603-branch/Tools/Scripts/webkitdirs.pm 2017-05-09 19:27:39 UTC (rev 216533)
@@ -434,7 +434,7 @@
# These are determined automatically from stored configuration.
push(@args, '--debug') if ($configuration =~ "^Debug");
push(@args, '--release') if ($configuration =~ "^Release");
- push(@args, '--device') if (defined $xcodeSDK && $xcodeSDK =~ /^iphoneos/);
+ push(@args, '--ios-device') if (defined $xcodeSDK && $xcodeSDK =~ /^iphoneos/);
push(@args, '--ios-simulator') if (defined $xcodeSDK && $xcodeSDK =~ /^iphonesimulator/);
push(@args, '--32-bit') if ($architecture ne "x86_64" and !isWin64());
push(@args, '--64-bit') if (isWin64());
@@ -453,11 +453,11 @@
if (checkForArgumentAndRemoveFromARGVGettingValue("--sdk", \$sdk)) {
$xcodeSDK = $sdk;
}
- if (checkForArgumentAndRemoveFromARGV("--device")) {
+ if (checkForArgumentAndRemoveFromARGV("--device") || checkForArgumentAndRemoveFromARGV("--ios-device")) {
my $hasInternalSDK = exitStatus(system("xcrun --sdk iphoneos.internal --show-sdk-version > /dev/null 2>&1")) == 0;
$xcodeSDK ||= $hasInternalSDK ? "iphoneos.internal" : "iphoneos";
}
- if (checkForArgumentAndRemoveFromARGV("--ios-simulator")) {
+ if (checkForArgumentAndRemoveFromARGV("--simulator") || checkForArgumentAndRemoveFromARGV("--ios-simulator")) {
$xcodeSDK ||= 'iphonesimulator';
}
}
Modified: branches/safari-603-branch/Tools/Scripts/webkitpy/common/config/ews.json (216532 => 216533)
--- branches/safari-603-branch/Tools/Scripts/webkitpy/common/config/ews.json 2017-05-09 19:15:31 UTC (rev 216532)
+++ branches/safari-603-branch/Tools/Scripts/webkitpy/common/config/ews.json 2017-05-09 19:27:39 UTC (rev 216533)
@@ -18,7 +18,8 @@
]
},
"iOS EWS": {
- "port": "ios",
+ "port": "ios-device",
+ "name": "ios-ews",
"architecture": "armv7s"
},
"iOS Simulator EWS": {
Modified: branches/safari-603-branch/Tools/Scripts/webkitpy/common/config/ports.py (216532 => 216533)
--- branches/safari-603-branch/Tools/Scripts/webkitpy/common/config/ports.py 2017-05-09 19:15:31 UTC (rev 216532)
+++ branches/safari-603-branch/Tools/Scripts/webkitpy/common/config/ports.py 2017-05-09 19:27:39 UTC (rev 216533)
@@ -64,6 +64,8 @@
def port(port_name):
ports = {
"gtk-wk2": GtkWK2Port,
+ "ios-device": IOSPort,
+ # FIXME: https://bugs.webkit.org/show_bug.cgi?id=169302
"ios": IOSPort,
"ios-simulator-wk2": IOSSimulatorWK2Port,
"mac": MacPort,
@@ -125,7 +127,7 @@
class IOSPort(DeprecatedPort):
- port_flag_name = "ios"
+ port_flag_name = "ios-device"
def build_webkit_command(self, build_style=None):
command = super(IOSPort, self).build_webkit_command(build_style=build_style)
Modified: branches/safari-603-branch/Tools/Scripts/webkitpy/port/factory.py (216532 => 216533)
--- branches/safari-603-branch/Tools/Scripts/webkitpy/port/factory.py 2017-05-09 19:15:31 UTC (rev 216532)
+++ branches/safari-603-branch/Tools/Scripts/webkitpy/port/factory.py 2017-05-09 19:27:39 UTC (rev 216533)
@@ -47,6 +47,9 @@
optparse.make_option('--ios-simulator', action='', dest='platform',
const=('ios-simulator'),
help=('Alias for --platform=ios-simulator')),
+ optparse.make_option('--simulator', action='', dest='platform',
+ const=('ios-simulator'),
+ help=('DEPRECATED alias for --platform=ios-simulator')),
optparse.make_option('--efl', action='', dest='platform',
const=('efl*' if use_globs else 'efl'),
help=('Alias for --platform=efl*' if use_globs else 'Alias for --platform=efl')),
@@ -80,12 +83,8 @@
class PortFactory(object):
# Order matters. For port classes that have a port_name with a
# common prefix, the more specific port class should be listed
- # first. For example, 'ios.IOSSimulatorPort' (port_name='ios-simulator')
- # should be listed before 'ios.IOSPort' (port_name='ios'). If this
- # rule is not followed, then `webkit-patch --ios-simulator` will try
- # to use IOSPort instead of IOSSimulatorPort because 'ios'
- # (IOSPort.port_name) is a prefix of 'ios-simulator' (port_name
- # derived from '--ios-simulator' command-line switch), for example.
+ # first.
+
PORT_CLASSES = (
'efl.EflPort',
'gtk.GtkPort',
Added: branches/safari-603-branch/Tools/Scripts/webkitpy/port/ios_device.py (0 => 216533)
--- branches/safari-603-branch/Tools/Scripts/webkitpy/port/ios_device.py (rev 0)
+++ branches/safari-603-branch/Tools/Scripts/webkitpy/port/ios_device.py 2017-05-09 19:27:39 UTC (rev 216533)
@@ -0,0 +1,52 @@
+# Copyright (C) 2014-2017 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import logging
+
+from webkitpy.port.ios import IOSPort
+
+_log = logging.getLogger(__name__)
+
+
+class IOSDevicePort(IOSPort):
+ port_name = 'ios-device'
+
+ ARCHITECTURES = ['armv7', 'armv7s', 'arm64']
+ DEFAULT_ARCHITECTURE = 'arm64'
+ VERSION_FALLBACK_ORDER = ['ios-7', 'ios-8', 'ios-9', 'ios-10']
+
+ @classmethod
+ def determine_full_port_name(cls, host, options, port_name):
+ if port_name == cls.port_name:
+ iphoneos_sdk_version = host.platform.xcode_sdk_version('iphoneos')
+ if not iphoneos_sdk_version:
+ raise Exception("Please install the iOS SDK.")
+ major_version_number = iphoneos_sdk_version.split('.')[0]
+ port_name = port_name + '-' + major_version_number
+ return port_name
+
+ # Despite their names, these flags do not actually get passed all the way down to webkit-build.
+ def _build_driver_flags(self):
+ return ['--sdk', 'iphoneos'] + (['ARCHS=%s' % self.architecture()] if self.architecture() else [])
+
+ def operating_system(self):
+ return 'ios-device'