| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 import collections | 6 import collections |
| 7 import glob | 7 import glob |
| 8 import hashlib | 8 import hashlib |
| 9 import json | 9 import json |
| 10 import os | 10 import os |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 """Install an apk to all phones. | 164 """Install an apk to all phones. |
| 165 | 165 |
| 166 Args: | 166 Args: |
| 167 options: options object | 167 options: options object |
| 168 test: An I_TEST namedtuple | 168 test: An I_TEST namedtuple |
| 169 print_step: Print a buildbot step | 169 print_step: Print a buildbot step |
| 170 """ | 170 """ |
| 171 if print_step: | 171 if print_step: |
| 172 bb_annotations.PrintNamedStep('install_%s' % test.name.lower()) | 172 bb_annotations.PrintNamedStep('install_%s' % test.name.lower()) |
| 173 | 173 |
| 174 args = ['--apk', test.apk, '--apk_package', test.apk_package] | 174 args = ['--apk_package', test.apk_package] |
| 175 if options.target == 'Release': | 175 if options.target == 'Release': |
| 176 args.append('--release') | 176 args.append('--release') |
| 177 args.append(test.apk) |
| 177 | 178 |
| 178 RunCmd(['build/android/adb_install_apk.py'] + args, halt_on_failure=True) | 179 RunCmd(['build/android/adb_install_apk.py'] + args, halt_on_failure=True) |
| 179 | 180 |
| 180 | 181 |
| 181 def RunInstrumentationSuite(options, test, flunk_on_failure=True, | 182 def RunInstrumentationSuite(options, test, flunk_on_failure=True, |
| 182 python_only=False, official_build=False): | 183 python_only=False, official_build=False): |
| 183 """Manages an invocation of test_runner.py for instrumentation tests. | 184 """Manages an invocation of test_runner.py for instrumentation tests. |
| 184 | 185 |
| 185 Args: | 186 Args: |
| 186 options: options object | 187 options: options object |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 651 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) | 652 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) |
| 652 if options.coverage_bucket: | 653 if options.coverage_bucket: |
| 653 setattr(options, 'coverage_dir', | 654 setattr(options, 'coverage_dir', |
| 654 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) | 655 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) |
| 655 | 656 |
| 656 MainTestWrapper(options) | 657 MainTestWrapper(options) |
| 657 | 658 |
| 658 | 659 |
| 659 if __name__ == '__main__': | 660 if __name__ == '__main__': |
| 660 sys.exit(main(sys.argv)) | 661 sys.exit(main(sys.argv)) |
| OLD | NEW |