WebKit Bugzilla
Attachment 339577 Details for
Bug 185315
: Check for com.apple.datamigrator before declaring simulators booted
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185315-20180504120250.patch (text/plain), 4.46 KB, created by
Jonathan Bedard
on 2018-05-04 12:02:51 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Jonathan Bedard
Created:
2018-05-04 12:02:51 PDT
Size:
4.46 KB
patch
obsolete
>Index: Tools/ChangeLog >=================================================================== >--- Tools/ChangeLog (revision 231369) >+++ Tools/ChangeLog (working copy) >@@ -1,3 +1,21 @@ >+2018-05-04 Jonathan Bedard <jbedard@apple.com> >+ >+ webkitpy: Check for com.apple.datamigrator before declaring simulators booted >+ https://bugs.webkit.org/show_bug.cgi?id=185315 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Scripts/webkitpy/common/system/executive_mock.py: >+ (MockExecutive2.__init__): Define _running_pids. >+ * Scripts/webkitpy/xcode/simulated_device.py: >+ (SimulatedDeviceManager.initialize_devices): Call wait_until_data_migration_is_done before >+ declaring that devices have been booted, increase the timeout since data migration will frequently >+ take longer than 60 seconds, especially with multiple simulators booting. >+ (SimulatedDeviceManager.swap): Ditto. >+ (SimulatedDeviceManager): >+ (SimulatedDeviceManager.wait_until_data_migration_is_done): Wait until there are no com.apple.datamigrator >+ processes running. >+ > 2018-05-04 Wenson Hsieh <whsieh@berkeley.edu> > > REGRESSION: [ios-simulator] 3 WKWebViewAutofillTests API test failures seen with 11.3 SDK >Index: Tools/Scripts/webkitpy/common/system/executive_mock.py >=================================================================== >--- Tools/Scripts/webkitpy/common/system/executive_mock.py (revision 231364) >+++ Tools/Scripts/webkitpy/common/system/executive_mock.py (working copy) >@@ -178,6 +178,7 @@ class MockExecutive2(MockExecutive): > self._stderr = stderr > self._exit_code = exit_code > self._exception = exception >+ self._running_pids = {'test-webkitpy': os.getpid()} > self._run_command_fn = run_command_fn > self.calls = [] > >Index: Tools/Scripts/webkitpy/xcode/simulated_device.py >=================================================================== >--- Tools/Scripts/webkitpy/xcode/simulated_device.py (revision 231364) >+++ Tools/Scripts/webkitpy/xcode/simulated_device.py (working copy) >@@ -314,7 +314,7 @@ class SimulatedDeviceManager(object): > SimulatedDeviceManager.INITIALIZED_DEVICES.append(device) > > @staticmethod >- def initialize_devices(requests, host=SystemHost(), name_base='Managed', simulator_ui=True, timeout=60, **kwargs): >+ def initialize_devices(requests, host=SystemHost(), name_base='Managed', simulator_ui=True, timeout=180, **kwargs): > if SimulatedDeviceManager.INITIALIZED_DEVICES is not None: > return SimulatedDeviceManager.INITIALIZED_DEVICES > >@@ -365,6 +365,7 @@ class SimulatedDeviceManager(object): > deadline = time.time() + timeout > for device in SimulatedDeviceManager.INITIALIZED_DEVICES: > SimulatedDeviceManager._wait_until_device_in_state(device, SimulatedDevice.DeviceState.BOOTED, deadline) >+ SimulatedDeviceManager.wait_until_data_migration_is_done(host, deadline - time.time()) > > return SimulatedDeviceManager.INITIALIZED_DEVICES > >@@ -394,7 +395,7 @@ class SimulatedDeviceManager(object): > return min(max_supported_simulators_locally, max_supported_simulators_for_hardware) > > @staticmethod >- def swap(device, request, host=SystemHost(), name_base='Managed', timeout=60): >+ def swap(device, request, host=SystemHost(), name_base='Managed', timeout=180): > if SimulatedDeviceManager.INITIALIZED_DEVICES is None: > raise RuntimeError('Cannot swap when there are no initialized devices') > if device not in SimulatedDeviceManager.INITIALIZED_DEVICES: >@@ -415,6 +416,17 @@ class SimulatedDeviceManager(object): > > deadline = time.time() + timeout > SimulatedDeviceManager._wait_until_device_in_state(device, SimulatedDevice.DeviceState.BOOTED, deadline) >+ SimulatedDeviceManager.wait_until_data_migration_is_done(host, deadline - time.time()) >+ >+ @staticmethod >+ def wait_until_data_migration_is_done(host, timeout=180): >+ # The existence of a datamigrator process means that simulators are still booting. >+ deadline = time.time() + timeout >+ _log.debug('Waiting until no com.apple.datamigrator processes are found') >+ while host.executive.running_pids(lambda process_name: 'com.apple.datamigrator' in process_name): >+ time.sleep(1) >+ if time.time() > deadline: >+ raise RuntimeError('Timed out while waiting for data migration') > > @staticmethod > def tear_down(host=SystemHost(), timeout=60):
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 185315
:
339577
|
339604
|
339734