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

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

Issue 1372873003: DeviceUtils: Fix a couple of corner-cases when wrapping commands. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@device-utils-concurrent-md5
Patch Set: rebase Created 5 years, 3 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/android/sdk/adb_wrapper.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 d6d6431910925f4ba0aa4186d869f60c83cad535..5eb0525e42d7c2e81b7b6975726a28e5c6ef849c 100755
--- a/build/android/devil/android/device_utils_test.py
+++ b/build/android/devil/android/device_utils_test.py
@@ -857,7 +857,7 @@ class DeviceUtilsRunShellCommandTest(DeviceUtilsTest):
def testRunShellCommand_largeOutput_enabled(self):
cmd = 'echo $VALUE'
temp_file = MockTempFile('/sdcard/temp-123')
- cmd_redirect = '%s > %s' % (cmd, temp_file.name)
+ cmd_redirect = '( %s )>%s' % (cmd, temp_file.name)
with self.assertCalls(
(mock.call.devil.android.device_temp_file.DeviceTempFile(self.adb),
temp_file),
@@ -878,7 +878,7 @@ class DeviceUtilsRunShellCommandTest(DeviceUtilsTest):
def testRunShellCommand_largeOutput_disabledTrigger(self):
cmd = 'echo $VALUE'
temp_file = MockTempFile('/sdcard/temp-123')
- cmd_redirect = '%s > %s' % (cmd, temp_file.name)
+ cmd_redirect = '( %s )>%s' % (cmd, temp_file.name)
with self.assertCalls(
(self.call.adb.Shell(cmd), self.ShellError('', None)),
(mock.call.devil.android.device_temp_file.DeviceTempFile(self.adb),
« no previous file with comments | « build/android/devil/android/device_utils.py ('k') | build/android/devil/android/sdk/adb_wrapper.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698