[iOS] run-webkit-tests should check that simctl can boot and shutdown simulator devic...
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Feb 2015 22:30:07 +0000 (22:30 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Feb 2015 22:30:07 +0000 (22:30 +0000)
commit69013527f4f498415b7b1c4703e1e28fac8ae3be
tree5ecd5800d3a045a5aebe2116b61cda48456c5a9f
parentbd600d57129becf110d79f4a39154235d29b446e
[iOS] run-webkit-tests should check that simctl can boot and shutdown simulator device before running tests
https://bugs.webkit.org/show_bug.cgi?id=141718

Reviewed by Alex Christensen.

We should only run layout tests if simctl can successfully boot and shutdown the testing device.

* Scripts/webkitpy/port/ios.py:
(IOSSimulatorPort.check_sys_deps): Modified to call Simulator.check_simulator_device_and_erase_if_needed().
Log a error and return False if we are unable to boot the simulator device so that the caller can take
appropriate action, say exit(3) before running any layout tests.
* Scripts/webkitpy/xcode/simulator.py:
(Simulator._boot_and_shutdown_simulator_device): Added. Boot and then shut down the simulator device
with the specified UDID.
(Simulator.check_simulator_device_and_erase_if_needed): Added. Checks that simulator device
with the specified UDID can successfully boot and shut down. We make at most two attempts to
boot and shut down the device, erasing the device between tries so as to restore the device
to a known good state.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@180239 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/Scripts/webkitpy/port/ios.py
Tools/Scripts/webkitpy/xcode/simulator.py