[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 4/6] Acceptance tests: add make targets to download images
From: |
Cleber Rosa |
Subject: |
[PULL 4/6] Acceptance tests: add make targets to download images |
Date: |
Tue, 17 Mar 2020 20:19:30 -0400 |
The newly introduced "boot linux" tests make use of Linux images that
are larger than usual, and fall into what Avocado calls "vmimages",
and can be referred to by name, version and architecture.
The images can be downloaded automatically during the test. But, to
make for more reliable test results, this introduces a target that
will download the vmimages for the architectures that have been
configured and are available for the currently used distro (Fedora
31).
Signed-off-by: Cleber Rosa <address@hidden>
Reviewed-by: Willian Rampazzo <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
[Cleber: implemented suggestions by Alex, download message, check-venv target]
Message-Id: <address@hidden>
Signed-off-by: Cleber Rosa <address@hidden>
---
tests/Makefile.include | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/tests/Makefile.include b/tests/Makefile.include
index 67e8fcddda..68c5d73d28 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -20,6 +20,8 @@ check-help:
@echo " $(MAKE) check-venv Creates a Python venv for tests"
@echo " $(MAKE) check-clean Clean the tests and related data"
@echo
+ @echo " $(MAKE) get-vm-images Downloads all images used by
acceptance tests, according to configured targets (~350 MB each, 1.5 GB max)"
+ @echo
@echo
@echo "The variable SPEED can be set to control the gtester speed
setting."
@echo "Default options are -k and (for $(MAKE) V=1) --verbose; they can
be"
@@ -889,7 +891,21 @@ $(TESTS_RESULTS_DIR):
check-venv: $(TESTS_VENV_DIR)
-check-acceptance: check-venv $(TESTS_RESULTS_DIR)
+FEDORA_31_ARCHES_CANDIDATES=$(patsubst ppc64,ppc64le,$(TARGETS))
+FEDORA_31_ARCHES := x86_64 aarch64 ppc64le s390x
+FEDORA_31_DOWNLOAD=$(filter $(FEDORA_31_ARCHES),$(FEDORA_31_ARCHES_CANDIDATES))
+
+# download one specific Fedora 31 image
+get-vm-image-fedora-31-%: check-venv
+ $(call quiet-command, \
+ $(TESTS_VENV_DIR)/bin/python -m avocado vmimage get \
+ --distro=fedora --distro-version=31 --arch=$*, \
+ "AVOCADO", "Downloading acceptance tests VM image for $*")
+
+# download all vm images, according to defined targets
+get-vm-images: check-venv $(patsubst %,get-vm-image-fedora-31-%,
$(FEDORA_31_DOWNLOAD))
+
+check-acceptance: check-venv $(TESTS_RESULTS_DIR) get-vm-images
$(call quiet-command, \
$(TESTS_VENV_DIR)/bin/python -m avocado \
--show=$(AVOCADO_SHOW) run --job-results-dir=$(TESTS_RESULTS_DIR) \
@@ -900,7 +916,7 @@ check-acceptance: check-venv $(TESTS_RESULTS_DIR)
# Consolidated targets
-.PHONY: check-block check-qapi-schema check-qtest check-unit check check-clean
+.PHONY: check-block check-qapi-schema check-qtest check-unit check check-clean
get-vm-images
check-qapi-schema: check-tests/qapi-schema/frontend
check-tests/qapi-schema/doc-good.texi
check-qtest: $(patsubst %,check-qtest-%, $(QTEST_TARGETS))
ifeq ($(CONFIG_TOOLS),y)
--
2.25.1
- [PULL 0/6] Python and tests (mostly acceptance) patches 2020-03-17, Cleber Rosa, 2020/03/17
- [PULL 1/6] python/qemu/qmp.py: QMP debug with VM label, Cleber Rosa, 2020/03/17
- [PULL 2/6] Acceptance tests: introduce BUILD_DIR and SOURCE_DIR, Cleber Rosa, 2020/03/17
- [PULL 3/6] Acceptance test: add "boot_linux" tests, Cleber Rosa, 2020/03/17
- [PULL 5/6] tests/docker: add CentOS 8 Dockerfile, Cleber Rosa, 2020/03/17
- [PULL 4/6] Acceptance tests: add make targets to download images,
Cleber Rosa <=
- [PULL 6/6] tests/docker: make "buildah bud" output similar to "docker build", Cleber Rosa, 2020/03/17
- Re: [PULL 0/6] Python and tests (mostly acceptance) patches 2020-03-17, Peter Maydell, 2020/03/19