Modified: trunk/Tools/BuildSlaveSupport/kill-old-processes (188941 => 188942)
--- trunk/Tools/BuildSlaveSupport/kill-old-processes 2015-08-26 01:35:30 UTC (rev 188941)
+++ trunk/Tools/BuildSlaveSupport/kill-old-processes 2015-08-26 02:01:42 UTC (rev 188942)
@@ -85,6 +85,7 @@
"WebKitTestRunner",
"WebProcess",
"xcodebuild",
+ "Simulator" # FIXME: Consider moving iOS-specific tasks to their own list.
]
taskToKillUnix = [
Modified: trunk/Tools/ChangeLog (188941 => 188942)
--- trunk/Tools/ChangeLog 2015-08-26 01:35:30 UTC (rev 188941)
+++ trunk/Tools/ChangeLog 2015-08-26 02:01:42 UTC (rev 188942)
@@ -1,3 +1,19 @@
+2015-08-25 Aakash Jain <aakash_j...@apple.com>
+
+ iOS Simulator layout-tests fail to start while cleaning a directory structure if simulator is already running
+ https://bugs.webkit.org/show_bug.cgi?id=148197
+ rdar://problem/22334382
+
+ Reviewed by Daniel Bates.
+
+ * BuildSlaveSupport/kill-old-processes: Add Simulator to the list of processes to kill (for iOS builders).
+ * Scripts/webkitpy/port/ios.py:
+ (IOSSimulatorPort): Converted bundle id com.apple.iphonesimulator to a variable SIMULATOR_BUNDLE_ID.
+ (IOSSimulatorPort._quitIOSSimulator): Common function to quit iOS Simulator.
+ (IOSSimulatorPort.clean_up_test_run): Quit the simulator during the cleanup.
+ (IOSSimulatorPort.check_sys_deps): No need to quit the simulator here as its now being quit in reset_preferences().
+ (IOSSimulatorPort.reset_preferences): Quit the simulator before trying to delete associated data directory.
+
2015-08-25 Gyuyoung Kim <gyuyoung....@webkit.org>
Remove PassRefPtr style check rule
Modified: trunk/Tools/Scripts/webkitpy/port/ios.py (188941 => 188942)
--- trunk/Tools/Scripts/webkitpy/port/ios.py 2015-08-26 01:35:30 UTC (rev 188941)
+++ trunk/Tools/Scripts/webkitpy/port/ios.py 2015-08-26 02:01:42 UTC (rev 188942)
@@ -77,6 +77,8 @@
DEFAULT_ARCHITECTURE = 'x86_64'
+ SIMULATOR_BUNDLE_ID = 'com.apple.iphonesimulator'
+
relay_name = 'LayoutTestRelay'
def __init__(self, *args, **kwargs):
@@ -199,7 +201,7 @@
device_udid = self.testing_device.udid
# FIXME: <rdar://problem/20916140> Switch to using CoreSimulator.framework for launching and quitting iOS Simulator
self._executive.run_command([
- 'open', '-b', 'com.apple.iphonesimulator',
+ 'open', '-b', self.SIMULATOR_BUNDLE_ID,
'--args', '-CurrentDeviceUDID', device_udid])
Simulator.wait_until_device_is_in_state(device_udid, Simulator.DeviceState.BOOTED)
@@ -208,8 +210,13 @@
_log.debug('Waiting {seconds} seconds for iOS Simulator to finish booting ...'.format(seconds=boot_delay))
time.sleep(boot_delay)
+ def _quit_ios_simulator(self):
+ # FIXME: <rdar://problem/20916140> Switch to using CoreSimulator.framework for launching and quitting iOS Simulator
+ self._executive.run_command(['osascript', '-e', 'tell application id "{0}" to quit'.format(self.SIMULATOR_BUNDLE_ID)])
+
def clean_up_test_run(self):
super(IOSSimulatorPort, self).clean_up_test_run()
+ self._quit_ios_simulator()
fifos = [path for path in os.listdir('/tmp') if re.search('org.webkit.(DumpRenderTree|WebKitTestRunner).*_(IN|OUT|ERROR)', path)]
for fifo in fifos:
try:
@@ -239,13 +246,6 @@
return False
testing_device = self.testing_device # May create a new simulator device
- # testing_device will fail to boot if it is already booted. We assume that if testing_device
- # is booted that it was booted by the iOS Simulator app (as opposed to simctl). So, quit the
- # iOS Simulator app to shutdown testing_device.
- # FIXME: <rdar://problem/20916140> Switch to using CoreSimulator.framework for launching and quitting iOS Simulator
- self._executive.run_command(['osascript', '-e', 'tell application id "com.apple.iphonesimulator" to quit'])
- Simulator.wait_until_device_is_in_state(testing_device.udid, Simulator.DeviceState.SHUTDOWN)
-
if not Simulator.check_simulator_device_and_erase_if_needed(self.host, testing_device.udid):
_log.error('Unable to boot the simulator device with UDID {0}.'.format(testing_device.udid))
return False
@@ -378,6 +378,11 @@
return self._image_differ.diff_image(expected_contents, actual_contents, tolerance)
def reset_preferences(self):
+ # We assume that if testing_device is booted that it was booted by the iOS Simulator app
+ # (as opposed to simctl). So, quit the iOS Simulator app to shutdown testing_device.
+ self._quit_ios_simulator()
+ Simulator.wait_until_device_is_in_state(self.testing_device.udid, Simulator.DeviceState.SHUTDOWN)
+
data_path = os.path.join(self.testing_device.path, 'data')
if os.path.isdir(data_path):
shutil.rmtree(data_path)