| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 import fnmatch | 5 import fnmatch |
| 6 import imp | 6 import imp |
| 7 import logging | 7 import logging |
| 8 import posixpath | 8 import posixpath |
| 9 import signal | 9 import signal |
| 10 import thread | 10 import thread |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 60 |
| 61 class InvalidShardingSettings(Exception): | 61 class InvalidShardingSettings(Exception): |
| 62 def __init__(self, shard_index, total_shards): | 62 def __init__(self, shard_index, total_shards): |
| 63 super(InvalidShardingSettings, self).__init__( | 63 super(InvalidShardingSettings, self).__init__( |
| 64 'Invalid sharding settings. shard_index: %d total_shards: %d' | 64 'Invalid sharding settings. shard_index: %d total_shards: %d' |
| 65 % (shard_index, total_shards)) | 65 % (shard_index, total_shards)) |
| 66 | 66 |
| 67 | 67 |
| 68 class LocalDeviceTestRun(test_run.TestRun): | 68 class LocalDeviceTestRun(test_run.TestRun): |
| 69 | 69 |
| 70 def __init__(self, env, test_instance): | 70 def __init__(self, env, test_instance, test_output_saver): |
| 71 super(LocalDeviceTestRun, self).__init__(env, test_instance) | 71 super(LocalDeviceTestRun, self).__init__( |
| 72 env, test_instance, test_output_saver) |
| 72 self._tools = {} | 73 self._tools = {} |
| 73 | 74 |
| 74 #override | 75 #override |
| 75 def RunTests(self): | 76 def RunTests(self): |
| 76 tests = self._GetTests() | 77 tests = self._GetTests() |
| 77 | 78 |
| 78 exit_now = threading.Event() | 79 exit_now = threading.Event() |
| 79 | 80 |
| 80 @local_device_environment.handle_shard_failures | 81 @local_device_environment.handle_shard_failures |
| 81 def run_tests_on_device(dev, tests, results): | 82 def run_tests_on_device(dev, tests, results): |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 raise NotImplementedError | 218 raise NotImplementedError |
| 218 def _RunTest(self, device, test): | 219 def _RunTest(self, device, test): |
| 219 raise NotImplementedError | 220 raise NotImplementedError |
| 220 | 221 |
| 221 def _ShouldShard(self): | 222 def _ShouldShard(self): |
| 222 raise NotImplementedError | 223 raise NotImplementedError |
| 223 | 224 |
| 224 | 225 |
| 225 class NoTestsError(Exception): | 226 class NoTestsError(Exception): |
| 226 """Error for when no tests are found.""" | 227 """Error for when no tests are found.""" |
| OLD | NEW |