All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v1 1/1] tests/docker: Add a Avocado Docker test
@ 2018-05-07 20:09 Alistair Francis
  2018-05-07 22:44 ` Philippe Mathieu-Daudé
  2018-05-09  5:57 ` Fam Zheng
  0 siblings, 2 replies; 8+ messages in thread
From: Alistair Francis @ 2018-05-07 20:09 UTC (permalink / raw)
  To: qemu-devel; +Cc: alex.bennee, famz, f4bug, alistair23, alistair.francis

Avocado is not trivial to setup on non-Fedora systems. To simplfying
future testing add a docker test image that runs Avocado tests.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
---
 tests/docker/dockerfiles/fedora.docker | 12 +++++++++--
 tests/docker/test-avocado              | 28 ++++++++++++++++++++++++++
 2 files changed, 38 insertions(+), 2 deletions(-)
 create mode 100755 tests/docker/test-avocado

diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker
index b706f42405..5c23f6e459 100644
--- a/tests/docker/dockerfiles/fedora.docker
+++ b/tests/docker/dockerfiles/fedora.docker
@@ -18,9 +18,17 @@ ENV PACKAGES \
     mingw64-pixman mingw64-glib2 mingw64-gmp mingw64-SDL mingw64-pkg-config \
     mingw64-gtk2 mingw64-gtk3 mingw64-gnutls mingw64-nettle mingw64-libtasn1 \
     mingw64-libjpeg-turbo mingw64-libpng mingw64-curl mingw64-libssh2 \
-    mingw64-bzip2
+    mingw64-bzip2 \
+    xz tcpdump nc \
+    python2-devel python3-devel python-avocado \
+    libvirt-devel qemu-kvm
 ENV QEMU_CONFIGURE_OPTS --python=/usr/bin/python3
+ENV PIP_PACKAGES \
+    avocado-framework avocado-qemu \
+    avocado-framework-plugin-vt avocado-framework-plugin-runner-vm \
+    avocado-framework-plugin-runner-remote avocado-framework-plugin-result-html
 
 RUN dnf install -y $PACKAGES
+RUN pip install $PIP_PACKAGES
 RUN rpm -q $PACKAGES | sort > /packages.txt
-ENV FEATURES mingw clang pyyaml asan
+ENV FEATURES mingw clang pyyaml asan avocado
diff --git a/tests/docker/test-avocado b/tests/docker/test-avocado
new file mode 100755
index 0000000000..8da7bc10a2
--- /dev/null
+++ b/tests/docker/test-avocado
@@ -0,0 +1,28 @@
+#!/bin/bash -e
+#
+# Avocado tests on Fedora, as these are a real pain on Debian systems
+#
+# Copyright (c) 2018 Western Digital.
+#
+# Authors:
+#  Alistair Francis <alistair.francis@wdc.com>
+#
+# This work is licensed under the terms of the GNU GPL, version 2
+# or (at your option) any later version. See the COPYING file in
+# the top-level directory.
+#
+# Run this test: NETWORK=1 make docker-test-avocado@fedora
+
+. common.rc
+
+requires avocado
+
+cd "$BUILD_DIR"
+
+DEF_TARGET_LIST="x86_64-softmmu"
+TARGET_LIST=${TARGET_LIST:-$DEF_TARGET_LIST} \
+build_qemu
+install_qemu
+export PATH="${PATH}:$(pwd)"
+avocado vt-bootstrap --yes-to-all --vt-type qemu
+avocado run boot --vt-qemu-bin ./x86_64-softmmu/qemu-system-x86_64
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH v1 1/1] tests/docker: Add a Avocado Docker test
  2018-05-07 20:09 [Qemu-devel] [PATCH v1 1/1] tests/docker: Add a Avocado Docker test Alistair Francis
