| 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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 args.isolate_file_path = os.path.join( | 256 args.isolate_file_path = os.path.join( |
| 257 host_paths.DIR_SOURCE_ROOT, default_isolate_file_path) | 257 host_paths.DIR_SOURCE_ROOT, default_isolate_file_path) |
| 258 | 258 |
| 259 if (args.isolate_file_path and | 259 if (args.isolate_file_path and |
| 260 not isolator.IsIsolateEmpty(args.isolate_file_path)): | 260 not isolator.IsIsolateEmpty(args.isolate_file_path)): |
| 261 self._isolate_abs_path = os.path.abspath(args.isolate_file_path) | 261 self._isolate_abs_path = os.path.abspath(args.isolate_file_path) |
| 262 self._isolate_delegate = isolate_delegate | 262 self._isolate_delegate = isolate_delegate |
| 263 self._isolated_abs_path = os.path.join( | 263 self._isolated_abs_path = os.path.join( |
| 264 constants.GetOutDirectory(), '%s.isolated' % self._suite) | 264 constants.GetOutDirectory(), '%s.isolated' % self._suite) |
| 265 else: | 265 else: |
| 266 logging.warning('No isolate file provided. No data deps will be pushed.') | 266 logging.warning('%s isolate file provided. No data deps will be pushed.', |
| 267 'Empty' if args.isolate_file_path else 'No') |
| 267 self._isolate_delegate = None | 268 self._isolate_delegate = None |
| 268 | 269 |
| 269 if args.app_data_files: | 270 if args.app_data_files: |
| 270 self._app_data_files = args.app_data_files | 271 self._app_data_files = args.app_data_files |
| 271 if args.app_data_file_dir: | 272 if args.app_data_file_dir: |
| 272 self._app_data_file_dir = args.app_data_file_dir | 273 self._app_data_file_dir = args.app_data_file_dir |
| 273 else: | 274 else: |
| 274 self._app_data_file_dir = tempfile.mkdtemp() | 275 self._app_data_file_dir = tempfile.mkdtemp() |
| 275 logging.critical('Saving app files to %s', self._app_data_file_dir) | 276 logging.critical('Saving app files to %s', self._app_data_file_dir) |
| 276 else: | 277 else: |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 if l and not l.startswith('#')] | 410 if l and not l.startswith('#')] |
| 410 | 411 |
| 411 return '*-%s' % ':'.join(disabled_filter_items) | 412 return '*-%s' % ':'.join(disabled_filter_items) |
| 412 | 413 |
| 413 #override | 414 #override |
| 414 def TearDown(self): | 415 def TearDown(self): |
| 415 """Clear the mappings created by SetUp.""" | 416 """Clear the mappings created by SetUp.""" |
| 416 if self._isolate_delegate: | 417 if self._isolate_delegate: |
| 417 self._isolate_delegate.Clear() | 418 self._isolate_delegate.Clear() |
| 418 | 419 |
| OLD | NEW |