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

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: fix the parallelizer tests 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') | no next file with comments »
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 5493439fea16705f7b8165b34c1be45b94ee9e2a..a91510137925e766cf5166768f78679e7ed51c12 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
@@ -50,13 +49,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)
@@ -73,13 +65,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).pFinish(None)
if __name__ == '__main__':
sys.exit(main(sys.argv))
+
« no previous file with comments | « no previous file | build/android/provision_devices.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698