@ 2018-05-07 22:44 ` Philippe Mathieu-Daudé
  2018-05-08  0:02   ` Philippe Mathieu-Daudé
  2018-05-09  5:57 ` Fam Zheng
  1 sibling, 1 reply; 8+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-05-07 22:44 UTC (permalink / raw)
  To: Alistair Francis, qemu-devel; +Cc: famz, alex.bennee, alistair23

Hi Alistair,

On 05/07/2018 05:09 PM, Alistair Francis wrote:
> Avocado is not trivial to setup on non-Fedora systems. To simplfying
> future testing add a docker test image that runs Avocado tests.

How big is the image with the new packages?

If not everybody is interested in using Avocado and Python 3 as default.
You might use the fedora as a base image for a 'fedora-avocado' one via
'FROM qemu:fedora' and adding a 'docker-image-fedora-avocado:
docker-image-fedora' dependency in Makefile.include.

> 
> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> ---
>  tests/docker/dockerfiles/fedora.docker | 12 +++++++++--
>  tests/docker/test-avocado              | 28 ++++++++++++++++++++++++++
>  2 files changed, 38 insertions(+), 2 deletions(-)
>  create mode 100755 tests/docker/test-avocado
> 
> diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker
> index b706f42405..5c23f6e459 100644
> --- a/tests/docker/dockerfiles/fedora.docker
> +++ b/tests/docker/dockerfiles/fedora.docker
> @@ -18,9 +18,17 @@ ENV PACKAGES \
>      mingw64-pixman mingw64-glib2 mingw64-gmp mingw64-SDL mingw64-pkg-config \
>      mingw64-gtk2 mingw64-gtk3 mingw64-gnutls mingw64-nettle mingw64-libtasn1 \
>      mingw64-libjpeg-turbo mingw64-libpng mingw64-curl mingw64-libssh2 \
> -    mingw64-bzip2
> +    mingw64-bzip2 \
> +    xz tcpdump nc \
> +    python2-devel python3-devel python-avocado \
> +    libvirt-devel qemu-kvm

I'd personally prefer a commit that sort this list alphabetically (one
package per line), and another commit only adding the Avocado packages;
but this is up to Fam.

>  ENV QEMU_CONFIGURE_OPTS --python=/usr/bin/python3
> +ENV PIP_PACKAGES \
> +    avocado-framework avocado-qemu \
> +    avocado-framework-plugin-vt avocado-framework-plugin-runner-vm \
> +    avocado-framework-plugin-runner-remote avocado-framework-plugin-result-html

Ditto, alphabetically sorted one per line.

>  
>  RUN dnf install -y $PACKAGES
> +RUN pip install $PIP_PACKAGES
>  RUN rpm -q $PACKAGES | sort > /packages.txt
> -ENV FEATURES mingw clang pyyaml asan
> +ENV FEATURES mingw clang pyyaml asan avocado
> diff --git a/tests/docker/test-avocado b/tests/docker/test-avocado
> new file mode 100755
> index 0000000000..8da7bc10a2
> --- /dev/null
> +++ b/tests/docker/test-avocado
> @@ -0,0 +1,28 @@
> +#!/bin/bash -e
> +#
> +# Avocado tests on Fedora, as these are a real pain on Debian systems

Have been here... Then used the git version :/

> +#
> +# Copyright (c) 2018 Western Digital.
> +#
> +# Authors:
> +#  Alistair Francis <alistair.francis@wdc.com>
> +#
> +# This work is licensed under the terms of the GNU GPL, version 2
> +# or (at your option) any later version. See the COPYING file in
> +# the top-level directory.
> +#
> +# Run this test: NETWORK=1 make docker-test-avocado@fedora
> +
> +. common.rc
> +
> +requires avocado
> +
> +cd "$BUILD_DIR"
> +
> +DEF_TARGET_LIST="x86_64-softmmu"
> +TARGET_LIST=${TARGET_LIST:-$DEF_TARGET_LIST} \
> +build_qemu
> +install_qemu
> +export PATH="${PATH}:$(pwd)"
> +avocado vt-bootstrap --yes-to-all --vt-type qemu
> +avocado run boot --vt-qemu-bin ./x86_64-softmmu/qemu-system-x86_64

So this script is for the VT version, specific to x86. I'd rather name
the script accordingly "test-avocado-vt".

Regards,

Phil.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH v1 1/1] tests/docker: Add a Avocado Docker test
  2018-05-07 22:44 ` Philippe Mathieu-Daudé
