Title: [184039] trunk/Tools
- Revision
- 184039
- Author
- [email protected]
- Date
- 2015-05-09 01:20:33 -0700 (Sat, 09 May 2015)
Log Message
Layout tests broke due to unexpected simctl output
* Scripts/webkitpy/xcode/simulator.py:
(Simulator._parse_devices): Handle new Device Pairs header.
* Scripts/webkitpy/xcode/simulator_unittest.py:
(test_device_pairs): Add unit test for Device Pairs header.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (184038 => 184039)
--- trunk/Tools/ChangeLog 2015-05-09 06:40:33 UTC (rev 184038)
+++ trunk/Tools/ChangeLog 2015-05-09 08:20:33 UTC (rev 184039)
@@ -1,3 +1,12 @@
+2015-05-09 David Kilzer <[email protected]>
+
+ Layout tests broke due to unexpected simctl output
+
+ * Scripts/webkitpy/xcode/simulator.py:
+ (Simulator._parse_devices): Handle new Device Pairs header.
+ * Scripts/webkitpy/xcode/simulator_unittest.py:
+ (test_device_pairs): Add unit test for Device Pairs header.
+
2015-05-08 Myles C. Maxfield <[email protected]>
Remove convenience constructors for TextRun
Modified: trunk/Tools/Scripts/webkitpy/xcode/simulator.py (184038 => 184039)
--- trunk/Tools/Scripts/webkitpy/xcode/simulator.py 2015-05-09 06:40:33 UTC (rev 184038)
+++ trunk/Tools/Scripts/webkitpy/xcode/simulator.py 2015-05-09 08:20:33 UTC (rev 184039)
@@ -368,7 +368,9 @@
device_match = self.devices_re.match(line)
if not device_match:
- raise RuntimeError('Expected an iOS Simulator device line, got "{}"'.format(line))
+ if line != '== Device Pairs ==':
+ raise RuntimeError('Expected == Device Pairs == header but got: "{}"'.format(line))
+ break
if current_runtime:
device = Device(name=device_match.group('name').rstrip(),
udid=device_match.group('udid'),
Modified: trunk/Tools/Scripts/webkitpy/xcode/simulator_unittest.py (184038 => 184039)
--- trunk/Tools/Scripts/webkitpy/xcode/simulator_unittest.py 2015-05-09 06:40:33 UTC (rev 184038)
+++ trunk/Tools/Scripts/webkitpy/xcode/simulator_unittest.py 2015-05-09 08:20:33 UTC (rev 184039)
@@ -241,3 +241,37 @@
self.assertEqual(True, runtime_ios_8_internal.is_internal_runtime)
self.assertEqual(tuple([8, 0]), runtime_ios_8_internal.version)
self.assertEqual(0, len(runtime_ios_8_internal.devices))
+
+ def test_device_pairs(self):
+ """ Tests that Device Pairs header does not cause parsing exception """
+ self._set_expected_xcrun_simctl_list('''== Device Types ==
+iPhone 4s (com.apple.CoreSimulator.SimDeviceType.iPhone-4s)
+== Runtimes ==
+iOS 8.0 (8.0 - 12A465) (com.apple.CoreSimulator.SimRuntime.iOS-8-0)
+iOS 8.0 Internal (8.0 - Unknown) (com.apple.CoreSimulator.SimRuntime.iOS-8-0-Internal) (unavailable, runtime path not found)
+== Devices ==
+-- iOS 8.0 --
+ iPhone 4s (271BBEAC-1826-4CE1-B3AF-83F35CDD1D82) (Shutdown)
+== Device Pairs ==
+''')
+ simulator = Simulator(host=self._host)
+ self.assertEqual(1, len(simulator.device_types))
+
+ device_type_iphone_4s = simulator.device_types[0]
+ self.assertEqual('iPhone 4s', device_type_iphone_4s.name)
+ self.assertEqual('com.apple.CoreSimulator.SimDeviceType.iPhone-4s', device_type_iphone_4s.identifier)
+
+ self.assertEqual(2, len(simulator.runtimes))
+
+ runtime_ios_8 = simulator.runtimes[0]
+ self.assertEqual('com.apple.CoreSimulator.SimRuntime.iOS-8-0', runtime_ios_8.identifier)
+ self.assertEqual(True, runtime_ios_8.available)
+ self.assertEqual(False, runtime_ios_8.is_internal_runtime)
+ self.assertEqual(tuple([8, 0]), runtime_ios_8.version)
+ self.assertEqual(1, len(runtime_ios_8.devices))
+
+ device_iphone_4s = runtime_ios_8.devices[0]
+ self.assertEqual('iPhone 4s', device_iphone_4s.name)
+ self.assertEqual('271BBEAC-1826-4CE1-B3AF-83F35CDD1D82', device_iphone_4s.udid)
+ self.assertEqual(True, device_iphone_4s.available)
+ self.assertEqual(runtime_ios_8, device_iphone_4s.runtime)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes