Title: [240953] trunk/Tools
Revision
240953
Author
jbed...@apple.com
Date
2019-02-04 17:16:28 -0800 (Mon, 04 Feb 2019)

Log Message

webkitpy: Precedence of booted devices should match precedence in DEFAULT_DEVICE_TYPES
https://bugs.webkit.org/show_bug.cgi?id=194158
<rdar://problem/47737268>

Rubber-stamped by Aakash Jain.

* Scripts/webkitpy/port/device_port.py:
(DevicePort.supported_device_types): Sort supported device types by the DEFAULT_DEVICE_TYPES.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (240952 => 240953)


--- trunk/Tools/ChangeLog	2019-02-05 01:11:56 UTC (rev 240952)
+++ trunk/Tools/ChangeLog	2019-02-05 01:16:28 UTC (rev 240953)
@@ -1,3 +1,14 @@
+2019-02-04  Jonathan Bedard  <jbed...@apple.com>
+
+        webkitpy: Precedence of booted devices should match precedence in DEFAULT_DEVICE_TYPES
+        https://bugs.webkit.org/show_bug.cgi?id=194158
+        <rdar://problem/47737268>
+
+        Rubber-stamped by Aakash Jain.
+
+        * Scripts/webkitpy/port/device_port.py:
+        (DevicePort.supported_device_types): Sort supported device types by the DEFAULT_DEVICE_TYPES.
+
 2019-02-04  Said Abou-Hallawa  <s...@apple.com>
 
         [CG] Enable setAdditionalSupportedImageTypes for WK1

Modified: trunk/Tools/Scripts/webkitpy/port/device_port.py (240952 => 240953)


--- trunk/Tools/Scripts/webkitpy/port/device_port.py	2019-02-05 01:11:56 UTC (rev 240952)
+++ trunk/Tools/Scripts/webkitpy/port/device_port.py	2019-02-05 01:16:28 UTC (rev 240953)
@@ -144,7 +144,15 @@
             if device.device_type in self.DEVICE_TYPE:
                 types.add(device.device_type)
         if types:
-            return list(types)
+
+            def sorted_by_default_device_type(type):
+                try:
+                    return self.DEFAULT_DEVICE_TYPES.index(type)
+                except ValueError:
+                    return len(self.DEFAULT_DEVICE_TYPES)
+
+            return sorted(types, key=sorted_by_default_device_type)
+
         return self.DEFAULT_DEVICE_TYPES or [self.DEVICE_TYPE]
 
     def setup_test_run(self, device_type=None):
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to