| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 copy | 6 import copy |
| 7 import logging | 7 import logging |
| 8 import os | 8 import os |
| 9 import pickle | 9 import pickle |
| 10 import re | 10 import re |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 stripped_lines = (l.strip() for l in device_flags_file) | 509 stripped_lines = (l.strip() for l in device_flags_file) |
| 510 self._flags.extend([flag for flag in stripped_lines if flag]) | 510 self._flags.extend([flag for flag in stripped_lines if flag]) |
| 511 if hasattr(args, 'device_flags_file') and args.device_flags_file: | 511 if hasattr(args, 'device_flags_file') and args.device_flags_file: |
| 512 with open(args.device_flags_file) as device_flags_file: | 512 with open(args.device_flags_file) as device_flags_file: |
| 513 stripped_lines = (l.strip() for l in device_flags_file) | 513 stripped_lines = (l.strip() for l in device_flags_file) |
| 514 self._flags.extend([flag for flag in stripped_lines if flag]) | 514 self._flags.extend([flag for flag in stripped_lines if flag]) |
| 515 if (hasattr(args, 'strict_mode') and | 515 if (hasattr(args, 'strict_mode') and |
| 516 args.strict_mode and | 516 args.strict_mode and |
| 517 args.strict_mode != 'off'): | 517 args.strict_mode != 'off'): |
| 518 self._flags.append('--strict-mode=' + args.strict_mode) | 518 self._flags.append('--strict-mode=' + args.strict_mode) |
| 519 if hasattr(args, 'regenerate_goldens') and args.regenerate_goldens: |
| 520 self._flags.append('--regenerate-goldens') |
| 519 | 521 |
| 520 def _initializeDriverAttributes(self): | 522 def _initializeDriverAttributes(self): |
| 521 self._driver_apk = os.path.join( | 523 self._driver_apk = os.path.join( |
| 522 constants.GetOutDirectory(), constants.SDK_BUILD_APKS_DIR, | 524 constants.GetOutDirectory(), constants.SDK_BUILD_APKS_DIR, |
| 523 'OnDeviceInstrumentationDriver.apk') | 525 'OnDeviceInstrumentationDriver.apk') |
| 524 if os.path.exists(self._driver_apk): | 526 if os.path.exists(self._driver_apk): |
| 525 driver_apk = apk_helper.ApkHelper(self._driver_apk) | 527 driver_apk = apk_helper.ApkHelper(self._driver_apk) |
| 526 self._driver_package = driver_apk.GetPackageName() | 528 self._driver_package = driver_apk.GetPackageName() |
| 527 self._driver_name = driver_apk.GetInstrumentationName() | 529 self._driver_name = driver_apk.GetInstrumentationName() |
| 528 else: | 530 else: |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 678 @staticmethod | 680 @staticmethod |
| 679 def GenerateTestResults( | 681 def GenerateTestResults( |
| 680 result_code, result_bundle, statuses, start_ms, duration_ms): | 682 result_code, result_bundle, statuses, start_ms, duration_ms): |
| 681 return GenerateTestResults(result_code, result_bundle, statuses, | 683 return GenerateTestResults(result_code, result_bundle, statuses, |
| 682 start_ms, duration_ms) | 684 start_ms, duration_ms) |
| 683 | 685 |
| 684 #override | 686 #override |
| 685 def TearDown(self): | 687 def TearDown(self): |
| 686 if self._isolate_delegate: | 688 if self._isolate_delegate: |
| 687 self._isolate_delegate.Clear() | 689 self._isolate_delegate.Clear() |
| OLD | NEW |