Make it possible to use an existing simulator instance for one-off testing
authorjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Nov 2016 18:30:47 +0000 (18:30 +0000)
committerjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Nov 2016 18:30:47 +0000 (18:30 +0000)
commit30722559ce2fa462a59f6bea58a455fadc732851
tree031adf5cb22741f4b8488add9595457934c733b3
parent8f5619ef47c5e8d2ca177621b936031c93d31970
Make it possible to use an existing simulator instance for one-off testing
https://bugs.webkit.org/show_bug.cgi?id=164568
<rdar://problem/29189133>

Reviewed by Daniel Bates.

With this patch, if a simulator is currently running on the machine and
'--dedicated-simulators' is not passed into the application, only one simulator
instance will be used, and this instance will be the existing instance.
If no simulator is running or '--dedicated-simulators' is passed to the script,
previous behavior will be used.

* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(parse_args):
* Scripts/webkitpy/port/ios.py:
(IOSSimulatorPort.__init__): Logic for enabling usage of currently running simulator.
(IOSSimulatorPort._create_simulators): Only create simulators when needed, don't reset already running simulators.
(IOSSimulatorPort.setup_test_run): Don't open already running simulators.
(IOSSimulatorPort._quit_ios_simulator): Only quit simulators if we manage them.
(IOSSimulatorPort.clean_up_test_run): Only clean up simulators if we manage them.
(IOSSimulatorPort._using_dedicated_simulators): True if simulators need to be managed, false if using an existing instance.
(IOSSimulatorPort.device_id_for_worker_number): Access currently running simulator if not managing devices.
* Scripts/webkitpy/xcode/simulator.py:
(Simulator.current_device): Get currently running device.

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