Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: scripts/slave/recipe_modules/chromium_android/api.py

Issue 2065843002: [Android] Only pass --adb-path to adb_install_apk for M51 and above. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@update-version
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/chromium_android/example.expected/downgrade_install_tester_basic.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 contextlib 5 import contextlib
6 import datetime 6 import datetime
7 import json 7 import json
8 import os 8 import os
9 import re 9 import re
10 import urllib 10 import urllib
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 495
496 def apk_path(self, apk): 496 def apk_path(self, apk):
497 return self.m.chromium.output_dir.join('apks', apk) if apk else None 497 return self.m.chromium.output_dir.join('apks', apk) if apk else None
498 498
499 def adb_install_apk(self, apk, allow_downgrade=False, devices=None): 499 def adb_install_apk(self, apk, allow_downgrade=False, devices=None):
500 install_cmd = [ 500 install_cmd = [
501 self.m.path['checkout'].join('build', 501 self.m.path['checkout'].join('build',
502 'android', 502 'android',
503 'adb_install_apk.py'), 503 'adb_install_apk.py'),
504 apk, '-v', '--blacklist-file', self.blacklist_file, 504 apk, '-v', '--blacklist-file', self.blacklist_file,
505 '--adb-path', self.m.adb.adb_path(),
506 ] 505 ]
506 if int(self.m.chromium.get_version().get('MAJOR', 0)) > 50:
martiniss 2016/06/13 23:17:30 this should be get('MAJOR', '0'), right?
jbudorick 2016/06/14 19:03:04 It doesn't matter -- int(0) and int('0') will both
507 install_cmd += ['--adb-path', self.m.adb.adb_path()]
507 if devices and isinstance(devices, list): 508 if devices and isinstance(devices, list):
508 for d in devices: 509 for d in devices:
509 install_cmd += ['-d', d] 510 install_cmd += ['-d', d]
510 if allow_downgrade: 511 if allow_downgrade:
511 install_cmd.append('--downgrade') 512 install_cmd.append('--downgrade')
512 if self.m.chromium.c.BUILD_CONFIG == 'Release': 513 if self.m.chromium.c.BUILD_CONFIG == 'Release':
513 install_cmd.append('--release') 514 install_cmd.append('--release')
514 return self.m.step('install ' + self.m.path.basename(apk), install_cmd, 515 return self.m.step('install ' + self.m.path.basename(apk), install_cmd,
515 infra_step=True, 516 infra_step=True,
516 env=self.m.chromium.get_env()) 517 env=self.m.chromium.get_env())
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
1301 script = self.c.test_runner 1302 script = self.c.test_runner
1302 if wrapper_script_suite_name: 1303 if wrapper_script_suite_name:
1303 script = self.m.chromium.output_dir.join('bin', 'run_%s' % 1304 script = self.m.chromium.output_dir.join('bin', 'run_%s' %
1304 wrapper_script_suite_name) 1305 wrapper_script_suite_name)
1305 else: 1306 else:
1306 env = kwargs.get('env', {}) 1307 env = kwargs.get('env', {})
1307 env['CHROMIUM_OUTPUT_DIR'] = env.get('CHROMIUM_OUTPUT_DIR', 1308 env['CHROMIUM_OUTPUT_DIR'] = env.get('CHROMIUM_OUTPUT_DIR',
1308 self.m.chromium.output_dir) 1309 self.m.chromium.output_dir)
1309 kwargs['env'] = env 1310 kwargs['env'] = env
1310 return self.m.python(step_name, script, args, **kwargs) 1311 return self.m.python(step_name, script, args, **kwargs)
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/chromium_android/example.expected/downgrade_install_tester_basic.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698