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

Unified Diff: tools/telemetry/telemetry/core/platform/profiler/android_profiling_helper_unittest.py

Issue 358993003: [Android] Switch to DeviceUtils versions of file functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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
Index: tools/telemetry/telemetry/core/platform/profiler/android_profiling_helper_unittest.py
diff --git a/tools/telemetry/telemetry/core/platform/profiler/android_profiling_helper_unittest.py b/tools/telemetry/telemetry/core/platform/profiler/android_profiling_helper_unittest.py
index 1b839fd1ed22bc511df3879dac324ce65bac1676..6b1d227ecf7f176bf52265ecbd513471d1000dbc 100644
--- a/tools/telemetry/telemetry/core/platform/profiler/android_profiling_helper_unittest.py
+++ b/tools/telemetry/telemetry/core/platform/profiler/android_profiling_helper_unittest.py
@@ -19,7 +19,7 @@ def _GetLibrariesMappedIntoProcesses(device, pids):
libs = set()
for pid in pids:
maps_file = '/proc/%d/maps' % pid
- maps = device.old_interface.GetProtectedFileContents(maps_file)
+ maps = device.ReadFile(maps_file, as_root=True)
for map_line in maps:
lib = re.match(r'.*\s(/.*[.]so)$', map_line)
if lib:
@@ -126,8 +126,7 @@ class TestAndroidProfilingHelper(tab_test_case.TabTestCase):
@benchmark.Enabled('android')
def testGetToolchainBinaryPath(self):
with tempfile.NamedTemporaryFile() as libc:
- self._device.old_interface.PullFileFromDevice('/system/lib/libc.so',
- libc.name)
+ self._device.PullFile('/system/lib/libc.so', libc.name)
path = android_profiling_helper.GetToolchainBinaryPath(libc.name,
'objdump')
assert os.path.exists(path)

Powered by Google App Engine
This is Rietveld 408576698