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

Side by Side Diff: tools/testrunner/local/execution.py

Issue 1416373005: [Swarming] Let test runner exit gracefully after test failures. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 | « tools/run-tests.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2012 the V8 project authors. All rights reserved. 1 # Copyright 2012 the V8 project authors. All rights reserved.
2 # Redistribution and use in source and binary forms, with or without 2 # Redistribution and use in source and binary forms, with or without
3 # modification, are permitted provided that the following conditions are 3 # modification, are permitted provided that the following conditions are
4 # met: 4 # met:
5 # 5 #
6 # * Redistributions of source code must retain the above copyright 6 # * Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer. 7 # notice, this list of conditions and the following disclaimer.
8 # * Redistributions in binary form must reproduce the above 8 # * Redistributions in binary form must reproduce the above
9 # copyright notice, this list of conditions and the following 9 # copyright notice, this list of conditions and the following
10 # disclaimer in the documentation and/or other materials provided 10 # disclaimer in the documentation and/or other materials provided
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 test.run += 1 209 test.run += 1
210 test.output = result[1] 210 test.output = result[1]
211 pool.add([self._GetJob(test)]) 211 pool.add([self._GetJob(test)])
212 # Always update the perf database. 212 # Always update the perf database.
213 return True 213 return True
214 214
215 def Run(self, jobs): 215 def Run(self, jobs):
216 self.indicator.Starting() 216 self.indicator.Starting()
217 self._RunInternal(jobs) 217 self._RunInternal(jobs)
218 self.indicator.Done() 218 self.indicator.Done()
219 if self.failed or self.remaining: 219 if self.failed:
220 return 1 220 return 1
221 elif self.remaining:
222 return 2
221 return 0 223 return 0
222 224
223 def _RunInternal(self, jobs): 225 def _RunInternal(self, jobs):
224 pool = Pool(jobs) 226 pool = Pool(jobs)
225 test_map = {} 227 test_map = {}
226 queued_exception = [None] 228 queued_exception = [None]
227 def gen_tests(): 229 def gen_tests():
228 for test in self.tests: 230 for test in self.tests:
229 assert test.id >= 0 231 assert test.id >= 0
230 test_map[test.id] = test 232 test_map[test.id] = test
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 test.suite.GetFlagsForTestCase(test, self.context) + 291 test.suite.GetFlagsForTestCase(test, self.context) +
290 self.context.extra_flags) 292 self.context.extra_flags)
291 return cmd 293 return cmd
292 294
293 295
294 class BreakNowException(Exception): 296 class BreakNowException(Exception):
295 def __init__(self, value): 297 def __init__(self, value):
296 self.value = value 298 self.value = value
297 def __str__(self): 299 def __str__(self):
298 return repr(self.value) 300 return repr(self.value)
OLDNEW
« no previous file with comments | « tools/run-tests.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698