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

Unified Diff: telemetry/telemetry/core/cros_interface.py

Issue 2982743002: webrtc: Fix missing port forwarding on CrOS (Closed)
Patch Set: webrtc: Fix missing port forwarding on CrOS and android Created 3 years, 5 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: telemetry/telemetry/core/cros_interface.py
diff --git a/telemetry/telemetry/core/cros_interface.py b/telemetry/telemetry/core/cros_interface.py
index bf98d3f7a4c18ffb32836f39fed7cede227a3a39..639ed34ebfddbdc1b0fd2ce62536d218ab1c7618 100644
--- a/telemetry/telemetry/core/cros_interface.py
+++ b/telemetry/telemetry/core/cros_interface.py
@@ -142,7 +142,7 @@ class CrOSInterface(object):
def ssh_port(self):
return self._ssh_port
- def FormSSHCommandLine(self, args, extra_ssh_args=None):
+ def FormSSHCommandLine(self, args, extra_ssh_args=None, port_forward=False):
"""Constructs a subprocess-suitable command line for `ssh'.
"""
if self.local:
@@ -152,8 +152,12 @@ class CrOSInterface(object):
# connection to run remote commands (crbug.com/239607).
return ['sh', '-c', " ".join(args)]
- full_args = ['ssh', '-o ForwardX11=no', '-o ForwardX11Trusted=no', '-n',
- '-S', self._ssh_control_file] + self._ssh_args
+ full_args = ['ssh', '-o ForwardX11=no', '-o ForwardX11Trusted=no', '-n']
+ # As remote port forwarding might conflict with the control socket
+ # sharing, skip the control socket args if it is for remote port forwarding.
+ if not port_forward:
+ full_args += ['-S', self._ssh_control_file]
+ full_args += self._ssh_args
if self._ssh_identity is not None:
full_args.extend(['-i', self._ssh_identity])
if extra_ssh_args:
« no previous file with comments | « no previous file | telemetry/telemetry/core/platform.py » ('j') | telemetry/telemetry/internal/platform/platform_backend.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698