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

Unified Diff: build/android/devil/android/device_utils.py

Issue 1397663002: DeviceUtils.StartInstrumentation: Shrink command-line (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add blank line Created 5 years, 2 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 | « build/android/PRESUBMIT.py ('k') | build/android/devil/android/device_utils_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/devil/android/device_utils.py
diff --git a/build/android/devil/android/device_utils.py b/build/android/devil/android/device_utils.py
index 83a806fd7bfdd6e917d5698507c1dcfcac6637a8..e2df2d77da3a232c120ccab0de92b82546c6f8f0 100644
--- a/build/android/devil/android/device_utils.py
+++ b/build/android/devil/android/device_utils.py
@@ -939,7 +939,14 @@ class DeviceUtils(object):
for k, v in extras.iteritems():
cmd.extend(['-e', str(k), str(v)])
cmd.append(component)
- return self.RunShellCommand(cmd, check_return=True, large_output=True)
+
+ # Store the package name in a shell variable to help the command stay under
+ # the _MAX_ADB_COMMAND_LENGTH limit.
+ package = component.split('/')[0]
+ shell_snippet = 'p=%s;%s' % (package,
+ cmd_helper.ShrinkToSnippet(cmd, 'p', package))
+ return self.RunShellCommand(shell_snippet, check_return=True,
+ large_output=True)
@decorators.WithTimeoutAndRetriesFromInstance()
def BroadcastIntent(self, intent_obj, timeout=None, retries=None):
« no previous file with comments | « build/android/PRESUBMIT.py ('k') | build/android/devil/android/device_utils_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698