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

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

Issue 11232037: Retry tests on other bots if the device is unresponsive/offline (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: small fixes Created 8 years, 2 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
Index: build/android/pylib/test_result.py
diff --git a/build/android/pylib/test_result.py b/build/android/pylib/test_result.py
index 31a546acac8a4c6d33bdc32d3c82f582a411e800..4cbd63e5bf53e6a02ee8b3406029af9b34f0c9a5 100644
--- a/build/android/pylib/test_result.py
+++ b/build/android/pylib/test_result.py
@@ -54,16 +54,18 @@ class TestResults(object):
self.unknown = []
self.timed_out = False
self.overall_fail = False
+ self.device_except = False
bulach 2012/10/23 09:30:56 if you agree with the above: self.device_exceptio
@staticmethod
def FromRun(ok=None, failed=None, crashed=None, timed_out=False,
- overall_fail=False):
+ overall_fail=False, device_except=False):
bulach 2012/10/23 09:30:56 nit: device_exception=None
ret = TestResults()
ret.ok = ok or []
ret.failed = failed or []
ret.crashed = crashed or []
ret.timed_out = timed_out
ret.overall_fail = overall_fail
+ ret.device_except = device_except
return ret
@staticmethod
@@ -82,6 +84,14 @@ class TestResults(object):
return ret
@staticmethod
+ def HasDeviceExcept(results):
+ for t in results:
+ if t.device_except:
+ return True
+
+ return False
bulach 2012/10/23 09:30:56 I think this could be: return any(filter(lambda t
yongsheng 2012/10/23 12:58:14 good.
+
+ @staticmethod
def FromPythonException(test_name, start_date_ms, exc_info):
"""Constructs a TestResults with exception information for the given test.
« build/android/pylib/single_test_runner.py ('K') | « build/android/pylib/test_package_apk.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698