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 collections | 5 import collections |
| 6 import itertools | 6 import itertools |
| 7 import logging | 7 import logging |
| 8 import os | 8 import os |
| 9 import posixpath | 9 import posixpath |
| 10 import time | 10 import time |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 227 'LD_LIBRARY_PATH': self._device_dist_dir | 227 'LD_LIBRARY_PATH': self._device_dist_dir |
| 228 } | 228 } |
| 229 try: | 229 try: |
| 230 gcov_strip_depth = os.environ['NATIVE_COVERAGE_DEPTH_STRIP'] | 230 gcov_strip_depth = os.environ['NATIVE_COVERAGE_DEPTH_STRIP'] |
| 231 external = device.GetExternalStoragePath() | 231 external = device.GetExternalStoragePath() |
| 232 env['GCOV_PREFIX'] = '%s/gcov' % external | 232 env['GCOV_PREFIX'] = '%s/gcov' % external |
| 233 env['GCOV_PREFIX_STRIP'] = gcov_strip_depth | 233 env['GCOV_PREFIX_STRIP'] = gcov_strip_depth |
| 234 except (device_errors.CommandFailedError, KeyError): | 234 except (device_errors.CommandFailedError, KeyError): |
| 235 pass | 235 pass |
| 236 | 236 |
| 237 # Executable tests return a nonzero exit code on test failure, which is | |
| 238 # fine from the test runner's perspective; thus check_return=False. | |
|
perezju
2017/03/20 15:22:58
Had to search through commit messages to figure ou
jbudorick
2017/03/20 15:27:02
woops, this is probably something I should've docu
| |
| 237 output = device.RunShellCommand( | 239 output = device.RunShellCommand( |
| 238 cmd, cwd=cwd, env=env, check_return=False, large_output=True, **kwargs) | 240 cmd, cwd=cwd, env=env, check_return=False, large_output=True, **kwargs) |
| 239 return output | 241 return output |
| 240 | 242 |
| 241 def PullAppFiles(self, device, files, directory): | 243 def PullAppFiles(self, device, files, directory): |
| 242 pass | 244 pass |
| 243 | 245 |
| 244 def Clear(self, device): | 246 def Clear(self, device): |
| 245 device.KillAll(self._exe_file_name, blocking=True, timeout=30, quiet=True) | 247 device.KillAll(self._exe_file_name, blocking=True, timeout=30, quiet=True) |
| 246 | 248 |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 457 @local_device_environment.handle_shard_failures | 459 @local_device_environment.handle_shard_failures |
| 458 @trace_event.traced | 460 @trace_event.traced |
| 459 def individual_device_tear_down(dev): | 461 def individual_device_tear_down(dev): |
| 460 for s in self._servers.get(str(dev), []): | 462 for s in self._servers.get(str(dev), []): |
| 461 s.TearDown() | 463 s.TearDown() |
| 462 | 464 |
| 463 tool = self.GetTool(dev) | 465 tool = self.GetTool(dev) |
| 464 tool.CleanUpEnvironment() | 466 tool.CleanUpEnvironment() |
| 465 | 467 |
| 466 self._env.parallel_devices.pMap(individual_device_tear_down) | 468 self._env.parallel_devices.pMap(individual_device_tear_down) |
| OLD | NEW |