Title: [240982] trunk/Tools
Revision
240982
Author
[email protected]
Date
2019-02-05 10:33:40 -0800 (Tue, 05 Feb 2019)

Log Message

run-webkit-tests emits message "...running None" when running tests
https://bugs.webkit.org/show_bug.cgi?id=194133
<rdar://problem/47724738>

Reviewed by Lucas Forschler.

* Scripts/webkitpy/xcode/device_type.py:
(DeviceType.__str__): Use both version mapping tables and use just the variant
name if no version name is available.
* Scripts/webkitpy/xcode/device_type_unittest.py:
(DeviceTypeTest):
(DeviceTypeTest.test_unmapped_version): Test case where the version does not have
an associated named.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (240981 => 240982)


--- trunk/Tools/ChangeLog	2019-02-05 18:28:33 UTC (rev 240981)
+++ trunk/Tools/ChangeLog	2019-02-05 18:33:40 UTC (rev 240982)
@@ -1,3 +1,19 @@
+2019-02-05  Jonathan Bedard  <[email protected]>
+
+        run-webkit-tests emits message "...running None" when running tests
+        https://bugs.webkit.org/show_bug.cgi?id=194133
+        <rdar://problem/47724738>
+
+        Reviewed by Lucas Forschler.
+
+        * Scripts/webkitpy/xcode/device_type.py:
+        (DeviceType.__str__): Use both version mapping tables and use just the variant
+        name if no version name is available.
+        * Scripts/webkitpy/xcode/device_type_unittest.py:
+        (DeviceTypeTest):
+        (DeviceTypeTest.test_unmapped_version): Test case where the version does not have
+        an associated named.
+
 2019-02-05  Olivier Blin  <[email protected]>
 
         [WPE] require python3-setuptools for meson build in jhbuild

Modified: trunk/Tools/Scripts/webkitpy/xcode/device_type.py (240981 => 240982)


--- trunk/Tools/Scripts/webkitpy/xcode/device_type.py	2019-02-05 18:28:33 UTC (rev 240981)
+++ trunk/Tools/Scripts/webkitpy/xcode/device_type.py	2019-02-05 18:33:40 UTC (rev 240982)
@@ -20,7 +20,8 @@
 # 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.
 
-from webkitpy.common.version_name_map import VersionNameMap
+from webkitpy.common.version_name_map import VersionNameMap, INTERNAL_TABLE
+from webkitpy.port.config import apple_additions
 
 
 # This class is designed to match device types. Because it is used for matching, 'None' is treated as a wild-card.
@@ -108,10 +109,16 @@
         self.check_consistency()
 
     def __str__(self):
+        version = None
+        if self.software_version and apple_additions():
+            version = VersionNameMap.map().to_name(self.software_version, platform=self.software_variant.lower(), table=INTERNAL_TABLE)
+        elif self.software_version:
+            version = VersionNameMap.map().to_name(self.software_version, platform=self.software_variant.lower())
+
         return '{hardware_family}{hardware_type} running {version}'.format(
             hardware_family=self.hardware_family if self.hardware_family else 'Device',
             hardware_type=' {}'.format(self.hardware_type) if self.hardware_type else '',
-            version=VersionNameMap.map().to_name(self.software_version, platform=self.software_variant.lower()) if self.software_version else self.software_variant,
+            version=version or self.software_variant,
         )
 
     # This technique of matching treats 'None' a wild-card.

Modified: trunk/Tools/Scripts/webkitpy/xcode/device_type_unittest.py (240981 => 240982)


--- trunk/Tools/Scripts/webkitpy/xcode/device_type_unittest.py	2019-02-05 18:28:33 UTC (rev 240981)
+++ trunk/Tools/Scripts/webkitpy/xcode/device_type_unittest.py	2019-02-05 18:33:40 UTC (rev 240982)
@@ -155,3 +155,6 @@
         self.assertTrue(DeviceType.from_string('iphone 6s') in DeviceType.from_string('iPhone'))
         self.assertTrue(DeviceType.from_string('iPhone 6s') in DeviceType.from_string('iphone'))
         self.assertTrue(DeviceType.from_string('iphone 6s') in DeviceType.from_string('iphone'))
+
+    def test_unmapped_version(self):
+        self.assertEqual('iPhone running iOS', str(DeviceType.from_string('iPhone', Version(9))))
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to