Title: [186085] trunk/Tools
- Revision
- 186085
- Author
- [email protected]
- Date
- 2015-06-29 14:11:55 -0700 (Mon, 29 Jun 2015)
Log Message
Add timeout in run-webkit-tests for launching the simulator
https://bugs.webkit.org/show_bug.cgi?id=146371
Reviewed by Darin Adler.
Adds a default 5-minute timeout using the timeout class in webkitpy.benchmark_runner.utils
for the otherwise infinitely patient wait_until_device_is_in_state method.
* Scripts/webkitpy/xcode/simulator.py:
(Simulator.DeviceState):
(Simulator):
(Simulator.wait_until_device_is_in_state):
(Simulator.device_state):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (186084 => 186085)
--- trunk/Tools/ChangeLog 2015-06-29 21:01:29 UTC (rev 186084)
+++ trunk/Tools/ChangeLog 2015-06-29 21:11:55 UTC (rev 186085)
@@ -1,3 +1,19 @@
+2015-06-29 Jake Nielsen <[email protected]>
+
+ Add timeout in run-webkit-tests for launching the simulator
+ https://bugs.webkit.org/show_bug.cgi?id=146371
+
+ Reviewed by Darin Adler.
+
+ Adds a default 5-minute timeout using the timeout class in webkitpy.benchmark_runner.utils
+ for the otherwise infinitely patient wait_until_device_is_in_state method.
+
+ * Scripts/webkitpy/xcode/simulator.py:
+ (Simulator.DeviceState):
+ (Simulator):
+ (Simulator.wait_until_device_is_in_state):
+ (Simulator.device_state):
+
2015-06-29 Benjamin Poulain <[email protected]>
Make the NFA transitions range-based
Modified: trunk/Tools/Scripts/webkitpy/xcode/simulator.py (186084 => 186085)
--- trunk/Tools/Scripts/webkitpy/xcode/simulator.py 2015-06-29 21:01:29 UTC (rev 186084)
+++ trunk/Tools/Scripts/webkitpy/xcode/simulator.py 2015-06-29 21:11:55 UTC (rev 186085)
@@ -28,6 +28,7 @@
import subprocess
import time
+from webkitpy.benchmark_runner.utils import timeout
from webkitpy.common.host import Host
_log = logging.getLogger(__name__)
@@ -261,10 +262,10 @@
SHUTTING_DOWN = 4
@staticmethod
- def wait_until_device_is_in_state(udid, wait_until_state):
- # FIXME: Implement support for a timed wait.
- while (Simulator.device_state(udid) != wait_until_state):
- time.sleep(0.5)
+ def wait_until_device_is_in_state(udid, wait_until_state, timeout_seconds=60 * 5):
+ with timeout(seconds=timeout_seconds):
+ while (Simulator.device_state(udid) != wait_until_state):
+ time.sleep(0.5)
@staticmethod
def device_state(udid):
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes