| 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 logging | 5 import logging | 
| 6 import os | 6 import os | 
| 7 import re | 7 import re | 
| 8 import tempfile | 8 import tempfile | 
| 9 | 9 | 
| 10 from devil.android import apk_helper | 10 from devil.android import apk_helper | 
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 134 | 134 | 
| 135 class GtestTestInstance(test_instance.TestInstance): | 135 class GtestTestInstance(test_instance.TestInstance): | 
| 136 | 136 | 
| 137   def __init__(self, args, isolate_delegate, error_func): | 137   def __init__(self, args, isolate_delegate, error_func): | 
| 138     super(GtestTestInstance, self).__init__() | 138     super(GtestTestInstance, self).__init__() | 
| 139     # TODO(jbudorick): Support multiple test suites. | 139     # TODO(jbudorick): Support multiple test suites. | 
| 140     if len(args.suite_name) > 1: | 140     if len(args.suite_name) > 1: | 
| 141       raise ValueError('Platform mode currently supports only 1 gtest suite') | 141       raise ValueError('Platform mode currently supports only 1 gtest suite') | 
| 142     self._extract_test_list_from_filter = args.extract_test_list_from_filter | 142     self._extract_test_list_from_filter = args.extract_test_list_from_filter | 
| 143     self._shard_timeout = args.shard_timeout | 143     self._shard_timeout = args.shard_timeout | 
| 144     self._skip_clear_data = args.skip_clear_data |  | 
| 145     self._suite = args.suite_name[0] | 144     self._suite = args.suite_name[0] | 
| 146     self._exe_dist_dir = None | 145     self._exe_dist_dir = None | 
| 147 | 146 | 
| 148     # GYP: | 147     # GYP: | 
| 149     if args.executable_dist_dir: | 148     if args.executable_dist_dir: | 
| 150       self._exe_dist_dir = os.path.abspath(args.executable_dist_dir) | 149       self._exe_dist_dir = os.path.abspath(args.executable_dist_dir) | 
| 151     else: | 150     else: | 
| 152       # TODO(agrieve): Remove auto-detection once recipes pass flag explicitly. | 151       # TODO(agrieve): Remove auto-detection once recipes pass flag explicitly. | 
| 153       exe_dist_dir = os.path.join(constants.GetOutDirectory(), | 152       exe_dist_dir = os.path.join(constants.GetOutDirectory(), | 
| 154                                   '%s__dist' % self._suite) | 153                                   '%s__dist' % self._suite) | 
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 261 | 260 | 
| 262   @property | 261   @property | 
| 263   def runner(self): | 262   def runner(self): | 
| 264     return self._apk_helper and self._apk_helper.GetInstrumentationName() | 263     return self._apk_helper and self._apk_helper.GetInstrumentationName() | 
| 265 | 264 | 
| 266   @property | 265   @property | 
| 267   def shard_timeout(self): | 266   def shard_timeout(self): | 
| 268     return self._shard_timeout | 267     return self._shard_timeout | 
| 269 | 268 | 
| 270   @property | 269   @property | 
| 271   def skip_clear_data(self): |  | 
| 272     return self._skip_clear_data |  | 
| 273 |  | 
| 274   @property |  | 
| 275   def suite(self): | 270   def suite(self): | 
| 276     return self._suite | 271     return self._suite | 
| 277 | 272 | 
| 278   @property | 273   @property | 
| 279   def test_apk_incremental_install_script(self): | 274   def test_apk_incremental_install_script(self): | 
| 280     return self._test_apk_incremental_install_script | 275     return self._test_apk_incremental_install_script | 
| 281 | 276 | 
| 282   @property | 277   @property | 
| 283   def test_arguments(self): | 278   def test_arguments(self): | 
| 284     return self._test_arguments | 279     return self._test_arguments | 
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 401         result_type = None | 396         result_type = None | 
| 402 | 397 | 
| 403     return results | 398     return results | 
| 404 | 399 | 
| 405   #override | 400   #override | 
| 406   def TearDown(self): | 401   def TearDown(self): | 
| 407     """Clear the mappings created by SetUp.""" | 402     """Clear the mappings created by SetUp.""" | 
| 408     if self._isolate_delegate: | 403     if self._isolate_delegate: | 
| 409       self._isolate_delegate.Clear() | 404       self._isolate_delegate.Clear() | 
| 410 | 405 | 
| OLD | NEW | 
|---|