diff mbox series

[XEN,2/2] automation: Add qemu to debian:stretch container for smoke test

Message ID 20210930161720.825098-3-anthony.perard@citrix.com (mailing list archive)
State New, archived
Headers show
Series Fixing gitlab CI tests | expand

Commit Message

Anthony PERARD Sept. 30, 2021, 4:17 p.m. UTC
From: Anthony PERARD <anthony.perard@gmail.com>

We can add qemu into the container so that there's no need to install
it everytime we run a test.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---

Also, smoke tests stopped working as of today due to outdated
root certificate, so container needs to be updated anyway.
    fatal: unable to access 'https://xenbits.xen.org/git-http/xtf.git/': server certificate verification failed.

I haven't push the container yet, I've only pushed it as
debian:tmp-stretch for testing it.
---
 automation/build/debian/stretch.dockerfile | 2 ++
 automation/scripts/qemu-smoke-x86-64.sh    | 8 +++++---
 2 files changed, 7 insertions(+), 3 deletions(-)

Comments

Andrew Cooper Sept. 30, 2021, 5:05 p.m. UTC | #1
On 30/09/2021 17:17, Anthony PERARD wrote:
> From: Anthony PERARD <anthony.perard@gmail.com>
>
> We can add qemu into the container so that there's no need to install
> it everytime we run a test.
>
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> ---
>
> Also, smoke tests stopped working as of today due to outdated
> root certificate, so container needs to be updated anyway.
>     fatal: unable to access 'https://xenbits.xen.org/git-http/xtf.git/': server certificate verification failed.
>
> I haven't push the container yet, I've only pushed it as
> debian:tmp-stretch for testing it.
> ---
>  automation/build/debian/stretch.dockerfile | 2 ++
>  automation/scripts/qemu-smoke-x86-64.sh    | 8 +++++---
>  2 files changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/automation/build/debian/stretch.dockerfile b/automation/build/debian/stretch.dockerfile
> index e2ee14e2017c..da6aa874dd70 100644
> --- a/automation/build/debian/stretch.dockerfile
> +++ b/automation/build/debian/stretch.dockerfile
> @@ -47,6 +47,8 @@ RUN apt-get update && \
>          nasm \
>          gnupg \
>          apt-transport-https \
> +        # for test phase, qemu-smoke-* jobs
> +        qemu-system-x86 \
>          && \
>          apt-get autoremove -y && \
>          apt-get clean && \
> diff --git a/automation/scripts/qemu-smoke-x86-64.sh b/automation/scripts/qemu-smoke-x86-64.sh
> index 4b176c508dec..8ac065491c75 100755
> --- a/automation/scripts/qemu-smoke-x86-64.sh
> +++ b/automation/scripts/qemu-smoke-x86-64.sh
> @@ -6,9 +6,11 @@ set -ex
>  variant=$1
>  
>  # Install QEMU
> -export DEBIAN_FRONTENT=noninteractive
> -apt-get -qy update
> -apt-get -qy install qemu-system-x86
> +if ! type qemu-system-x86_64; then
> +    export DEBIAN_FRONTENT=noninteractive
> +    apt-get -qy update
> +    apt-get -qy install qemu-system-x86
> +fi

I'd just delete this all.  It's wrong for running smoke tests in other
containers anyway.

Can fix commit too.

~Andrew

>  
>  # Clone and build XTF
>  git clone https://xenbits.xen.org/git-http/xtf.git
Anthony PERARD Oct. 1, 2021, 8:21 a.m. UTC | #2
On Thu, Sep 30, 2021 at 06:05:44PM +0100, Andrew Cooper wrote:
> On 30/09/2021 17:17, Anthony PERARD wrote:
> > --- a/automation/scripts/qemu-smoke-x86-64.sh
> > +++ b/automation/scripts/qemu-smoke-x86-64.sh
> > @@ -6,9 +6,11 @@ set -ex
> >  variant=$1
> >  
> >  # Install QEMU
> > -export DEBIAN_FRONTENT=noninteractive
> > -apt-get -qy update
> > -apt-get -qy install qemu-system-x86
> > +if ! type qemu-system-x86_64; then
> > +    export DEBIAN_FRONTENT=noninteractive
> > +    apt-get -qy update
> > +    apt-get -qy install qemu-system-x86
> > +fi
> 
> I'd just delete this all.  It's wrong for running smoke tests in other
> containers anyway.
> 
> Can fix commit too.

Sounds good, thanks. In that case, I need to push the updated container
before we commit the patch.

Cheers,
diff mbox series

Patch

diff --git a/automation/build/debian/stretch.dockerfile b/automation/build/debian/stretch.dockerfile
index e2ee14e2017c..da6aa874dd70 100644
--- a/automation/build/debian/stretch.dockerfile
+++ b/automation/build/debian/stretch.dockerfile
@@ -47,6 +47,8 @@  RUN apt-get update && \
         nasm \
         gnupg \
         apt-transport-https \
+        # for test phase, qemu-smoke-* jobs
+        qemu-system-x86 \
         && \
         apt-get autoremove -y && \
         apt-get clean && \
diff --git a/automation/scripts/qemu-smoke-x86-64.sh b/automation/scripts/qemu-smoke-x86-64.sh
index 4b176c508dec..8ac065491c75 100755
--- a/automation/scripts/qemu-smoke-x86-64.sh
+++ b/automation/scripts/qemu-smoke-x86-64.sh
@@ -6,9 +6,11 @@  set -ex
 variant=$1
 
 # Install QEMU
-export DEBIAN_FRONTENT=noninteractive
-apt-get -qy update
-apt-get -qy install qemu-system-x86
+if ! type qemu-system-x86_64; then
+    export DEBIAN_FRONTENT=noninteractive
+    apt-get -qy update
+    apt-get -qy install qemu-system-x86
+fi
 
 # Clone and build XTF
 git clone https://xenbits.xen.org/git-http/xtf.git