| 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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 | 248 |
| 249 def PullAppFiles(self, device, files, directory): | 249 def PullAppFiles(self, device, files, directory): |
| 250 pass | 250 pass |
| 251 | 251 |
| 252 def Clear(self, device): | 252 def Clear(self, device): |
| 253 device.KillAll(self._exe_file_name, blocking=True, timeout=30, quiet=True) | 253 device.KillAll(self._exe_file_name, blocking=True, timeout=30, quiet=True) |
| 254 | 254 |
| 255 | 255 |
| 256 class LocalDeviceGtestRun(local_device_test_run.LocalDeviceTestRun): | 256 class LocalDeviceGtestRun(local_device_test_run.LocalDeviceTestRun): |
| 257 | 257 |
| 258 def __init__(self, env, test_instance): | 258 def __init__(self, env, test_instance, test_output_saver): |
| 259 assert isinstance(env, local_device_environment.LocalDeviceEnvironment) | 259 assert isinstance(env, local_device_environment.LocalDeviceEnvironment) |
| 260 assert isinstance(test_instance, gtest_test_instance.GtestTestInstance) | 260 assert isinstance(test_instance, gtest_test_instance.GtestTestInstance) |
| 261 super(LocalDeviceGtestRun, self).__init__(env, test_instance) | 261 super(LocalDeviceGtestRun, self).__init__( |
| 262 env, test_instance, test_output_saver) |
| 262 | 263 |
| 263 if self._test_instance.apk: | 264 if self._test_instance.apk: |
| 264 self._delegate = _ApkDelegate(self._test_instance) | 265 self._delegate = _ApkDelegate(self._test_instance) |
| 265 elif self._test_instance.exe_dist_dir: | 266 elif self._test_instance.exe_dist_dir: |
| 266 self._delegate = _ExeDelegate(self, self._test_instance.exe_dist_dir) | 267 self._delegate = _ExeDelegate(self, self._test_instance.exe_dist_dir) |
| 267 self._crashes = set() | 268 self._crashes = set() |
| 268 self._servers = collections.defaultdict(list) | 269 self._servers = collections.defaultdict(list) |
| 269 | 270 |
| 270 #override | 271 #override |
| 271 def TestPackage(self): | 272 def TestPackage(self): |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 @local_device_environment.handle_shard_failures | 469 @local_device_environment.handle_shard_failures |
| 469 @trace_event.traced | 470 @trace_event.traced |
| 470 def individual_device_tear_down(dev): | 471 def individual_device_tear_down(dev): |
| 471 for s in self._servers.get(str(dev), []): | 472 for s in self._servers.get(str(dev), []): |
| 472 s.TearDown() | 473 s.TearDown() |
| 473 | 474 |
| 474 tool = self.GetTool(dev) | 475 tool = self.GetTool(dev) |
| 475 tool.CleanUpEnvironment() | 476 tool.CleanUpEnvironment() |
| 476 | 477 |
| 477 self._env.parallel_devices.pMap(individual_device_tear_down) | 478 self._env.parallel_devices.pMap(individual_device_tear_down) |
| OLD | NEW |