Chromium Code Reviews| 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 imp | 5 import imp |
| 6 import itertools | 6 import itertools |
| 7 import os | 7 import os |
| 8 import posixpath | 8 import posixpath |
| 9 | 9 |
| 10 from devil.android import device_errors | 10 from devil.android import device_errors |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 337 timeout = (self._test_instance.shard_timeout | 337 timeout = (self._test_instance.shard_timeout |
| 338 * self.GetTool(device).GetTimeoutScale()) | 338 * self.GetTool(device).GetTimeoutScale()) |
| 339 output = self._delegate.Run( | 339 output = self._delegate.Run( |
| 340 test, device, flags=self._test_instance.test_arguments, | 340 test, device, flags=self._test_instance.test_arguments, |
| 341 timeout=timeout, retries=0) | 341 timeout=timeout, retries=0) |
| 342 for s in self._servers[str(device)]: | 342 for s in self._servers[str(device)]: |
| 343 s.Reset() | 343 s.Reset() |
| 344 if self._test_instance.app_files: | 344 if self._test_instance.app_files: |
| 345 self._delegate.PullAppFiles(device, self._test_instance.app_files, | 345 self._delegate.PullAppFiles(device, self._test_instance.app_files, |
| 346 self._test_instance.app_file_dir) | 346 self._test_instance.app_file_dir) |
| 347 # Clearing data when using incremental install wipes out cached optimized | 347 if not self._test_instance.skip_clear_data: |
|
jbudorick
2016/02/03 14:38:27
Why are we adding this in addition to --incrementa
agrieve
2016/02/03 16:34:32
I'm envisioning adding a --fast-local-dev (or bett
| |
| 348 # dex files (and shouldn't be necessary by tests anyways). | |
| 349 if not self._env.incremental_install: | |
| 350 self._delegate.Clear(device) | 348 self._delegate.Clear(device) |
| 351 | 349 |
| 352 # Parse the output. | 350 # Parse the output. |
| 353 # TODO(jbudorick): Transition test scripts away from parsing stdout. | 351 # TODO(jbudorick): Transition test scripts away from parsing stdout. |
| 354 results = self._test_instance.ParseGTestOutput(output) | 352 results = self._test_instance.ParseGTestOutput(output) |
| 355 return results | 353 return results |
| 356 | 354 |
| 357 #override | 355 #override |
| 358 def TearDown(self): | 356 def TearDown(self): |
| 359 @local_device_test_run.handle_shard_failures | 357 @local_device_test_run.handle_shard_failures |
| 360 def individual_device_tear_down(dev): | 358 def individual_device_tear_down(dev): |
| 361 for s in self._servers.get(str(dev), []): | 359 for s in self._servers.get(str(dev), []): |
| 362 s.TearDown() | 360 s.TearDown() |
| 363 | 361 |
| 364 tool = self.GetTool(dev) | 362 tool = self.GetTool(dev) |
| 365 tool.CleanUpEnvironment() | 363 tool.CleanUpEnvironment() |
| 366 | 364 |
| 367 self._env.parallel_devices.pMap(individual_device_tear_down) | 365 self._env.parallel_devices.pMap(individual_device_tear_down) |
| OLD | NEW |