Chromium Code Reviews| 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. |