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

Unified Diff: tools/telemetry/telemetry/core/forwarders/android_forwarder.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
Index: tools/telemetry/telemetry/core/forwarders/android_forwarder.py
diff --git a/tools/telemetry/telemetry/core/forwarders/android_forwarder.py b/tools/telemetry/telemetry/core/forwarders/android_forwarder.py
index 60138e4bf6fa7a9bdb3160f9741f0e84d3533b37..4c542f587d5c563ccc417ea795d2b6644ac11fc4 100644
--- a/tools/telemetry/telemetry/core/forwarders/android_forwarder.py
+++ b/tools/telemetry/telemetry/core/forwarders/android_forwarder.py
@@ -184,7 +184,7 @@ class AndroidRndisConfigurator(object):
def _FindDeviceRndisInterface(self):
"""Returns the name of the RNDIS network interface if present."""
- config = self._device.old_interface.RunShellCommand('netcfg')
+ config = self._device.RunShellCommand('netcfg')
interfaces = [line.split()[0] for line in config]
candidates = [iface for iface in interfaces if re.match('rndis|usb', iface)]
if candidates:
@@ -257,8 +257,8 @@ doit &
'prefix': script_prefix }
self._device.old_interface.SetFileContents('%s.sh' % script_prefix, script)
# TODO(szym): run via su -c if necessary.
- self._device.old_interface.RunShellCommand('rm %s.log' % script_prefix)
- self._device.old_interface.RunShellCommand('. %s.sh' % script_prefix)
+ self._device.RunShellCommand('rm %s.log' % script_prefix)
+ self._device.RunShellCommand('. %s.sh' % script_prefix)
self._WaitForDevice()
result = self._device.old_interface.GetFileContents(
'%s.log' % script_prefix)
@@ -332,7 +332,7 @@ doit &
else:
excluded = 'no interfaces excluded on other devices'
addresses += [line.split()[2]
- for line in device.old_interface.RunShellCommand('netcfg')
+ for line in device.RunShellCommand('netcfg')
if excluded not in line]
return addresses
@@ -421,7 +421,7 @@ doit &
netmask = _Long2Ip(netmask)
# TODO(szym) run via su -c if necessary.
- self._device.old_interface.RunShellCommand(
+ self._device.RunShellCommand(
'ifconfig %s %s netmask %s up' % (device_iface, device_ip, netmask))
# Enabling the interface sometimes breaks adb.
self._WaitForDevice()

Powered by Google App Engine
This is Rietveld 408576698