From patchwork Tue Mar 17 14:16:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1256439 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=HgFcgX0G; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48hb0f12NQz9sPF for ; Wed, 18 Mar 2020 01:20:02 +1100 (AEDT) Received: from localhost ([::1]:33602 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jED4Z-0006IB-Nl for incoming@patchwork.ozlabs.org; Tue, 17 Mar 2020 10:19:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55960) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jED1t-0001K0-2H for qemu-devel@nongnu.org; Tue, 17 Mar 2020 10:17:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jED1r-0007yC-OU for qemu-devel@nongnu.org; Tue, 17 Mar 2020 10:17:12 -0400 Received: from us-smtp-delivery-74.mimecast.com ([216.205.24.74]:47035) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jED1r-0007vj-K7 for qemu-devel@nongnu.org; Tue, 17 Mar 2020 10:17:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584454631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nVKMcGxmP8PU2vpAgDPmZ12PJSUYbLXimE6E8kXTmQA=; b=HgFcgX0GMoghTF1fBqHH0Zlt9qgzES4sUeAXQMkQC8vgjIArvS3vWxmexhz+Oocp8bCUHy hrMGkwvRoZVMkZepMFHMfsw9JTOe2QQmhdKN/r+SPexoWEimmertHt09gmiZdyqhXeBb4w PGJ4Wqn1GlOEte1i2zqTE5rWOo1Z9Gw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-309-vza3d_XjM72djl1lhwKhaA-1; Tue, 17 Mar 2020 10:17:09 -0400 X-MC-Unique: vza3d_XjM72djl1lhwKhaA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3BDBD1005F6F; Tue, 17 Mar 2020 14:17:08 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-117-2.rdu2.redhat.com [10.10.117.2]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D8EA473873; Tue, 17 Mar 2020 14:17:06 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Subject: [PATCH v10 3/3] Acceptance tests: add make targets to download images Date: Tue, 17 Mar 2020 10:16:54 -0400 Message-Id: <20200317141654.29355-4-crosa@redhat.com> In-Reply-To: <20200317141654.29355-1-crosa@redhat.com> References: <20200317141654.29355-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 216.205.24.74 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Beraldo Leal , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Willian Rampazzo , Willian Rampazzo , Cleber Rosa , =?utf-8?q?Alex_Benn=C3=A9e?= , Eduardo Habkost Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 Reviewed-by: Willian Rampazzo Reviewed-by: Alex Bennée Tested-by: Willian Rampazzo --- tests/Makefile.include | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index 67e8fcddda..9c19229a06 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,20 @@ $(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=$*) + +# 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 +915,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)