OLD | NEW |
---|---|
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 glob | |
5 import os | 6 import os |
6 import re | 7 import re |
7 import urllib | 8 import urllib |
8 | 9 |
9 from infra.libs.infra_types import freeze | 10 from infra.libs.infra_types import freeze |
10 from slave import recipe_api | 11 from slave import recipe_api |
11 | 12 |
12 INSTRUMENTATION_TESTS = freeze([ | 13 INSTRUMENTATION_TESTS = freeze([ |
13 { | 14 { |
14 'test': 'AndroidWebViewTest', | 15 'test': 'AndroidWebViewTest', |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
351 link = ('https://code.google.com/p/chromium/issues/entry?%s' % | 352 link = ('https://code.google.com/p/chromium/issues/entry?%s' % |
352 urllib.urlencode(params)) | 353 urllib.urlencode(params)) |
353 f.result.presentation.links.update({ | 354 f.result.presentation.links.update({ |
354 'report a bug': link | 355 'report a bug': link |
355 }) | 356 }) |
356 raise | 357 raise |
357 | 358 |
358 def provision_devices(self, skip_wipe=False, disable_location=False, | 359 def provision_devices(self, skip_wipe=False, disable_location=False, |
359 min_battery_level=None, disable_network=False, | 360 min_battery_level=None, disable_network=False, |
360 disable_java_debug=False, reboot_timeout=None, | 361 disable_java_debug=False, reboot_timeout=None, |
361 **kwargs): | 362 write_adb_keys_files=True, **kwargs): |
362 args = ['-t', self.m.chromium.c.BUILD_CONFIG] | 363 args = ['-t', self.m.chromium.c.BUILD_CONFIG] |
363 if skip_wipe: | 364 if skip_wipe: |
364 args.append('--skip-wipe') | 365 args.append('--skip-wipe') |
366 if write_adb_keys_files and glob.glob(os.path.join(os.environ['HOME'], | |
367 '.android', '*.pub')): | |
luqui
2015/03/04 20:19:44
If we told it to write the adb keys file, and ther
friedman1
2015/03/04 20:49:34
Why not just [key for key in os.listdir(os.path.jo
| |
368 args.append('--adb-key-files %s' % os.path.join(os.environ['HOME'], | |
369 '.android', '*.pub')) | |
365 if disable_location: | 370 if disable_location: |
366 args.append('--disable-location') | 371 args.append('--disable-location') |
367 if reboot_timeout is not None: | 372 if reboot_timeout is not None: |
368 assert isinstance(reboot_timeout, int) | 373 assert isinstance(reboot_timeout, int) |
369 assert reboot_timeout > 0 | 374 assert reboot_timeout > 0 |
370 args.extend(['--reboot-timeout', reboot_timeout]) | 375 args.extend(['--reboot-timeout', reboot_timeout]) |
371 if min_battery_level is not None: | 376 if min_battery_level is not None: |
372 assert isinstance(min_battery_level, int) | 377 assert isinstance(min_battery_level, int) |
373 assert min_battery_level >= 0 | 378 assert min_battery_level >= 0 |
374 assert min_battery_level <= 100 | 379 assert min_battery_level <= 100 |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
730 | 735 |
731 self.m.gsutil.upload( | 736 self.m.gsutil.upload( |
732 source=self.coverage_dir.join('coverage_html'), | 737 source=self.coverage_dir.join('coverage_html'), |
733 bucket='chrome-code-coverage', | 738 bucket='chrome-code-coverage', |
734 dest=gs_dest, | 739 dest=gs_dest, |
735 args=['-R'], | 740 args=['-R'], |
736 name='upload coverage report', | 741 name='upload coverage report', |
737 link_name='Coverage report', | 742 link_name='Coverage report', |
738 version='4.7', | 743 version='4.7', |
739 **kwargs) | 744 **kwargs) |
OLD | NEW |