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 json | 7 import json |
8 import logging | 8 import logging |
9 import os | 9 import os |
10 import pickle | 10 import pickle |
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
647 self._flags.extend(args.command_line_flags) | 647 self._flags.extend(args.command_line_flags) |
648 if args.device_flags_file: | 648 if args.device_flags_file: |
649 with open(args.device_flags_file) as device_flags_file: | 649 with open(args.device_flags_file) as device_flags_file: |
650 stripped_lines = (l.strip() for l in device_flags_file) | 650 stripped_lines = (l.strip() for l in device_flags_file) |
651 self._flags.extend(flag for flag in stripped_lines if flag) | 651 self._flags.extend(flag for flag in stripped_lines if flag) |
652 if args.strict_mode and args.strict_mode != 'off': | 652 if args.strict_mode and args.strict_mode != 'off': |
653 self._flags.append('--strict-mode=' + args.strict_mode) | 653 self._flags.append('--strict-mode=' + args.strict_mode) |
654 if args.regenerate_goldens: | 654 if args.regenerate_goldens: |
655 self._flags.append('--regenerate-goldens') | 655 self._flags.append('--regenerate-goldens') |
656 | 656 |
657 if args.test_arguments: | |
658 # --test-arguments is deprecated for gtests and is in the process of | |
659 # being removed. | |
660 raise Exception( | |
661 '--test-arguments is not supported for instrumentation ' | |
662 'tests. Pass command-line flags directly instead.') | |
663 | |
664 def _initializeDriverAttributes(self): | 657 def _initializeDriverAttributes(self): |
665 self._driver_apk = os.path.join( | 658 self._driver_apk = os.path.join( |
666 constants.GetOutDirectory(), constants.SDK_BUILD_APKS_DIR, | 659 constants.GetOutDirectory(), constants.SDK_BUILD_APKS_DIR, |
667 'OnDeviceInstrumentationDriver.apk') | 660 'OnDeviceInstrumentationDriver.apk') |
668 if os.path.exists(self._driver_apk): | 661 if os.path.exists(self._driver_apk): |
669 driver_apk = apk_helper.ApkHelper(self._driver_apk) | 662 driver_apk = apk_helper.ApkHelper(self._driver_apk) |
670 self._driver_package = driver_apk.GetPackageName() | 663 self._driver_package = driver_apk.GetPackageName() |
671 self._driver_name = driver_apk.GetInstrumentationName() | 664 self._driver_name = driver_apk.GetInstrumentationName() |
672 else: | 665 else: |
673 self._driver_apk = None | 666 self._driver_apk = None |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
888 | 881 |
889 @staticmethod | 882 @staticmethod |
890 def GenerateTestResults( | 883 def GenerateTestResults( |
891 result_code, result_bundle, statuses, start_ms, duration_ms): | 884 result_code, result_bundle, statuses, start_ms, duration_ms): |
892 return GenerateTestResults(result_code, result_bundle, statuses, | 885 return GenerateTestResults(result_code, result_bundle, statuses, |
893 start_ms, duration_ms) | 886 start_ms, duration_ms) |
894 | 887 |
895 #override | 888 #override |
896 def TearDown(self): | 889 def TearDown(self): |
897 pass | 890 pass |
OLD | NEW |