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 |
11 from pylib import constants | 11 from pylib import constants |
12 from pylib.constants import host_paths | 12 from pylib.constants import host_paths |
13 from pylib.base import base_test_result | 13 from pylib.base import base_test_result |
14 from pylib.base import test_instance | 14 from pylib.base import test_instance |
| 15 from pylib.utils import isolator |
15 | 16 |
16 with host_paths.SysPath(host_paths.BUILD_COMMON_PATH): | 17 with host_paths.SysPath(host_paths.BUILD_COMMON_PATH): |
17 import unittest_util # pylint: disable=import-error | 18 import unittest_util # pylint: disable=import-error |
18 | 19 |
19 | 20 |
20 BROWSER_TEST_SUITES = [ | 21 BROWSER_TEST_SUITES = [ |
21 'components_browsertests', | 22 'components_browsertests', |
22 'content_browsertests', | 23 'content_browsertests', |
23 ] | 24 ] |
24 | 25 |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 self._gtest_filter = ':'.join(l.strip() for l in f) | 191 self._gtest_filter = ':'.join(l.strip() for l in f) |
191 else: | 192 else: |
192 self._gtest_filter = None | 193 self._gtest_filter = None |
193 | 194 |
194 if not args.isolate_file_path: | 195 if not args.isolate_file_path: |
195 default_isolate_file_path = _DEFAULT_ISOLATE_FILE_PATHS.get(self._suite) | 196 default_isolate_file_path = _DEFAULT_ISOLATE_FILE_PATHS.get(self._suite) |
196 if default_isolate_file_path: | 197 if default_isolate_file_path: |
197 args.isolate_file_path = os.path.join( | 198 args.isolate_file_path = os.path.join( |
198 host_paths.DIR_SOURCE_ROOT, default_isolate_file_path) | 199 host_paths.DIR_SOURCE_ROOT, default_isolate_file_path) |
199 | 200 |
200 if args.isolate_file_path: | 201 if (args.isolate_file_path and |
| 202 not isolator.IsIsolateEmpty(args.isolate_file_path)): |
201 self._isolate_abs_path = os.path.abspath(args.isolate_file_path) | 203 self._isolate_abs_path = os.path.abspath(args.isolate_file_path) |
202 self._isolate_delegate = isolate_delegate | 204 self._isolate_delegate = isolate_delegate |
203 self._isolated_abs_path = os.path.join( | 205 self._isolated_abs_path = os.path.join( |
204 constants.GetOutDirectory(), '%s.isolated' % self._suite) | 206 constants.GetOutDirectory(), '%s.isolated' % self._suite) |
205 else: | 207 else: |
206 logging.warning('No isolate file provided. No data deps will be pushed.') | 208 logging.warning('No isolate file provided. No data deps will be pushed.') |
207 self._isolate_delegate = None | 209 self._isolate_delegate = None |
208 | 210 |
209 if args.app_data_files: | 211 if args.app_data_files: |
210 self._app_data_files = args.app_data_files | 212 self._app_data_files = args.app_data_files |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 result_type = None | 403 result_type = None |
402 | 404 |
403 return results | 405 return results |
404 | 406 |
405 #override | 407 #override |
406 def TearDown(self): | 408 def TearDown(self): |
407 """Clear the mappings created by SetUp.""" | 409 """Clear the mappings created by SetUp.""" |
408 if self._isolate_delegate: | 410 if self._isolate_delegate: |
409 self._isolate_delegate.Clear() | 411 self._isolate_delegate.Clear() |
410 | 412 |
OLD | NEW |