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

Unified Diff: build/android/pylib/perf/perf_control.py

Issue 333933003: [Android] Switch to DeviceUtils version of RunShellCommand. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
« no previous file with comments | « build/android/pylib/perf/cache_control.py ('k') | build/android/pylib/perf/perf_control_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/perf/perf_control.py
diff --git a/build/android/pylib/perf/perf_control.py b/build/android/pylib/perf/perf_control.py
index cde12ec9612b7933d88544124965364239b821df..1c88945e2d19592203af90aeca57df9fef0c0382 100644
--- a/build/android/pylib/perf/perf_control.py
+++ b/build/android/pylib/perf/perf_control.py
@@ -73,12 +73,11 @@ class PerfControl(object):
"""
def ForceCpuOnline(online_path):
script = 'chmod 644 {0}; echo 1 > {0}; chmod 444 {0}'.format(online_path)
- self._device.old_interface.RunShellCommandWithSU(script)
+ self._device.RunShellCommand(script, root=True)
return self._device.old_interface.GetFileContents(online_path)[0] == '1'
def ResetCpu(online_path):
- self._device.old_interface.RunShellCommandWithSU(
- 'chmod 644 %s' % online_path)
+ self._device.RunShellCommand('chmod 644 %s' % online_path, root=True)
def WaitFor(condition):
for _ in range(100):
@@ -87,7 +86,7 @@ class PerfControl(object):
time.sleep(0.1)
raise RuntimeError('Timed out')
- cpu_online_files = self._device.old_interface.RunShellCommand(
+ cpu_online_files = self._device.RunShellCommand(
'ls -d /sys/devices/system/cpu/cpu[0-9]*/online')
for online_path in cpu_online_files:
if force_online:
« no previous file with comments | « build/android/pylib/perf/cache_control.py ('k') | build/android/pylib/perf/perf_control_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698