@ 2018-05-08  0:02   ` Philippe Mathieu-Daudé
  2018-05-08 15:49     ` Philippe Mathieu-Daudé
  2018-05-10 21:00     ` Alistair Francis
  0 siblings, 2 replies; 8+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-05-08  0:02 UTC (permalink / raw)
  To: Alistair Francis, qemu-devel; +Cc: famz, alex.bennee, alistair23

On 05/07/2018 07:44 PM, Philippe Mathieu-Daudé wrote:
> Hi Alistair,
> 
> On 05/07/2018 05:09 PM, Alistair Francis wrote:
>> Avocado is not trivial to setup on non-Fedora systems. To simplfying
>> future testing add a docker test image that runs Avocado tests.
> 
> How big is the image with the new packages?

Before: 1.7GB
After: 2.18GB

> 
> If not everybody is interested in using Avocado and Python 3 as default.
> You might use the fedora as a base image for a 'fedora-avocado' one via
> 'FROM qemu:fedora' and adding a 'docker-image-fedora-avocado:
> docker-image-fedora' dependency in Makefile.include.
> 
>>
>> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
>> ---
>>  tests/docker/dockerfiles/fedora.docker | 12 +++++++++--
>>  tests/docker/test-avocado              | 28 ++++++++++++++++++++++++++
>>  2 files changed, 38 insertions(+), 2 deletions(-)
>>  create mode 100755 tests/docker/test-avocado
>>
>> diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker
>> index b706f42405..5c23f6e459 100644
>> --- a/tests/docker/dockerfiles/fedora.docker
>> +++ b/tests/docker/dockerfiles/fedora.docker
>> @@ -18,9 +18,17 @@ ENV PACKAGES \
>>      mingw64-pixman mingw64-glib2 mingw64-gmp mingw64-SDL mingw64-pkg-config \
>>      mingw64-gtk2 mingw64-gtk3 mingw64-gnutls mingw64-nettle mingw64-libtasn1 \
>>      mingw64-libjpeg-turbo mingw64-libpng mingw64-curl mingw64-libssh2 \
>> -    mingw64-bzip2
>> +    mingw64-bzip2 \
>> +    xz tcpdump nc \
>> +    python2-devel python3-devel python-avocado \
>> +    libvirt-devel qemu-kvm
> 
> I'd personally prefer a commit that sort this list alphabetically (one
> package per line), and another commit only adding the Avocado packages;
> but this is up to Fam.
> 
>>  ENV QEMU_CONFIGURE_OPTS --python=/usr/bin/python3
>> +ENV PIP_PACKAGES \
>> +    avocado-framework avocado-qemu \
>> +    avocado-framework-plugin-vt avocado-framework-plugin-runner-vm \
>> +    avocado-framework-plugin-runner-remote avocado-framework-plugin-result-html
> 
> Ditto, alphabetically sorted one per line.
> 
>>  
>>  RUN dnf install -y $PACKAGES
>> +RUN pip install $PIP_PACKAGES
>>  RUN rpm -q $PACKAGES | sort > /packages.txt
>> -ENV FEATURES mingw clang pyyaml asan
>> +ENV FEATURES mingw clang pyyaml asan avocado
>> diff --git a/tests/docker/test-avocado b/tests/docker/test-avocado
>> new file mode 100755
>> index 0000000000..8da7bc10a2
>> --- /dev/null
>> +++ b/tests/docker/test-avocado
>> @@ -0,0 +1,28 @@
>> +#!/bin/bash -e
>> +#
>> +# Avocado tests on Fedora, as these are a real pain on Debian systems
> 
> Have been here... Then used the git version :/
> 
>> +#
>> +# Copyright (c) 2018 Western Digital.
>> +#
>> +# Authors:
>> +#  Alistair Francis <alistair.francis@wdc.com>
>> +#
>> +# This work is licensed under the terms of the GNU GPL, version 2
>> +# or (at your option) any later version. See the COPYING file in
>> +# the top-level directory.
>> +#
>> +# Run this test: NETWORK=1 make docker-test-avocado@fedora
>> +
>> +. common.rc
>> +
>> +requires avocado
>> +
>> +cd "$BUILD_DIR"
>> +
>> +DEF_TARGET_LIST="x86_64-softmmu"
>> +TARGET_LIST=${TARGET_LIST:-$DEF_TARGET_LIST} \
>> +build_qemu
>> +install_qemu
>> +export PATH="${PATH}:$(pwd)"
>> +avocado vt-bootstrap --yes-to-all --vt-type qemu

Can we do the bootstrapping in the Dockerfile?

Testing your image it download big files (i.e. JeOS image) in my
~avocado/data/avocado-vt/images which is internal to the volatile docker
instance, so I have to download again each time I run the tests...

We need to pass this cache path to the docker instance.
For example the vm-test use ~/.cache/qemu-vm/download.

>> +avocado run boot --vt-qemu-bin ./x86_64-softmmu/qemu-system-x86_64
> 
> So this script is for the VT version, specific to x86. I'd rather name
> the script accordingly "test-avocado-vt".
> 
> Regards,
> 
> Phil.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH v1 1/1] tests/docker: Add a Avocado Docker test
  2018-05-08  0:02   ` Philippe Mathieu-Daudé
