Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(583)

Unified Diff: build/android/pylib/android_commands.py

Issue 12035016: Android: fixes timeout for WaitForLogMatch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/android_commands.py
diff --git a/build/android/pylib/android_commands.py b/build/android/pylib/android_commands.py
index b8b407333f9a9269d019393abbe9f33758494951..08ffa6e2ba282b120acdc3fc47a37bb66515c622 100644
--- a/build/android/pylib/android_commands.py
+++ b/build/android/pylib/android_commands.py
@@ -778,7 +778,7 @@ class AndroidCommands(object):
Args:
clear: If True the existing logcat output will be cleared, to avoiding
matching historical output lurking in the log.
- timeout: How long WaitForLogMatch will wait for the given match
+ timeout: Deprecated, will be removed soon.
filters: A list of logcat filters to be used.
"""
if clear:
@@ -823,9 +823,11 @@ class AndroidCommands(object):
|success_re|. If None is given, no error condition will be detected.
clear: If True the existing logcat output will be cleared, defaults to
false.
+ timeout: Timeout in seconds to wait for a log match.
Raises:
- pexpect.TIMEOUT upon the timeout specified by StartMonitoringLogcat().
+ pexpect.TIMEOUT after |timeout| seconds without a match for |success_re|
+ or |error_re|.
Returns:
The re match object if |success_re| is matched first or None if |error_re|
@@ -840,7 +842,7 @@ class AndroidCommands(object):
while True:
# Note this will block for upto the timeout _per log line_, so we need
# to calculate the overall timeout remaining since t0.
- time_remaining = t0 + self._logcat.timeout - time.time()
+ time_remaining = t0 + timeout - time.time()
if time_remaining < 0: raise pexpect.TIMEOUT(self._logcat)
self._logcat.expect(PEXPECT_LINE_RE, timeout=time_remaining)
line = self._logcat.match.group(1)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698