WebKit Bugzilla
Attachment 359511 Details for
Bug 193537
: webkitpy: Add iPhone and iPad ports
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193537-20190118110537.patch (text/plain), 8.54 KB, created by
Jonathan Bedard
on 2019-01-18 11:05:37 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Jonathan Bedard
Created:
2019-01-18 11:05:37 PST
Size:
8.54 KB
patch
obsolete
>Index: Tools/ChangeLog >=================================================================== >--- Tools/ChangeLog (revision 240158) >+++ Tools/ChangeLog (working copy) >@@ -1,3 +1,27 @@ >+2019-01-18 Jonathan Bedard <jbedard@apple.com> >+ >+ webkitpy: Add iPhone and iPad ports >+ https://bugs.webkit.org/show_bug.cgi?id=193537 >+ <rdar://problem/47353390> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add --iphone-simulator and --ipad-simulator commands to run-webkit-tests which separate iPhone and iPad into separate >+ ports. Note that this separation is optional, the --ios-simulator command remains. >+ >+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py: >+ (RunTest.test_device_type_test_division): Drive-by fix. >+ (RunTest.test_device_type_specific_listing): Ditto. >+ (RunTest.test_ipad_test_division): >+ (RunTest): >+ (RunTest.test_ipad_listing): >+ * Scripts/webkitpy/port/factory.py: >+ (platform_options): Add --iphone-simulator and --ipad-simulator flags. >+ (PortFactory): >+ * Scripts/webkitpy/port/ios_simulator.py: >+ (IPhoneSimulatorPort): >+ (IPadSimulatorPort): >+ > 2019-01-18 Youenn Fablet <youenn@apple.com> > > Add a new SPI to request for cache storage quota increase >Index: Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py >=================================================================== >--- Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py (revision 240153) >+++ Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py (working copy) >@@ -28,18 +28,8 @@ > # (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 codecs > import json >-import logging >-import os >-import platform >-import Queue >-import re > import StringIO >-import sys >-import thread >-import time >-import threading > import unittest > > from webkitpy.common.system import outputcapture, path >@@ -48,12 +38,9 @@ from webkitpy.common.system.systemhost i > from webkitpy.common.host import Host > from webkitpy.common.host_mock import MockHost > >-from webkitpy import port > from webkitpy.layout_tests import run_webkit_tests > from webkitpy.layout_tests.models.test_run_results import INTERRUPTED_EXIT_STATUS >-from webkitpy.port import Port > from webkitpy.port import test >-from webkitpy.test.skip import skip_if > from webkitpy.xcode.device_type import DeviceType > > >@@ -857,7 +844,7 @@ class RunTest(unittest.TestCase, StreamT > for line in logging.getvalue(): > if str(DeviceType.from_string('iPhone SE')) in line: > self.assertTrue('Skipping 2 tests' in line) >- elif str(DeviceType.from_string('iPhone (5th generation)')) in line: >+ elif str(DeviceType.from_string('iPad (5th generation)')) in line: > self.assertTrue('Skipping 1 test' in line) > elif str(DeviceType.from_string('iPhone 7')) in line: > self.assertTrue('Skipping 0 tests' in line) >@@ -881,7 +868,7 @@ class RunTest(unittest.TestCase, StreamT > current_type = None > by_type = {} > for line in output.splitlines(): >- if not line: >+ if not line or 'skip' in line: > continue > if 'Tests to run' in line: > current_type = DeviceType.from_string(line.split('for ')[-1].split(' running')[0]) if 'for ' in line else None >@@ -894,6 +881,59 @@ class RunTest(unittest.TestCase, StreamT > self.assertEqual(1, len(by_type[DeviceType.from_string('iPad (5th generation)')])) > self.assertEqual(0, len(by_type[DeviceType.from_string('iPhone 7')])) > >+ def test_ipad_test_division(self): >+ host = MockHost() >+ port = host.port_factory.get('ipad-simulator') >+ >+ host.filesystem.write_text_file('/mock-checkout/LayoutTests/test1.html', '') >+ host.filesystem.write_text_file('/mock-checkout/LayoutTests/platform/ios/test2.html', '') >+ host.filesystem.write_text_file('/mock-checkout/LayoutTests/platform/ipad/test3.html', '') >+ host.filesystem.write_text_file('/mock-checkout/LayoutTests/platform/iphone/test4.html', '') >+ host.filesystem.write_text_file('/MOCK output of child process/ImageDiff', '') >+ >+ oc = outputcapture.OutputCapture() >+ try: >+ oc.capture_output() >+ logging = StringIO.StringIO() >+ run_webkit_tests.run(port, run_webkit_tests.parse_args(['--debug-rwt-logging', '-n', '--no-build', '--root', '/build'])[0], [], logging_stream=logging) >+ finally: >+ output, err, _ = oc.restore_output() >+ >+ for line in logging.getvalue(): >+ if str(DeviceType.from_string('iPad (5th generation)')) in line: >+ self.assertTrue('Skipping 3 test' in line) >+ >+ def test_ipad_listing(self): >+ host = MockHost() >+ port = host.port_factory.get('ipad-simulator') >+ >+ host.filesystem.write_text_file('/mock-checkout/LayoutTests/test1.html', '') >+ host.filesystem.write_text_file('/mock-checkout/LayoutTests/platform/ios/test2.html', '') >+ host.filesystem.write_text_file('/mock-checkout/LayoutTests/platform/ipad/test3.html', '') >+ host.filesystem.write_text_file('/mock-checkout/LayoutTests/platform/iphone/test4.html', '') >+ >+ oc = outputcapture.OutputCapture() >+ try: >+ oc.capture_output() >+ logging = StringIO.StringIO() >+ run_webkit_tests._print_expectations(port, run_webkit_tests.parse_args([])[0], [], logging_stream=logging) >+ finally: >+ output, _, _ = oc.restore_output() >+ >+ current_type = None >+ by_type = {} >+ for line in output.splitlines(): >+ if not line or 'skip' in line: >+ continue >+ if 'Tests to run' in line: >+ current_type = DeviceType.from_string(line.split('for ')[-1].split(' running')[0]) if 'for ' in line else None >+ by_type[current_type] = [] >+ continue >+ by_type[current_type].append(line) >+ >+ self.assertEqual(1, len(by_type.keys())) >+ self.assertEqual(3, len(by_type[DeviceType.from_string('iPad (5th generation)')])) >+ > > class EndToEndTest(unittest.TestCase): > def test_reftest_with_two_notrefs(self): >Index: Tools/Scripts/webkitpy/port/factory.py >=================================================================== >--- Tools/Scripts/webkitpy/port/factory.py (revision 240153) >+++ Tools/Scripts/webkitpy/port/factory.py (working copy) >@@ -47,6 +47,12 @@ def platform_options(use_globs=False): > optparse.make_option('--ios-simulator', action='store_const', dest='platform', > const=('ios-simulator'), > help=('Alias for --platform=ios-simulator')), >+ optparse.make_option('--iphone-simulator', action='store_const', dest='platform', >+ const=('iphone-simulator'), >+ help=('Alias for --platform=iphone-simulator')), >+ optparse.make_option('--ipad-simulator', action='store_const', dest='platform', >+ const=('ipad-simulator'), >+ help=('Alias for --platform=ipad-simulator')), > optparse.make_option('--simulator', action='store_const', dest='platform', > const=('ios-simulator'), > help=('DEPRECATED alias for --platform=ios-simulator')), >@@ -90,6 +96,8 @@ class PortFactory(object): > PORT_CLASSES = ( > 'gtk.GtkPort', > 'ios_simulator.IOSSimulatorPort', >+ 'ios_simulator.IPhoneSimulatorPort', >+ 'ios_simulator.IPadSimulatorPort', > 'ios_device.IOSDevicePort', > 'watch_simulator.WatchSimulatorPort', > 'watch_device.WatchDevicePort', >Index: Tools/Scripts/webkitpy/port/ios_simulator.py >=================================================================== >--- Tools/Scripts/webkitpy/port/ios_simulator.py (revision 240153) >+++ Tools/Scripts/webkitpy/port/ios_simulator.py (working copy) >@@ -109,3 +109,20 @@ class IOSSimulatorPort(IOSPort): > > def stderr_patterns_to_strip(self): > return [] >+ >+ >+class IPhoneSimulatorPort(IOSSimulatorPort): >+ port_name = 'iphone-simulator' >+ >+ DEVICE_TYPE = DeviceType(hardware_family='iPhone') >+ DEFAULT_DEVICE_TYPES = [ >+ DeviceType(hardware_family='iPhone', hardware_type='SE'), >+ DeviceType(hardware_family='iPhone', hardware_type='7'), >+ ] >+ >+ >+class IPadSimulatorPort(IOSSimulatorPort): >+ port_name = 'ipad-simulator' >+ >+ DEVICE_TYPE = DeviceType(hardware_family='iPad') >+ DEFAULT_DEVICE_TYPES = [DeviceType(hardware_family='iPad', hardware_type='(5th generation)')]
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193537
:
359496
| 359511