Title: [213545] trunk/Tools
Revision
213545
Author
[email protected]
Date
2017-03-07 15:05:57 -0800 (Tue, 07 Mar 2017)

Log Message

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.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (213544 => 213545)


--- trunk/Tools/ChangeLog	2017-03-07 22:53:17 UTC (rev 213544)
+++ trunk/Tools/ChangeLog	2017-03-07 23:05:57 UTC (rev 213545)
@@ -1,3 +1,29 @@
+2017-03-07  Jonathan Bedard  <[email protected]>
+
+        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-03-07  Dean Jackson  <[email protected]>
 
         Add GPUDevice implementation and WebGPULayer

Modified: trunk/Tools/Scripts/build-webkit (213544 => 213545)


--- trunk/Tools/Scripts/build-webkit	2017-03-07 22:53:17 UTC (rev 213544)
+++ trunk/Tools/Scripts/build-webkit	2017-03-07 23:05:57 UTC (rev 213545)
@@ -92,8 +92,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: trunk/Tools/Scripts/package-root (213544 => 213545)


--- trunk/Tools/Scripts/package-root	2017-03-07 22:53:17 UTC (rev 213544)
+++ trunk/Tools/Scripts/package-root	2017-03-07 23:05:57 UTC (rev 213545)
@@ -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: trunk/Tools/Scripts/run-api-tests (213544 => 213545)


--- trunk/Tools/Scripts/run-api-tests	2017-03-07 22:53:17 UTC (rev 213544)
+++ trunk/Tools/Scripts/run-api-tests	2017-03-07 23:05:57 UTC (rev 213545)
@@ -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: trunk/Tools/Scripts/webkitdirs.pm (213544 => 213545)


--- trunk/Tools/Scripts/webkitdirs.pm	2017-03-07 22:53:17 UTC (rev 213544)
+++ trunk/Tools/Scripts/webkitdirs.pm	2017-03-07 23:05:57 UTC (rev 213545)
@@ -438,7 +438,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());
@@ -457,11 +457,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: trunk/Tools/Scripts/webkitpy/common/config/ews.json (213544 => 213545)


--- trunk/Tools/Scripts/webkitpy/common/config/ews.json	2017-03-07 22:53:17 UTC (rev 213544)
+++ trunk/Tools/Scripts/webkitpy/common/config/ews.json	2017-03-07 23:05:57 UTC (rev 213545)
@@ -12,7 +12,7 @@
         ]
     },
     "iOS EWS": {
-        "port": "ios",
+        "port": "ios-device",
         "architecture": "armv7s"
     },
     "iOS Simulator EWS": {

Modified: trunk/Tools/Scripts/webkitpy/common/config/ports.py (213544 => 213545)


--- trunk/Tools/Scripts/webkitpy/common/config/ports.py	2017-03-07 22:53:17 UTC (rev 213544)
+++ trunk/Tools/Scripts/webkitpy/common/config/ports.py	2017-03-07 23:05:57 UTC (rev 213545)
@@ -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,
@@ -130,7 +132,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: trunk/Tools/Scripts/webkitpy/port/factory.py (213544 => 213545)


--- trunk/Tools/Scripts/webkitpy/port/factory.py	2017-03-07 22:53:17 UTC (rev 213544)
+++ trunk/Tools/Scripts/webkitpy/port/factory.py	2017-03-07 23:05:57 UTC (rev 213545)
@@ -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,7 @@
 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_simulator.IOSSimulatorPort' (port_name='ios-simulator')
-    # should be listed before 'ios_device.IOSDevicePort' (port_name='ios').  If this
-    # rule is not followed, then `webkit-patch --ios-simulator` will try
-    # to use IOSDevicePort instead of IOSSimulatorPort because 'ios'
-    # (IOSDevicePort.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',

Modified: trunk/Tools/Scripts/webkitpy/port/ios_device.py (213544 => 213545)


--- trunk/Tools/Scripts/webkitpy/port/ios_device.py	2017-03-07 22:53:17 UTC (rev 213544)
+++ trunk/Tools/Scripts/webkitpy/port/ios_device.py	2017-03-07 23:05:57 UTC (rev 213545)
@@ -28,7 +28,7 @@
 
 
 class IOSDevicePort(IOSPort):
-    port_name = 'ios'
+    port_name = 'ios-device'
 
     ARCHITECTURES = ['armv7', 'armv7s', 'arm64']
     DEFAULT_ARCHITECTURE = 'arm64'
@@ -49,4 +49,4 @@
         return ['--sdk', 'iphoneos'] + (['ARCHS=%s' % self.architecture()] if self.architecture() else [])
 
     def operating_system(self):
-        return 'ios'
+        return 'ios-device'
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to