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

Unified Diff: components/cronet/tools/cr_cronet.py

Issue 2013073002: Fix cr_cronet.py APK install when custom build directory is used (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cronet/tools/cr_cronet.py
diff --git a/components/cronet/tools/cr_cronet.py b/components/cronet/tools/cr_cronet.py
index b13aa28273d1b0de79a0ea0a39483ff45024009f..f06afff260227ee01ab5a1b1e8867346a75f7240 100755
--- a/components/cronet/tools/cr_cronet.py
+++ b/components/cronet/tools/cr_cronet.py
@@ -22,11 +22,11 @@ def build(out_dir, test_target, extra_options=''):
extra_options)
-def install(release_arg):
- return run('build/android/adb_install_apk.py ' + release_arg + \
- ' --apk=CronetTest.apk') or \
- run('build/android/adb_install_apk.py ' + release_arg + \
- ' --apk=ChromiumNetTestSupport.apk')
+def install(out_dir, release_arg):
+ cmd = 'BUILDTYPE={0} build/android/adb_install_apk.py {1} --apk={2}'
+ build_dir = out_dir.split('/', 1)[1] # the 'Foo' part of 'out/Foo'
+ return run(cmd.format(build_dir, release_arg, 'CronetTest.apk')) or \
+ run(cmd.format(build_dir, release_arg, 'ChromiumNetTestSupport.apk'))
mef 2016/06/09 21:16:46 is this properly aligned?
mgersh 2016/06/10 15:45:20 The style guide just says to add a level of indent
def test(out_dir, extra_options):
@@ -116,20 +116,20 @@ def main():
return build(out_dir, test_target, extra_options)
if (not is_os):
if (options.command=='install'):
- return install(release_arg)
+ return install(out_dir, release_arg)
if (options.command=='proguard'):
return run ('ninja -C ' + out_dir + ' cronet_sample_proguard_apk')
if (options.command=='test'):
- return install(release_arg) or test(out_dir, extra_options)
+ return install(out_dir, release_arg) or test(out_dir, extra_options)
if (options.command=='build-test'):
- return build(out_dir, test_target) or install(release_arg) or \
+ return build(out_dir, test_target) or install(out_dir, release_arg) or \
test(out_dir, extra_options)
if (options.command=='stack'):
return stack(out_dir)
if (options.command=='debug'):
- return install(release_arg) or debug(extra_options)
+ return install(out_dir, release_arg) or debug(extra_options)
if (options.command=='build-debug'):
- return build(out_dir, test_target) or install(release_arg) or \
+ return build(out_dir, test_target) or install(out_dir, release_arg) or \
debug(extra_options)
else:
if (options.command=='test'):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698