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

Unified Diff: build/android/pylib/device/device_utils_test.py

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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/pylib/device/device_utils.py ('k') | build/android/pylib/gtest/setup.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/device/device_utils_test.py
diff --git a/build/android/pylib/device/device_utils_test.py b/build/android/pylib/device/device_utils_test.py
index 6071fd57a069ebc625ca304c62ca0becf37a4e37..8a25f2505794b39baca67d1205348b589f0cd35f 100755
--- a/build/android/pylib/device/device_utils_test.py
+++ b/build/android/pylib/device/device_utils_test.py
@@ -656,6 +656,24 @@ class DeviceUtilsRunShellCommandTest(DeviceUtilsNewImplTest):
self.device.RunShellCommand(cmd, check_return=False))
+class DeviceUtilsGetDevicePieWrapper(DeviceUtilsNewImplTest):
+
+ def testGetDevicePieWrapper_jb(self):
+ with self.assertCall(
+ self.call.device.build_version_sdk(),
+ constants.ANDROID_SDK_VERSION_CODES.JELLY_BEAN):
+ self.assertEqual('', self.device.GetDevicePieWrapper())
+
+ def testGetDevicePieWrapper_ics(self):
+ with self.assertCalls(
+ (self.call.device.build_version_sdk(),
+ constants.ANDROID_SDK_VERSION_CODES.ICE_CREAM_SANDWICH),
+ (mock.call.pylib.constants.GetOutDirectory(), '/foo/bar'),
+ (mock.call.os.path.exists(mock.ANY), True),
+ (self.call.adb.Push(mock.ANY, mock.ANY), '')):
+ self.assertNotEqual('', self.device.GetDevicePieWrapper())
+
+
@mock.patch('time.sleep', mock.Mock())
class DeviceUtilsKillAllTest(DeviceUtilsNewImplTest):
@@ -1045,7 +1063,7 @@ class DeviceUtilsPushChangedFilesZippedTest(DeviceUtilsNewImplTest):
self.call.device.RunShellCommand(
['unzip', '/test/device/external_dir/tmp.zip'],
as_root=True,
- env={'PATH': '$PATH:/data/local/tmp/bin'},
+ env={'PATH': '/data/local/tmp/bin:$PATH'},
check_return=True),
(self.call.device.IsOnline(), True),
self.call.device.RunShellCommand(
@@ -1383,22 +1401,6 @@ class DeviceUtilsTakeScreenshotTest(DeviceUtilsNewImplTest):
self.device.TakeScreenshot('/test/host/screenshot.png')
-class DeviceUtilsGetIOStatsTest(DeviceUtilsOldImplTest):
-
- def testGetIOStats(self):
- with self.assertCalls(
- "adb -s 0123456789abcdef shell 'cat \"/proc/diskstats\" 2>/dev/null'",
- '179 0 mmcblk0 1 2 3 4 5 6 7 8 9 10 11\r\n'):
- self.assertEqual(
- {
- 'num_reads': 1,
- 'num_writes': 5,
- 'read_ms': 4,
- 'write_ms': 8,
- },
- self.device.GetIOStats())
-
-
class DeviceUtilsGetMemoryUsageForPidTest(DeviceUtilsOldImplTest):
def setUp(self):
« no previous file with comments | « build/android/pylib/device/device_utils.py ('k') | build/android/pylib/gtest/setup.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698