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

Unified Diff: build/android/devil/android/device_utils_test.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/devil/android/device_utils.py ('k') | build/android/devil/utils/cmd_helper.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_test.py
diff --git a/build/android/devil/android/device_utils_test.py b/build/android/devil/android/device_utils_test.py
index db59e65797af14d096ee1fb0f28377596109ad78..387a8b1fc6666a93c76aa496dd0126ebefbd440c 100755
--- a/build/android/devil/android/device_utils_test.py
+++ b/build/android/devil/android/device_utils_test.py
@@ -1165,7 +1165,7 @@ class DeviceUtilsStartInstrumentationTest(DeviceUtilsTest):
def testStartInstrumentation_nothing(self):
with self.assertCalls(
self.call.device.RunShellCommand(
- ['am', 'instrument', 'test.package/.TestInstrumentation'],
+ 'p=test.package;am instrument "$p"/.TestInstrumentation',
check_return=True, large_output=True)):
self.device.StartInstrumentation(
'test.package/.TestInstrumentation',
@@ -1174,7 +1174,7 @@ class DeviceUtilsStartInstrumentationTest(DeviceUtilsTest):
def testStartInstrumentation_finish(self):
with self.assertCalls(
(self.call.device.RunShellCommand(
- ['am', 'instrument', '-w', 'test.package/.TestInstrumentation'],
+ 'p=test.package;am instrument -w "$p"/.TestInstrumentation',
check_return=True, large_output=True),
['OK (1 test)'])):
output = self.device.StartInstrumentation(
@@ -1185,7 +1185,7 @@ class DeviceUtilsStartInstrumentationTest(DeviceUtilsTest):
def testStartInstrumentation_raw(self):
with self.assertCalls(
self.call.device.RunShellCommand(
- ['am', 'instrument', '-r', 'test.package/.TestInstrumentation'],
+ 'p=test.package;am instrument -r "$p"/.TestInstrumentation',
check_return=True, large_output=True)):
self.device.StartInstrumentation(
'test.package/.TestInstrumentation',
@@ -1194,12 +1194,13 @@ class DeviceUtilsStartInstrumentationTest(DeviceUtilsTest):
def testStartInstrumentation_extras(self):
with self.assertCalls(
self.call.device.RunShellCommand(
- ['am', 'instrument', '-e', 'foo', 'Foo', '-e', 'bar', 'Bar',
- 'test.package/.TestInstrumentation'],
+ 'p=test.package;am instrument -e "$p".foo Foo -e bar \'Val \'"$p" '
+ '"$p"/.TestInstrumentation',
check_return=True, large_output=True)):
self.device.StartInstrumentation(
'test.package/.TestInstrumentation',
- finish=False, raw=False, extras={'foo': 'Foo', 'bar': 'Bar'})
+ finish=False, raw=False, extras={'test.package.foo': 'Foo',
+ 'bar': 'Val test.package'})
class DeviceUtilsBroadcastIntentTest(DeviceUtilsTest):
« no previous file with comments | « build/android/devil/android/device_utils.py ('k') | build/android/devil/utils/cmd_helper.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698