@ 2018-05-08 15:49     ` Philippe Mathieu-Daudé
  2018-05-10 21:01       ` Alistair Francis
  2018-05-10 21:00     ` Alistair Francis
  1 sibling, 1 reply; 8+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-05-08 15:49 UTC (permalink / raw)
  To: Alistair Francis, qemu-devel; +Cc: famz, alex.bennee, alistair23

Hi Alistair,

On 05/07/2018 09:02 PM, Philippe Mathieu-Daudé wrote:
>> On 05/07/2018 05:09 PM, Alistair Francis wrote:
[...]>>> +++ b/tests/docker/test-avocado
>>> @@ -0,0 +1,28 @@
>>> +#!/bin/bash -e
>>> +#
>>> +# Avocado tests on Fedora, as these are a real pain on Debian systems
>>
>> Have been here... Then used the git version :/
>>
>>> +#
>>> +# Copyright (c) 2018 Western Digital.
>>> +#
>>> +# Authors:
>>> +#  Alistair Francis <alistair.francis@wdc.com>
>>> +#
>>> +# This work is licensed under the terms of the GNU GPL, version 2
>>> +# or (at your option) any later version. See the COPYING file in
>>> +# the top-level directory.
>>> +#
>>> +# Run this test: NETWORK=1 make docker-test-avocado@fedora
>>> +
>>> +. common.rc
>>> +
>>> +requires avocado
>>> +
>>> +cd "$BUILD_DIR"
>>> +
>>> +DEF_TARGET_LIST="x86_64-softmmu"
>>> +TARGET_LIST=${TARGET_LIST:-$DEF_TARGET_LIST} \
>>> +build_qemu
>>> +install_qemu
>>> +export PATH="${PATH}:$(pwd)"
>>> +avocado vt-bootstrap --yes-to-all --vt-type qemu
> 
> Can we do the bootstrapping in the Dockerfile?
> 
> Testing your image it download big files (i.e. JeOS image) in my
> ~avocado/data/avocado-vt/images which is internal to the volatile docker
> instance, so I have to download again each time I run the tests...

Do we need this JeOS image?

http://avocado-vt.readthedocs.io/en/latest/DownloadableImages.html#jeos-image

> 
> We need to pass this cache path to the docker instance.
> For example the vm-test use ~/.cache/qemu-vm/download.
> 
>>> +avocado run boot --vt-qemu-bin ./x86_64-softmmu/qemu-system-x86_64
>>
>> So this script is for the VT version, specific to x86. I'd rather name
>> the script accordingly "test-avocado-vt".

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH v1 1/1] tests/docker: Add a Avocado Docker test
  2018-05-07 20:09 [Qemu-devel] [PATCH v1 1/1] tests/docker: Add a Avocado Docker test Alistair Francis
  2018-05-07 22:44 ` Philippe Mathieu-Daudé
@ 2018-05-09  5:57 ` Fam Zheng
  2018-05-10 21:01   ` Alistair Francis
  1 sibling, 1 reply; 8+ messages in thread
From: Fam Zheng @ 2018-05-09  5:57 UTC (permalink / raw)
  To: Alistair Francis; +Cc: qemu-devel, alex.bennee, f4bug, alistair23

