All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 1/1] tests/docker: Add a Avocado Docker test
@ 2018-05-18 18:34 Alistair Francis
  2018-05-21  3:16 ` Fam Zheng
  0 siblings, 1 reply; 11+ messages in thread
From: Alistair Francis @ 2018-05-18 18:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: alistair.francis, alex.bennee, f4bug, alistair23, famz

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>
---
v2:
 - Add a seperate fedora-avocado Docker image
 - Move the avocado vt-bootstrap into the Docker file

 tests/docker/Makefile.include                 |  1 +
 .../docker/dockerfiles/fedora-avocado.docker  | 25 +++++++++++++++++
 tests/docker/test-avocado                     | 28 +++++++++++++++++++
 3 files changed, 54 insertions(+)
 create mode 100644 tests/docker/dockerfiles/fedora-avocado.docker
 create mode 100755 tests/docker/test-avocado

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index ef1a3e62eb..0e3d108dde 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -60,6 +60,7 @@ docker-image-debian-ppc64el-cross: docker-image-debian9
 docker-image-debian-s390x-cross: docker-image-debian9
 docker-image-debian-win32-cross: docker-image-debian8-mxe
 docker-image-debian-win64-cross: docker-image-debian8-mxe
+docker-image-fedora-avocado: docker-image-fedora
 docker-image-travis: NOUSER=1
 
 # Expand all the pre-requistes for each docker image and test combination
diff --git a/tests/docker/dockerfiles/fedora-avocado.docker b/tests/docker/dockerfiles/fedora-avocado.docker
new file mode 100644
index 0000000000..55b19eebbf
--- /dev/null
+++ b/tests/docker/dockerfiles/fedora-avocado.docker
@@ -0,0 +1,25 @@
+FROM qemu:fedora
+
+ENV PACKAGES \
+    libvirt-devel \
+    nc \
+    python-avocado \
+    python2-devel python3-devel \
+    qemu-kvm \
+    tcpdump \
+    xz
+ENV PIP_PACKAGES \
+    avocado-qemu \
+    avocado-framework-plugin-runner-remote \
+    avocado-framework-plugin-runner-vm \
+    avocado-framework-plugin-vt
+
+ENV QEMU_CONFIGURE_OPTS --python=/usr/bin/python3
+
+RUN dnf install -y $PACKAGES
+RUN pip install $PIP_PACKAGES
+RUN avocado vt-bootstrap --yes-to-all --vt-type qemu
+
+RUN rpm -q $PACKAGES | sort > /packages.txt
+
+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..40474db2ce
--- /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: NOUSER=1 make docker-test-avocado@fedora-avocado
+
+. 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 run boot --vt-qemu-bin ./x86_64-softmmu/qemu-system-x86_64
-- 
2.17.0

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

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

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-18 18:34 [Qemu-devel] [PATCH v2 1/1] tests/docker: Add a Avocado Docker test Alistair Francis
2018-05-21  3:16 ` Fam Zheng
2018-05-21 17:26   ` Philippe Mathieu-Daudé
2018-05-21 22:37     ` Alistair Francis
2018-05-21 23:29       ` Philippe Mathieu-Daudé
2018-05-21 22:33   ` Alistair Francis
2018-05-21 23:32     ` Philippe Mathieu-Daudé
2018-05-22 19:50       ` Cleber Rosa
2018-05-22 20:14         ` Lucas Meneghel Rodrigues
2018-05-23  9:35           ` Lucas Meneghel Rodrigues
2018-05-23 10:14             ` Cleber Rosa

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.