[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v1 15/26] tests/vm: send proxy environment variables
From: |
Alex Bennée |
Subject: |
[Qemu-devel] [PATCH v1 15/26] tests/vm: send proxy environment variables over ssh |
Date: |
Thu, 30 May 2019 11:15:52 +0100 |
From: Gerd Hoffmann <address@hidden>
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>
Message-Id: <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 4847549592d..5e30bac6615 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
@@ -106,6 +113,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.20.1
- Re: [Qemu-devel] [PATCH v1 10/26] tests/vm: Port basevm to Python 3, (continued)
- [Qemu-devel] [PATCH v1 09/26] tests/vm: Use python configured on build, Alex Bennée, 2019/05/30
- [Qemu-devel] [PATCH v1 12/26] tests/vm: Add missing variables on help, Alex Bennée, 2019/05/30
- [Qemu-devel] [PATCH v1 13/26] scripts: use git archive in archive-source, Alex Bennée, 2019/05/30
- [Qemu-devel] [PATCH v1 11/26] tests/vm: Fix build-centos docker-based tests run, Alex Bennée, 2019/05/30
- [Qemu-devel] [PATCH v1 18/26] tests/vm: proper guest shutdown, Alex Bennée, 2019/05/30
- [Qemu-devel] [PATCH v1 25/26] tests/vm: fedora autoinstall, using serial console, Alex Bennée, 2019/05/30
- [Qemu-devel] [PATCH v1 16/26] tests/vm: use ssh with pty unconditionally, Alex Bennée, 2019/05/30
- [Qemu-devel] [PATCH v1 15/26] tests/vm: send proxy environment variables over ssh,
Alex Bennée <=
- [Qemu-devel] [PATCH v1 26/26] tests/vm: ubuntu.i386: apt proxy setup, Alex Bennée, 2019/05/30
- [Qemu-devel] [PATCH v1 24/26] tests/vm: netbsd autoinstall, using serial console, Alex Bennée, 2019/05/30
- [Qemu-devel] [PATCH v1 22/26] tests/vm: openbsd autoinstall, using serial console, Alex Bennée, 2019/05/30
- [Qemu-devel] [PATCH v1 14/26] tests/vm: python3 fixes, Alex Bennée, 2019/05/30
- [Qemu-devel] [PATCH v1 19/26] tests/vm: add vm-boot-{ssh, serial}-<guest> targets, Alex Bennée, 2019/05/30
- [Qemu-devel] [PATCH v1 17/26] tests/vm: run test builds on snapshot, Alex Bennée, 2019/05/30
- [Qemu-devel] [PATCH v1 20/26] tests/vm: add DEBUG=1 to help text, Alex Bennée, 2019/05/30
- [Qemu-devel] [PATCH v1 21/26] tests/vm: serial console support helpers, Alex Bennée, 2019/05/30