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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 """Install an apk to all phones. | 174 """Install an apk to all phones. |
175 | 175 |
176 Args: | 176 Args: |
177 options: options object | 177 options: options object |
178 test: An I_TEST namedtuple | 178 test: An I_TEST namedtuple |
179 print_step: Print a buildbot step | 179 print_step: Print a buildbot step |
180 """ | 180 """ |
181 if print_step: | 181 if print_step: |
182 bb_annotations.PrintNamedStep('install_%s' % test.name.lower()) | 182 bb_annotations.PrintNamedStep('install_%s' % test.name.lower()) |
183 | 183 |
184 args = ['--apk', test.apk, '--apk_package', test.apk_package] | 184 args = ['--apk_package', test.apk_package] |
185 if options.target == 'Release': | 185 if options.target == 'Release': |
186 args.append('--release') | 186 args.append('--release') |
| 187 args.append(test.apk) |
187 | 188 |
188 RunCmd(['build/android/adb_install_apk.py'] + args, halt_on_failure=True) | 189 RunCmd(['build/android/adb_install_apk.py'] + args, halt_on_failure=True) |
189 | 190 |
190 | 191 |
191 def RunInstrumentationSuite(options, test, flunk_on_failure=True, | 192 def RunInstrumentationSuite(options, test, flunk_on_failure=True, |
192 python_only=False, official_build=False): | 193 python_only=False, official_build=False): |
193 """Manages an invocation of test_runner.py for instrumentation tests. | 194 """Manages an invocation of test_runner.py for instrumentation tests. |
194 | 195 |
195 Args: | 196 Args: |
196 options: options object | 197 options: options object |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
661 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) | 662 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) |
662 if options.coverage_bucket: | 663 if options.coverage_bucket: |
663 setattr(options, 'coverage_dir', | 664 setattr(options, 'coverage_dir', |
664 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) | 665 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) |
665 | 666 |
666 MainTestWrapper(options) | 667 MainTestWrapper(options) |
667 | 668 |
668 | 669 |
669 if __name__ == '__main__': | 670 if __name__ == '__main__': |
670 sys.exit(main(sys.argv)) | 671 sys.exit(main(sys.argv)) |
OLD | NEW |