summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLouis Dionne <ldionne@apple.com>2019-08-08 17:33:35 +0000
committerLouis Dionne <ldionne@apple.com>2019-08-08 17:33:35 +0000
commit5f92cb70149c567c28b77be5723c5e20e882882f (patch)
tree4fc76f5d1aad0e8697e15424fc5553d26597e6bd
parente77eb50f6d66a08dce527aa0c014fd950f56717d (diff)
downloadbcm5719-llvm-5f92cb70149c567c28b77be5723c5e20e882882f.tar.gz
bcm5719-llvm-5f92cb70149c567c28b77be5723c5e20e882882f.zip
[libc++] Fix environment variable passing in libc++'s `SSHExecutor` `lit` utility
Summary: Quote the value of environment variables when passing them to the SSH client in SSHExecutor in libc++'s lit utilities. Without the quotes, an environment variable like FOO="buzz bar" gets passed incorrectly like this, ssh env FOO=buzz bar, which causes bar to be treated as a command to run, not part of the environment variable value. We ran into this when using SSHExecutor to do bringup of our CUDA libcu++ port on an embedded aarch64 system. Patch by Bryce Adelstein Lelbach. Differential Revision: https://reviews.llvm.org/D65960 llvm-svn: 368317
-rw-r--r--libcxx/utils/libcxx/test/executor.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/utils/libcxx/test/executor.py b/libcxx/utils/libcxx/test/executor.py
index 607c9384bc1..5bb5525d047 100644
--- a/libcxx/utils/libcxx/test/executor.py
+++ b/libcxx/utils/libcxx/test/executor.py
@@ -187,7 +187,7 @@ class SSHExecutor(RemoteExecutor):
remote = self.user_prefix + self.host
ssh_cmd = [self.ssh_command, '-oBatchMode=yes', remote]
if env:
- env_cmd = ['env'] + ['%s=%s' % (k, v) for k, v in env.items()]
+ env_cmd = ['env'] + ['%s="%s"' % (k, v) for k, v in env.items()]
else:
env_cmd = []
remote_cmd = ' '.join(env_cmd + cmd)
OpenPOWER on IntegriCloud