On Mon, 05/07 13:09, Alistair Francis wrote:
> Avocado is not trivial to setup on non-Fedora systems. To simplfying
> future testing add a docker test image that runs Avocado tests.
> 
> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> ---
>  tests/docker/dockerfiles/fedora.docker | 12 +++++++++--
>  tests/docker/test-avocado              | 28 ++++++++++++++++++++++++++
>  2 files changed, 38 insertions(+), 2 deletions(-)
>  create mode 100755 tests/docker/test-avocado
> 
> diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker
> index b706f42405..5c23f6e459 100644
> --- a/tests/docker/dockerfiles/fedora.docker
> +++ b/tests/docker/dockerfiles/fedora.docker
> @@ -18,9 +18,17 @@ ENV PACKAGES \
>      mingw64-pixman mingw64-glib2 mingw64-gmp mingw64-SDL mingw64-pkg-config \
>      mingw64-gtk2 mingw64-gtk3 mingw64-gnutls mingw64-nettle mingw64-libtasn1 \
>      mingw64-libjpeg-turbo mingw64-libpng mingw64-curl mingw64-libssh2 \
> -    mingw64-bzip2
> +    mingw64-bzip2 \
> +    xz tcpdump nc \
> +    python2-devel python3-devel python-avocado \
> +    libvirt-devel qemu-kvm
>  ENV QEMU_CONFIGURE_OPTS --python=/usr/bin/python3
> +ENV PIP_PACKAGES \
> +    avocado-framework avocado-qemu \

I think python-avacado overlaps with pip avacado-framework. Why are both needed?

Fam

> +    avocado-framework-plugin-vt avocado-framework-plugin-runner-vm \
> +    avocado-framework-plugin-runner-remote avocado-framework-plugin-result-html
>  
>  RUN dnf install -y $PACKAGES
> +RUN pip install $PIP_PACKAGES
>  RUN rpm -q $PACKAGES | sort > /packages.txt
> -ENV FEATURES mingw clang pyyaml asan
> +ENV FEATURES mingw clang pyyaml asan avocado
> diff --git a/tests/docker/test-avocado b/tests/docker/test-avocado
> new file mode 100755
> index 0000000000..8da7bc10a2
> --- /dev/null
> +++ b/tests/docker/test-avocado
> @@ -0,0 +1,28 @@
> +#!/bin/bash -e
> +#
> +# Avocado tests on Fedora, as these are a real pain on Debian systems
> +#
> +# Copyright (c) 2018 Western Digital.
> +#
> +# Authors:
> +#  Alistair Francis <alistair.francis@wdc.com>
> +#
> +# This work is licensed under the terms of the GNU GPL, version 2
> +# or (at your option) any later version. See the COPYING file in
> +# the top-level directory.
> +#
> +# Run this test: NETWORK=1 make docker-test-avocado@fedora
> +
> +. common.rc
> +
> +requires avocado
> +
> +cd "$BUILD_DIR"
> +
> +DEF_TARGET_LIST="x86_64-softmmu"
> +TARGET_LIST=${TARGET_LIST:-$DEF_TARGET_LIST} \
> +build_qemu
> +install_qemu
> +export PATH="${PATH}:$(pwd)"
> +avocado vt-bootstrap --yes-to-all --vt-type qemu
> +avocado run boot --vt-qemu-bin ./x86_64-softmmu/qemu-system-x86_64
> -- 
> 2.17.0
> 
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH v1 1/1] tests/docker: Add a Avocado Docker test
  2018-05-08  0:02   ` Philippe Mathieu-Daudé
  2018-05-08 15:49     ` Philippe Mathieu-Daudé
