Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 726c36d9079f5d64c20f223813db2bd550635b94
https://github.com/WebKit/WebKit/commit/726c36d9079f5d64c20f223813db2bd550635b94
Author: Sam Sneddon <[email protected]>
Date: 2026-01-05 (Mon, 05 Jan 2026)
Changed paths:
A Tools/Scripts/webkitpy/port/device_device.py
M Tools/Scripts/webkitpy/port/device_port.py
M Tools/Scripts/webkitpy/port/ios_device.py
M Tools/Scripts/webkitpy/port/ios_simulator.py
A Tools/Scripts/webkitpy/port/simulator_device.py
M Tools/Scripts/webkitpy/port/visionos_device.py
M Tools/Scripts/webkitpy/port/visionos_simulator.py
M Tools/Scripts/webkitpy/port/watch_device.py
M Tools/Scripts/webkitpy/port/watch_simulator.py
Log Message:
-----------
[webkitpy] Reduce duplication across Apple embedded OS ports
https://bugs.webkit.org/show_bug.cgi?id=304943
rdar://167559974
Reviewed by Jonathan Bedard.
This introduces two new base classes:
* DeviceDevicePort, for physical device ports, and
* SimulatorDevicePort, for Simulator device ports.
With this, we can eliminate the majority of duplicated code across all
the Apple embedded ports.
* Tools/Scripts/webkitpy/port/device_device.py: Copied from
Tools/Scripts/webkitpy/port/ios_device.py.
(DeviceDevicePort): Add new base class for physical device ports.
(DeviceDevicePort._driver_class):
(DeviceDevicePort.determine_full_port_name):
(DeviceDevicePort.path_to_crash_logs):
(DeviceDevicePort._look_for_all_crash_logs_in_log_dir):
(DeviceDevicePort._get_crash_log):
(DeviceDevicePort.supports_layout_tests):
(DeviceDevicePort.abspath_for_test):
(DeviceDevicePort.device_version):
(DeviceDevicePort._is_device_platform_match):
(DeviceDevicePort.check_for_leaks):
(DeviceDevicePort.clean_up_test_run):
* Tools/Scripts/webkitpy/port/device_port.py:
(DevicePort): Make abstract.
(DevicePort.SDK): Move abstract definition here.
(DevicePort.operating_system): Mark as abstract.
* Tools/Scripts/webkitpy/port/ios_device.py:
(IOSDevicePort): Move to inheriting from DeviceDevicePort.
(IOSDevicePort._is_device_platform_match):
(IOSDevicePort.operating_system):
(IOSDevicePort._driver_class): Deleted.
(IOSDevicePort.determine_full_port_name): Deleted.
(IOSDevicePort.path_to_crash_logs): Deleted.
(IOSDevicePort._look_for_all_crash_logs_in_log_dir): Deleted.
(IOSDevicePort._get_crash_log): Deleted.
(IOSDevicePort.supports_layout_tests): Deleted.
(IOSDevicePort.abspath_for_test): Deleted.
(IOSDevicePort.device_version): Deleted.
(IOSDevicePort.check_for_leaks): Deleted.
(IOSDevicePort.clean_up_test_run): Deleted.
* Tools/Scripts/webkitpy/port/ios_simulator.py:
(IOSSimulatorPort): Move to inheriting from SimulatorDevicePort.
(IOSSimulatorPort.architecture):
(IOSSimulatorPort.clean_up_test_run):
(IOSSimulatorPort.operating_system):
(IOSSimulatorPort._version_from_name): Deleted.
(IOSSimulatorPort.device_version): Deleted.
(IOSSimulatorPort.environment_for_api_tests): Deleted.
(IOSSimulatorPort.setup_environ_for_server): Deleted.
(IOSSimulatorPort.reset_preferences): Deleted.
(IOSSimulatorPort.developer_dir): Deleted.
* Tools/Scripts/webkitpy/port/simulator_device.py: Copied from
Tools/Scripts/webkitpy/port/watch_simulator.py.
(SimulatorDevicePort): Add new base class for Simulator device ports.
(SimulatorDevicePort._version_from_name):
(SimulatorDevicePort.device_version):
(SimulatorDevicePort.environment_for_api_tests):
(SimulatorDevicePort.setup_environ_for_server):
(SimulatorDevicePort.reset_preferences):
(SimulatorDevicePort.developer_dir):
* Tools/Scripts/webkitpy/port/visionos_device.py:
(VisionOSDevicePort): Move to inheriting from DeviceDevicePort.
(VisionOSDevicePort._is_device_platform_match):
(VisionOSDevicePort.operating_system):
(VisionOSDevicePort._driver_class): Deleted.
(VisionOSDevicePort.determine_full_port_name): Deleted.
(VisionOSDevicePort.path_to_crash_logs): Deleted.
(VisionOSDevicePort._look_for_all_crash_logs_in_log_dir): Deleted.
(VisionOSDevicePort._get_crash_log): Deleted.
(VisionOSDevicePort.supports_layout_tests): Deleted.
(VisionOSDevicePort.abspath_for_test): Deleted.
(VisionOSDevicePort.device_version): Deleted.
(VisionOSDevicePort.check_for_leaks): Deleted.
(VisionOSDevicePort.clean_up_test_run): Deleted.
* Tools/Scripts/webkitpy/port/visionos_simulator.py:
(VisionOSSimulatorPort): Move to inheriting from SimulatorDevicePort.
(VisionOSSimulatorPort.architecture):
(VisionOSSimulatorPort.operating_system):
(VisionOSSimulatorPort._version_from_name): Deleted.
(VisionOSSimulatorPort.device_version): Deleted.
(VisionOSSimulatorPort.environment_for_api_tests): Deleted.
(VisionOSSimulatorPort.setup_environ_for_server): Deleted.
(VisionOSSimulatorPort.reset_preferences): Deleted.
(VisionOSSimulatorPort.developer_dir): Deleted.
* Tools/Scripts/webkitpy/port/watch_device.py:
(WatchDevicePort): Move to inheriting from DeviceDevicePort.
(WatchDevicePort._is_device_platform_match):
(WatchDevicePort.operating_system):
(WatchDevicePort._driver_class): Deleted.
(WatchDevicePort.determine_full_port_name): Deleted.
(WatchDevicePort.path_to_crash_logs): Deleted.
(WatchDevicePort._look_for_all_crash_logs_in_log_dir): Deleted.
(WatchDevicePort._get_crash_log): Deleted.
(WatchDevicePort.supports_layout_tests): Deleted.
(WatchDevicePort.device_version): Deleted.
(WatchDevicePort.check_for_leaks): Deleted.
(WatchDevicePort.clean_up_test_run): Deleted.
* Tools/Scripts/webkitpy/port/watch_simulator.py:
(WatchSimulatorPort): Move to inheriting from SimulatorDevicePort.
(WatchSimulatorPort.architecture):
(WatchSimulatorPort.operating_system):
(WatchSimulatorPort._version_from_name): Deleted.
(WatchSimulatorPort.device_version): Deleted.
(WatchSimulatorPort.environment_for_api_tests): Deleted.
(WatchSimulatorPort.setup_environ_for_server): Deleted.
(WatchSimulatorPort.reset_preferences): Deleted.
(WatchSimulatorPort.developer_dir): Deleted.
Canonical link: https://commits.webkit.org/305127@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications