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..00d139caf8e3592815adfdca218d0e2cad809a02 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_exception = None |
@staticmethod |
def FromRun(ok=None, failed=None, crashed=None, timed_out=False, |
- overall_fail=False): |
+ overall_fail=False, 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_exception = device_exception |
return ret |
@staticmethod |
@@ -109,6 +111,10 @@ class TestResults(object): |
results.failed.append(exc_result) |
return results |
+ @staticmethod |
+ def DeviceExceptions(results): |
+ return set(filter(lambda t: t.device_exception, results)) |
+ |
def _Log(self, sorted_list): |
for t in sorted_list: |
logging.critical(t.name) |