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

Unified Diff: build/android/adb_install_apk.py

Issue 290573004: [Android] Support generic parallel execution across devices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 | build/android/provision_devices.py » ('j') | build/android/pylib/device/device_utils.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/adb_install_apk.py
diff --git a/build/android/adb_install_apk.py b/build/android/adb_install_apk.py
index fffcb567de0b5ee9d9cf3a9b0a0e9f5292a81c44..91410309bec2331e7251ea65deedff66d5453fc3 100755
--- a/build/android/adb_install_apk.py
+++ b/build/android/adb_install_apk.py
@@ -6,7 +6,6 @@
"""Utility script to install APKs from the command line quickly."""
-import multiprocessing
import optparse
import os
import sys
@@ -43,13 +42,6 @@ def ValidateInstallAPKOption(option_parser, options):
options.apk)
-def _InstallApk(args):
- apk_path, apk_package, keep_data, device = args
- device_utils.DeviceUtils(device=device).old_interface.ManagedInstall(
- apk_path, keep_data, apk_package)
- print '----- Installed on %s -----' % device
-
-
def main(argv):
parser = optparse.OptionParser()
AddInstallAPKOption(parser)
@@ -66,13 +58,10 @@ def main(argv):
if not options.apk_package:
options.apk_package = apk_helper.GetPackageName(options.apk)
- pool = multiprocessing.Pool(len(devices))
- # Send a tuple (apk_path, apk_package, device) per device.
- pool.map(_InstallApk, zip([options.apk] * len(devices),
- [options.apk_package] * len(devices),
- [options.keep_data] * len(devices),
- devices))
+ device_utils.DeviceUtils.parallel(devices).old_interface.ManagedInstall(
+ options.apk, options.keep_data, options.apk_package).get(120)
if __name__ == '__main__':
sys.exit(main(sys.argv))
+
« no previous file with comments | « no previous file | build/android/provision_devices.py » ('j') | build/android/pylib/device/device_utils.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698