@ 2018-05-10 21:00     ` Alistair Francis
  1 sibling, 0 replies; 8+ messages in thread
From: Alistair Francis @ 2018-05-10 21:00 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Alistair Francis, qemu-devel@nongnu.org Developers, Fam Zheng,
	Alex Bennée

On Mon, May 7, 2018 at 5:02 PM, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> On 05/07/2018 07:44 PM, Philippe Mathieu-Daudé wrote:
>> Hi Alistair,
>>
>> On 05/07/2018 05:09 PM, Alistair Francis wrote:
>>> Avocado is not trivial to setup on non-Fedora systems. To simplfying
>>> future testing add a docker test image that runs Avocado tests.
>>
>> How big is the image with the new packages?
>
> Before: 1.7GB
> After: 2.18GB
>
>>
>> If not everybody is interested in using Avocado and Python 3 as default.
>> You might use the fedora as a base image for a 'fedora-avocado' one via
>> 'FROM qemu:fedora' and adding a 'docker-image-fedora-avocado:
>> docker-image-fedora' dependency in Makefile.include.

Ok, will do in v2.

>>
>>>
>>> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
>>> ---
>>>  tests/docker/dockerfiles/fedora.docker | 12 +++++++++--
>>>  tests/docker/test-avocado              | 28 ++++++++++++++++++++++++++
>>>  2 files changed, 38 insertions(+), 2 deletions(-)
>>>  create mode 100755 tests/docker/test-avocado
>>>
>>> diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker
>>> index b706f42405..5c23f6e459 100644
>>> --- a/tests/docker/dockerfiles/fedora.docker
>>> +++ b/tests/docker/dockerfiles/fedora.docker
>>> @@ -18,9 +18,17 @@ ENV PACKAGES \
>>>      mingw64-pixman mingw64-glib2 mingw64-gmp mingw64-SDL mingw64-pkg-config \
>>>      mingw64-gtk2 mingw64-gtk3 mingw64-gnutls mingw64-nettle mingw64-libtasn1 \
>>>      mingw64-libjpeg-turbo mingw64-libpng mingw64-curl mingw64-libssh2 \
>>> -    mingw64-bzip2
>>> +    mingw64-bzip2 \
>>> +    xz tcpdump nc \
>>> +    python2-devel python3-devel python-avocado \
>>> +    libvirt-devel qemu-kvm
>>
>> I'd personally prefer a commit that sort this list alphabetically (one
>> package per line), and another commit only adding the Avocado packages;
>> but this is up to Fam.

Will fix in v2 as well.

>>
>>>  ENV QEMU_CONFIGURE_OPTS --python=/usr/bin/python3
>>> +ENV PIP_PACKAGES \
>>> +    avocado-framework avocado-qemu \
>>> +    avocado-framework-plugin-vt avocado-framework-plugin-runner-vm \
>>> +    avocado-framework-plugin-runner-remote avocado-framework-plugin-result-html
>>
>> Ditto, alphabetically sorted one per line.
>>
>>>
>>>  RUN dnf install -y $PACKAGES
>>> +RUN pip install $PIP_PACKAGES
>>>  RUN rpm -q $PACKAGES | sort > /packages.txt
>>> -ENV FEATURES mingw clang pyyaml asan
>>> +ENV FEATURES mingw clang pyyaml asan avocado
>>> diff --git a/tests/docker/test-avocado b/tests/docker/test-avocado
>>> new file mode 100755
>>> index 0000000000..8da7bc10a2
>>> --- /dev/null
>>> +++ b/tests/docker/test-avocado
>>> @@ -0,0 +1,28 @@
>>> +#!/bin/bash -e
>>> +#
>>> +# Avocado tests on Fedora, as these are a real pain on Debian systems
>>
>> Have been here... Then used the git version :/
>>
>>> +#
>>> +# Copyright (c) 2018 Western Digital.
>>> +#
>>> +# Authors:
>>> +#  Alistair Francis <alistair.francis@wdc.com>
>>> +#
>>> +# This work is licensed under the terms of the GNU GPL, version 2
>>> +# or (at your option) any later version. See the COPYING file in
>>> +# the top-level directory.
>>> +#
>>> +# Run this test: NETWORK=1 make docker-test-avocado@fedora
>>> +
>>> +. common.rc
>>> +
>>> +requires avocado
>>> +
>>> +cd "$BUILD_DIR"
>>> +
>>> +DEF_TARGET_LIST="x86_64-softmmu"
>>> +TARGET_LIST=${TARGET_LIST:-$DEF_TARGET_LIST} \
>>> +build_qemu
>>> +install_qemu
>>> +export PATH="${PATH}:$(pwd)"
>>> +avocado vt-bootstrap --yes-to-all --vt-type qemu
>
> Can we do the bootstrapping in the Dockerfile?

We can, but it only works if you run the test with NOUSER=1 set. Is
this acceptable?

>
> Testing your image it download big files (i.e. JeOS image) in my
> ~avocado/data/avocado-vt/images which is internal to the volatile docker
> instance, so I have to download again each time I run the tests...
>
> We need to pass this cache path to the docker instance.
> For example the vm-test use ~/.cache/qemu-vm/download.

Is this still required if it's moved into the Dockerfile?

>
>>> +avocado run boot --vt-qemu-bin ./x86_64-softmmu/qemu-system-x86_64
>>
>> So this script is for the VT version, specific to x86. I'd rather name
>> the script accordingly "test-avocado-vt".

It doesn't have to be. Ideally this will run all the Avocado tests.
It's the only test I could find on the wiki at the moment.

Alistair

>>
>> Regards,
>>
>> Phil.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH v1 1/1] tests/docker: Add a Avocado Docker test
  2018-05-08 15:49     ` Philippe Mathieu-Daudé
