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

Unified Diff: tools/skpbench/_hardware_nexus_6p.py

Issue 2481413003: skpbench: simplify adb and reduce number of invocations (Closed)
Patch Set: skpbench: simplify adb and reduce number of invocations Created 4 years, 1 month 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 | « tools/skpbench/_hardware_android.py ('k') | tools/skpbench/_hardware_pixel_c.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/skpbench/_hardware_nexus_6p.py
diff --git a/tools/skpbench/_hardware_nexus_6p.py b/tools/skpbench/_hardware_nexus_6p.py
index 7e9bb5545a053591aaf63da5988ba40bf4859636..077933bb4105704e5f205e20ef33217cf98cf8c2 100644
--- a/tools/skpbench/_hardware_nexus_6p.py
+++ b/tools/skpbench/_hardware_nexus_6p.py
@@ -23,7 +23,7 @@ class HardwareNexus6P(HardwareAndroid):
self._unlock_clocks()
def _lock_clocks(self):
- if not self._is_root:
+ if not self._adb.is_root():
return
self._adb.shell('''\
@@ -73,7 +73,7 @@ class HardwareNexus6P(HardwareAndroid):
echo 9887 > /sys/class/devfreq/qcom,gpubw.70/min_freq''')
def _unlock_clocks(self):
- if not self._is_root:
+ if not self._adb.is_root():
return
# restore ddr settings to default.
@@ -121,10 +121,10 @@ class HardwareNexus6P(HardwareAndroid):
def sanity_check(self):
HardwareAndroid.sanity_check(self)
- if not self._is_root:
+ if not self._adb.is_root():
return
- result = self._adb.check_lines('''\
+ result = self._adb.check('''\
cat /sys/class/power_supply/battery/capacity \
/sys/devices/system/cpu/online \
/sys/class/thermal/thermal_zone14/temp \
@@ -147,7 +147,7 @@ class HardwareNexus6P(HardwareAndroid):
[Expectation(int, exact_value=CPU_CLOCK_RATE, name='cpu_%i clock rate' %i)
for i in range(4, 7)]
- Expectation.check_all(expectations, result)
+ Expectation.check_all(expectations, result.splitlines())
def sleep(self, sleeptime):
self._unlock_clocks()
« no previous file with comments | « tools/skpbench/_hardware_android.py ('k') | tools/skpbench/_hardware_pixel_c.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698