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

Unified Diff: tools/skpbench/_adb.py

Issue 2415033002: skpbench: suppot Nexus 6P (Closed)
Patch Set: skpbench: suppot Nexus 6P Created 4 years, 2 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 | « no previous file | tools/skpbench/_hardware_android.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/skpbench/_adb.py
diff --git a/tools/skpbench/_adb.py b/tools/skpbench/_adb.py
index 1769f58e5796d8edf2c2a74adad42914fc4e8933..402e132a2b9fd7afff02099a081347e1ea491975 100644
--- a/tools/skpbench/_adb.py
+++ b/tools/skpbench/_adb.py
@@ -5,6 +5,7 @@
import re
import subprocess
+import sys
class Adb:
def __init__(self, device_serial=None):
@@ -13,7 +14,7 @@ class Adb:
self.__invocation.extend(['-s', device_serial])
def shell(self, cmd):
- subprocess.call(self.__invocation + ['shell', cmd])
+ subprocess.call(self.__invocation + ['shell', cmd], stdout=sys.stderr)
def check(self, cmd):
result = subprocess.check_output(self.__invocation + ['shell', cmd])
@@ -29,13 +30,13 @@ class Adb:
return result.group(1) if result else 'unknown_product'
def is_root(self):
- return self.check('echo $USER') == 'root'
+ return self.check('whoami') == 'root'
def attempt_root(self):
if self.is_root():
return True
- subprocess.call(self.__invocation + ['root'])
+ subprocess.call(self.__invocation + ['root'], stdout=sys.stderr)
return self.is_root()
def remount(self):
- subprocess.call(self.__invocation + ['remount'])
+ subprocess.call(self.__invocation + ['remount'], stdout=sys.stderr)
« no previous file with comments | « no previous file | tools/skpbench/_hardware_android.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698