[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 03/14] tests/vm: send proxy environment variables
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PATCH v3 03/14] tests/vm: send proxy environment variables over ssh |
Date: |
Mon, 20 May 2019 14:47:05 +0200 |
Packages are fetched via proxy that way, if configured on the host.
That might be required to pass firewalls, and it allows to route
package downloads through a caching proxy server.
Needs AcceptEnv setup in sshd_config on the guest side to work.
Signed-off-by: Gerd Hoffmann <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Tested-by: Thomas Huth <address@hidden>
---
tests/vm/basevm.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py
index 3126fb10a819..640f3226929d 100755
--- a/tests/vm/basevm.py
+++ b/tests/vm/basevm.py
@@ -38,6 +38,13 @@ class BaseVM(object):
GUEST_PASS = "qemupass"
ROOT_PASS = "qemupass"
+ envvars = [
+ "https_proxy",
+ "http_proxy",
+ "ftp_proxy",
+ "no_proxy",
+ ]
+
# The script to run in the guest that builds QEMU
BUILD_SCRIPT = ""
# The guest name, to be overridden by subclasses
@@ -105,6 +112,8 @@ class BaseVM(object):
"-o", "UserKnownHostsFile=" + os.devnull,
"-o", "ConnectTimeout=1",
"-p", self.ssh_port, "-i", self._ssh_key_file]
+ for var in self.envvars:
+ ssh_cmd += ['-o', "SendEnv=%s" % var ]
if interactive:
ssh_cmd += ['-t']
assert not isinstance(cmd, str)
--
2.18.1
- [Qemu-devel] [PATCH v3 00/14] tests/vm: serial console autoinstall, misc fixes., Gerd Hoffmann, 2019/05/20
- [Qemu-devel] [PATCH v3 03/14] tests/vm: send proxy environment variables over ssh,
Gerd Hoffmann <=
- [Qemu-devel] [PATCH v3 08/14] tests/vm: add DEBUG=1 to help text, Gerd Hoffmann, 2019/05/20
- [Qemu-devel] [PATCH v3 05/14] tests/vm: run test builds on snapshot, Gerd Hoffmann, 2019/05/20
- [Qemu-devel] [PATCH v3 09/14] tests/vm: serial console support helpers, Gerd Hoffmann, 2019/05/20
- [Qemu-devel] [PATCH v3 04/14] tests/vm: use ssh with pty unconditionally, Gerd Hoffmann, 2019/05/20
- [Qemu-devel] [PATCH v3 01/14] scripts: use git archive in archive-source, Gerd Hoffmann, 2019/05/20