diff mbox series

[v1,03/17] tests/vm: pin ubuntu.i386 image

Message ID 20190619194021.8240-4-alex.bennee@linaro.org
State Superseded
Headers show
Series testing/next (Travis fixes, more tests/vm) | expand

Commit Message

Alex Bennée June 19, 2019, 7:40 p.m. UTC
From: Cleber Rosa <crosa@redhat.com>


It's a good practice to always have the same components used in tests.
According to:

   https://cloud-images.ubuntu.com/releases/16.04/

New images are released from time to time, and the "release/"
directory points to the latest release.  Let's pin to the latest
available version, and while at it, set a hash for verification.

Signed-off-by: Cleber Rosa <crosa@redhat.com>

Message-Id: <20190613130718.3763-4-crosa@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

---
 tests/vm/ubuntu.i386 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

-- 
2.20.1

Comments

Philippe Mathieu-Daudé June 20, 2019, 10:31 a.m. UTC | #1
On 6/19/19 9:40 PM, Alex Bennée wrote:
> From: Cleber Rosa <crosa@redhat.com>

> 

> It's a good practice to always have the same components used in tests.

> According to:

> 

>    https://cloud-images.ubuntu.com/releases/16.04/

> 

> New images are released from time to time, and the "release/"

> directory points to the latest release.  Let's pin to the latest

> available version, and while at it, set a hash for verification.

> 

> Signed-off-by: Cleber Rosa <crosa@redhat.com>


Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>


> Message-Id: <20190613130718.3763-4-crosa@redhat.com>

> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

> ---

>  tests/vm/ubuntu.i386 | 4 +++-

>  1 file changed, 3 insertions(+), 1 deletion(-)

> 

> diff --git a/tests/vm/ubuntu.i386 b/tests/vm/ubuntu.i386

> index 12867b193f..7017e6d388 100755

> --- a/tests/vm/ubuntu.i386

> +++ b/tests/vm/ubuntu.i386

> @@ -61,7 +61,9 @@ class UbuntuX86VM(basevm.BaseVM):

>          return os.path.join(cidir, "cloud-init.iso")

>  

>      def build_image(self, img):

> -        cimg = self._download_with_cache("https://cloud-images.ubuntu.com/releases/16.04/release/ubuntu-16.04-server-cloudimg-i386-disk1.img")

> +        cimg = self._download_with_cache(

> +            "https://cloud-images.ubuntu.com/releases/16.04/release-20190605/ubuntu-16.04-server-cloudimg-i386-disk1.img",

> +            sha256sum="e30091144c73483822b7c27193e9d47346dd1064229da577c3fedcf943f7cfcc")

>          img_tmp = img + ".tmp"

>          subprocess.check_call(["cp", "-f", cimg, img_tmp])

>          subprocess.check_call(["qemu-img", "resize", img_tmp, "50G"])

>
diff mbox series

Patch

diff --git a/tests/vm/ubuntu.i386 b/tests/vm/ubuntu.i386
index 12867b193f..7017e6d388 100755
--- a/tests/vm/ubuntu.i386
+++ b/tests/vm/ubuntu.i386
@@ -61,7 +61,9 @@  class UbuntuX86VM(basevm.BaseVM):
         return os.path.join(cidir, "cloud-init.iso")
 
     def build_image(self, img):
-        cimg = self._download_with_cache("https://cloud-images.ubuntu.com/releases/16.04/release/ubuntu-16.04-server-cloudimg-i386-disk1.img")
+        cimg = self._download_with_cache(
+            "https://cloud-images.ubuntu.com/releases/16.04/release-20190605/ubuntu-16.04-server-cloudimg-i386-disk1.img",
+            sha256sum="e30091144c73483822b7c27193e9d47346dd1064229da577c3fedcf943f7cfcc")
         img_tmp = img + ".tmp"
         subprocess.check_call(["cp", "-f", cimg, img_tmp])
         subprocess.check_call(["qemu-img", "resize", img_tmp, "50G"])