summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2019-06-17 06:38:58 +0200
committerAlex Bennée <alex.bennee@linaro.org>2019-07-04 19:23:07 +0100
commitc9b423d6d3fde0132ee6f31d69a1c1370a89ce1a (patch)
tree7119d457cfda8dd7356ae06f34326ef6a08bd585
parent60136e06ea5fcbae228921841a07882f080294c3 (diff)
downloadfocaccia-qemu-c9b423d6d3fde0132ee6f31d69a1c1370a89ce1a.tar.gz
focaccia-qemu-c9b423d6d3fde0132ee6f31d69a1c1370a89ce1a.zip
tests/vm: ubuntu.i386: apt proxy setup
Configure apt proxy so package downloads
can be cached and can pass firewalls.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190617043858.8290-12-kraxel@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
-rwxr-xr-xtests/vm/ubuntu.i3864
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/vm/ubuntu.i386 b/tests/vm/ubuntu.i386
index 3ea459ee20..38f740eabf 100755
--- a/tests/vm/ubuntu.i386
+++ b/tests/vm/ubuntu.i386
@@ -51,6 +51,10 @@ class UbuntuX86VM(basevm.BaseVM):
                           "    ssh-authorized-keys:\n",
                           "    - %s\n" % basevm.SSH_PUB_KEY,
                           "locale: en_US.UTF-8\n"])
+        proxy = os.environ.get("http_proxy")
+        if not proxy is None:
+            udata.writelines(["apt:\n",
+                              "  proxy: %s" % proxy])
         udata.close()
         subprocess.check_call(["genisoimage", "-output", "cloud-init.iso",
                                "-volid", "cidata", "-joliet", "-rock",