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

Side by Side Diff: build/android/pylib/base/base_test_result.py

Issue 2134523002: [Android] Revise SIGTERM and unknown test result handling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Always catch TestTerminated. Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | build/android/pylib/local/device/local_device_test_run.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Module containing base test results classes.""" 5 """Module containing base test results classes."""
6 6
7 import threading 7 import threading
8 8
9 9
10 class ResultType(object): 10 class ResultType(object):
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 return self.GetGtestForm() 154 return self.GetGtestForm()
155 155
156 def AddResult(self, result): 156 def AddResult(self, result):
157 """Add |result| to the set. 157 """Add |result| to the set.
158 158
159 Args: 159 Args:
160 result: An instance of BaseTestResult. 160 result: An instance of BaseTestResult.
161 """ 161 """
162 assert isinstance(result, BaseTestResult) 162 assert isinstance(result, BaseTestResult)
163 with self._results_lock: 163 with self._results_lock:
164 self._results.discard(result)
164 self._results.add(result) 165 self._results.add(result)
165 166
166 def AddResults(self, results): 167 def AddResults(self, results):
167 """Add |results| to the set. 168 """Add |results| to the set.
168 169
169 Args: 170 Args:
170 results: An iterable of BaseTestResult objects. 171 results: An iterable of BaseTestResult objects.
171 """ 172 """
172 with self._results_lock: 173 with self._results_lock:
173 for t in results: 174 for t in results:
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 return self._GetType(ResultType.UNKNOWN) 220 return self._GetType(ResultType.UNKNOWN)
220 221
221 def GetNotPass(self): 222 def GetNotPass(self):
222 """Get the set of all non-passed test results.""" 223 """Get the set of all non-passed test results."""
223 return self.GetAll() - self.GetPass() 224 return self.GetAll() - self.GetPass()
224 225
225 def DidRunPass(self): 226 def DidRunPass(self):
226 """Return whether the test run was successful.""" 227 """Return whether the test run was successful."""
227 return not self.GetNotPass() - self.GetSkip() 228 return not self.GetNotPass() - self.GetSkip()
228 229
OLDNEW
« no previous file with comments | « no previous file | build/android/pylib/local/device/local_device_test_run.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698