@ 2018-05-10 21:01       ` Alistair Francis
  0 siblings, 0 replies; 8+ messages in thread
From: Alistair Francis @ 2018-05-10 21:01 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Alistair Francis, qemu-devel@nongnu.org Developers, Fam Zheng,
	Alex Bennée

On Tue, May 8, 2018 at 8:49 AM, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> Hi Alistair,
>
> On 05/07/2018 09:02 PM, Philippe Mathieu-Daudé wrote:
>>> On 05/07/2018 05:09 PM, Alistair Francis wrote:
> [...]>>> +++ b/tests/docker/test-avocado
>>>> @@ -0,0 +1,28 @@
>>>> +#!/bin/bash -e
>>>> +#
>>>> +# Avocado tests on Fedora, as these are a real pain on Debian systems
>>>
>>> Have been here... Then used the git version :/
>>>
>>>> +#
>>>> +# Copyright (c) 2018 Western Digital.
>>>> +#
>>>> +# Authors:
>>>> +#  Alistair Francis <alistair.francis@wdc.com>
>>>> +#
>>>> +# This work is licensed under the terms of the GNU GPL, version 2
>>>> +# or (at your option) any later version. See the COPYING file in
>>>> +# the top-level directory.
>>>> +#
>>>> +# Run this test: NETWORK=1 make docker-test-avocado@fedora
>>>> +
>>>> +. common.rc
>>>> +
>>>> +requires avocado
>>>> +
>>>> +cd "$BUILD_DIR"
>>>> +
>>>> +DEF_TARGET_LIST="x86_64-softmmu"
>>>> +TARGET_LIST=${TARGET_LIST:-$DEF_TARGET_LIST} \
>>>> +build_qemu
>>>> +install_qemu
>>>> +export PATH="${PATH}:$(pwd)"
>>>> +avocado vt-bootstrap --yes-to-all --vt-type qemu
>>
>> Can we do the bootstrapping in the Dockerfile?
>>
>> Testing your image it download big files (i.e. JeOS image) in my
>> ~avocado/data/avocado-vt/images which is internal to the volatile docker
>> instance, so I have to download again each time I run the tests...
>
> Do we need this JeOS image?
>
> http://avocado-vt.readthedocs.io/en/latest/DownloadableImages.html#jeos-image

I think that is the one that is pulled in.

Alistair

>
>>
>> We need to pass this cache path to the docker instance.
>> For example the vm-test use ~/.cache/qemu-vm/download.
>>
>>>> +avocado run boot --vt-qemu-bin ./x86_64-softmmu/qemu-system-x86_64
>>>
>>> So this script is for the VT version, specific to x86. I'd rather name
>>> the script accordingly "test-avocado-vt".
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH v1 1/1] tests/docker: Add a Avocado Docker test
  2018-05-09  5:57 ` Fam Zheng
