Commit 87b67c6d authored by qsr's avatar qsr Committed by Commit bot

Pass adb path to host_forwarder.

Review URL: https://codereview.chromium.org/895903002

Cr-Commit-Position: refs/heads/master@{#314317}
parent 188b6e06
...@@ -90,8 +90,10 @@ class Forwarder(object): ...@@ -90,8 +90,10 @@ class Forwarder(object):
device_serial = str(device) device_serial = str(device)
redirection_commands = [ redirection_commands = [
['--serial-id=' + device_serial, '--map', str(device_port), ['--adb=' + constants.GetAdbPath(),
str(host_port)] for device_port, host_port in port_pairs] '--serial-id=' + device_serial,
'--map', str(device_port), str(host_port)]
for device_port, host_port in port_pairs]
logging.info('Forwarding using commands: %s', redirection_commands) logging.info('Forwarding using commands: %s', redirection_commands)
for redirection_command in redirection_commands: for redirection_command in redirection_commands:
...@@ -227,7 +229,9 @@ class Forwarder(object): ...@@ -227,7 +229,9 @@ class Forwarder(object):
if not serial_with_port in instance._device_to_host_port_map: if not serial_with_port in instance._device_to_host_port_map:
logging.error('Trying to unmap non-forwarded port %d' % device_port) logging.error('Trying to unmap non-forwarded port %d' % device_port)
return return
redirection_command = ['--serial-id=' + serial, '--unmap', str(device_port)] redirection_command = ['--adb=' + constants.GetAdbPath(),
'--serial-id=' + serial,
'--unmap', str(device_port)]
(exit_code, output) = cmd_helper.GetCmdStatusAndOutput( (exit_code, output) = cmd_helper.GetCmdStatusAndOutput(
[instance._host_forwarder_path] + redirection_command) [instance._host_forwarder_path] + redirection_command)
if exit_code != 0: if exit_code != 0:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment