| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 logging | 5 import logging |
| 6 import re | 6 import re |
| 7 import time | 7 import time |
| 8 | 8 |
| 9 from devil.android import device_errors | 9 from devil.android import device_errors |
| 10 from devil.android import flag_changer | 10 from devil.android import flag_changer |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 reraiser_thread.RunAsync(steps) | 134 reraiser_thread.RunAsync(steps) |
| 135 else: | 135 else: |
| 136 for step in steps: | 136 for step in steps: |
| 137 step() | 137 step() |
| 138 | 138 |
| 139 self._env.parallel_devices.pMap( | 139 self._env.parallel_devices.pMap( |
| 140 individual_device_set_up, | 140 individual_device_set_up, |
| 141 self._test_instance.GetDataDependencies()) | 141 self._test_instance.GetDataDependencies()) |
| 142 | 142 |
| 143 def TearDown(self): | 143 def TearDown(self): |
| 144 @local_device_test_run.handle_shard_failures_with( |
| 145 self._env.BlacklistDevice) |
| 144 def individual_device_tear_down(dev): | 146 def individual_device_tear_down(dev): |
| 145 if str(dev) in self._flag_changers: | 147 if str(dev) in self._flag_changers: |
| 146 self._flag_changers[str(dev)].Restore() | 148 self._flag_changers[str(dev)].Restore() |
| 147 | 149 |
| 148 # Remove package-specific configuration | 150 # Remove package-specific configuration |
| 149 dev.RunShellCommand(['am', 'clear-debug-app'], check_return=True) | 151 dev.RunShellCommand(['am', 'clear-debug-app'], check_return=True) |
| 150 | 152 |
| 151 valgrind_tools.SetChromeTimeoutScale(dev, None) | 153 valgrind_tools.SetChromeTimeoutScale(dev, None) |
| 152 | 154 |
| 153 self._env.parallel_devices.pMap(individual_device_tear_down) | 155 self._env.parallel_devices.pMap(individual_device_tear_down) |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 timeout = v | 286 timeout = v |
| 285 break | 287 break |
| 286 else: | 288 else: |
| 287 logging.warning('Using default 1 minute timeout for %s', test_name) | 289 logging.warning('Using default 1 minute timeout for %s', test_name) |
| 288 timeout = 60 | 290 timeout = 60 |
| 289 | 291 |
| 290 timeout *= cls._GetTimeoutScaleFromAnnotations(annotations) | 292 timeout *= cls._GetTimeoutScaleFromAnnotations(annotations) |
| 291 | 293 |
| 292 return timeout | 294 return timeout |
| 293 | 295 |
| OLD | NEW |