@ 2018-05-10 21:01   ` Alistair Francis
  0 siblings, 0 replies; 8+ messages in thread
From: Alistair Francis @ 2018-05-10 21:01 UTC (permalink / raw)
  To: Fam Zheng
  Cc: Alistair Francis, qemu-devel@nongnu.org Developers,
	Alex Bennée, Philippe Mathieu-Daudé

On Tue, May 8, 2018 at 10:57 PM, Fam Zheng <famz@redhat.com> wrote:
> On Mon, 05/07 13:09, Alistair Francis wrote:
>> Avocado is not trivial to setup on non-Fedora systems. To simplfying
>> future testing add a docker test image that runs Avocado tests.
>>
>> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
>> ---
>>  tests/docker/dockerfiles/fedora.docker | 12 +++++++++--
>>  tests/docker/test-avocado              | 28 ++++++++++++++++++++++++++
>>  2 files changed, 38 insertions(+), 2 deletions(-)
>>  create mode 100755 tests/docker/test-avocado
>>
>> diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker
>> index b706f42405..5c23f6e459 100644
>> --- a/tests/docker/dockerfiles/fedora.docker
>> +++ b/tests/docker/dockerfiles/fedora.docker
>> @@ -18,9 +18,17 @@ ENV PACKAGES \
>>      mingw64-pixman mingw64-glib2 mingw64-gmp mingw64-SDL mingw64-pkg-config \
>>      mingw64-gtk2 mingw64-gtk3 mingw64-gnutls mingw64-nettle mingw64-libtasn1 \
>>      mingw64-libjpeg-turbo mingw64-libpng mingw64-curl mingw64-libssh2 \
>> -    mingw64-bzip2
>> +    mingw64-bzip2 \
>> +    xz tcpdump nc \
>> +    python2-devel python3-devel python-avocado \
>> +    libvirt-devel qemu-kvm
>>  ENV QEMU_CONFIGURE_OPTS --python=/usr/bin/python3
>> +ENV PIP_PACKAGES \
>> +    avocado-framework avocado-qemu \
>
> I think python-avacado overlaps with pip avacado-framework. Why are both needed?

They aren't, fixed in v2.

Alistair

>
> Fam
>
>> +    avocado-framework-plugin-vt avocado-framework-plugin-runner-vm \
>> +    avocado-framework-plugin-runner-remote avocado-framework-plugin-result-html
>>
>>  RUN dnf install -y $PACKAGES
>> +RUN pip install $PIP_PACKAGES
>>  RUN rpm -q $PACKAGES | sort > /packages.txt
>> -ENV FEATURES mingw clang pyyaml asan
>> +ENV FEATURES mingw clang pyyaml asan avocado
>> diff --git a/tests/docker/test-avocado b/tests/docker/test-avocado
>> new file mode 100755
>> index 0000000000..8da7bc10a2
>> --- /dev/null
>> +++ b/tests/docker/test-avocado
>> @@ -0,0 +1,28 @@
>> +#!/bin/bash -e
>> +#
>> +# Avocado tests on Fedora, as these are a real pain on Debian systems
>> +#
>> +# Copyright (c) 2018 Western Digital.
>> +#
>> +# Authors:
>> +#  Alistair Francis <alistair.francis@wdc.com>
>> +#
>> +# This work is licensed under the terms of the GNU GPL, version 2
>> +# or (at your option) any later version. See the COPYING file in
>> +# the top-level directory.
>> +#
>> +# Run this test: NETWORK=1 make docker-test-avocado@fedora
>> +
>> +. common.rc
>> +
>> +requires avocado
>> +
>> +cd "$BUILD_DIR"
>> +
>> +DEF_TARGET_LIST="x86_64-softmmu"
>> +TARGET_LIST=${TARGET_LIST:-$DEF_TARGET_LIST} \
>> +build_qemu
>> +install_qemu
>> +export PATH="${PATH}:$(pwd)"
>> +avocado vt-bootstrap --yes-to-all --vt-type qemu
>> +avocado run boot --vt-qemu-bin ./x86_64-softmmu/qemu-system-x86_64
>> --
>> 2.17.0
>>
>>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-05-10 21:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-07 20:09 [Qemu-devel] [PATCH v1 1/1] tests/docker: Add a Avocado Docker test Alistair Francis
2018-05-07 22:44 ` Philippe Mathieu-Daudé
2018-05-08  0:02   ` Philippe Mathieu-Daudé
2018-05-08 15:49     ` Philippe Mathieu-Daudé
2018-05-10 21:01       ` Alistair Francis
2018-05-10 21:00     ` Alistair Francis
2018-05-09  5:57 ` Fam Zheng
2018-05-10 21:01   ` Alistair Francis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.