From patchwork Sat Feb 2 00:55:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 10793927 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5197F17E9 for ; Sat, 2 Feb 2019 01:08:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 41ED932FA2 for ; Sat, 2 Feb 2019 01:08:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 357BD32FA8; Sat, 2 Feb 2019 01:08:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id ACFE532FA2 for ; Sat, 2 Feb 2019 01:08:13 +0000 (UTC) Received: from localhost ([127.0.0.1]:35575 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjn2-0003P1-Vi for patchwork-qemu-devel@patchwork.kernel.org; Fri, 01 Feb 2019 20:08:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54939) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjcg-0002pO-9h for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpjcJ-0003NP-5K for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:32944) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gpjcI-0000e0-Gm; Fri, 01 Feb 2019 19:57:06 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BC73D8764F; Sat, 2 Feb 2019 00:56:29 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-123-101.rdu2.redhat.com [10.10.123.101]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0C3046013E; Sat, 2 Feb 2019 00:56:27 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Fri, 1 Feb 2019 19:55:56 -0500 Message-Id: <20190202005610.24048-7-crosa@redhat.com> In-Reply-To: <20190202005610.24048-1-crosa@redhat.com> References: <20190202005610.24048-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Sat, 02 Feb 2019 00:56:29 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 06/20] Acceptance tests: use "arch:" tag to filter target specific tests X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Eduardo Habkost , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Cornelia Huck , qemu-s390x@nongnu.org, Wainer dos Santos Moschetta , Stefan Markovic , Cleber Rosa , Aleksandar Markovic , Caio Carrara , =?utf-8?q?Alex_Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Currently, the only test that contains some target architecture information is "boot_linux_console.py" which test contains a "x86_64" tag. But that tag is not respected in the default execution, that is, "make check-acceptance" doesn't do anything with it. That said, even the target architecture handling currently present in the "avocado_qemu.Test" class, class is pretty limited. For instance, by default, it chooses a target based on the host architecture. Because the original implementation of the tags feature in Avocado did not include any time of namespace or "key:val" mechanism, no tag has relation to another tag. The new implementation of the tags feature from version 67.0 onwards, allows "key:val" tags, and because of that, a test can be classified with a tag in a given key. For instance, the new proposed version of the "boot_linux_console.py" test, which downloads and attempts to run a x86_64 kernel, is now tagged as: :avocado: tags=arch:x86_64 This means that it can be filtered (out) when no x86_64 target is available. At the same time, tests that don't have a "arch:" tag, will not be filtered out. Signed-off-by: Cleber Rosa --- tests/Makefile.include | 3 +++ tests/acceptance/boot_linux_console.py | 2 +- tests/acceptance/linux_initrd.py | 2 +- tests/acceptance/virtio_version.py | 2 +- tests/requirements.txt | 2 +- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index 67e222eeff..e9e60117f8 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -1094,6 +1094,7 @@ TESTS_RESULTS_DIR=$(BUILD_DIR)/tests/results # Any number of command separated loggers are accepted. For more # information please refer to "avocado --help". AVOCADO_SHOW=app +AVOCADO_TAGS=$(patsubst %-softmmu,-t arch:%, $(filter %-softmmu,$(TARGET_DIRS))) ifneq ($(findstring v2,"v$(PYTHON_VERSION)"),v2) $(TESTS_VENV_DIR): $(TESTS_VENV_REQ) @@ -1119,6 +1120,8 @@ check-acceptance: check-venv $(TESTS_RESULTS_DIR) $(call quiet-command, \ $(TESTS_VENV_DIR)/bin/python -m avocado \ --show=$(AVOCADO_SHOW) run --job-results-dir=$(TESTS_RESULTS_DIR) \ + --filter-by-tags-include-empty --filter-by-tags-include-empty-key \ + $(AVOCADO_TAGS) \ --failfast=on $(SRC_PATH)/tests/acceptance, \ "AVOCADO", "tests/acceptance") diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py index 98324f7591..46b20bdfe2 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -19,7 +19,7 @@ class BootLinuxConsole(Test): and the kernel command line is properly passed from QEMU to the kernel :avocado: enable - :avocado: tags=x86_64 + :avocado: tags=arch:x86_64 """ timeout = 60 diff --git a/tests/acceptance/linux_initrd.py b/tests/acceptance/linux_initrd.py index 737355c2ef..c75e29be70 100644 --- a/tests/acceptance/linux_initrd.py +++ b/tests/acceptance/linux_initrd.py @@ -19,7 +19,7 @@ class LinuxInitrd(Test): Checks QEMU evaluates correctly the initrd file passed as -initrd option. :avocado: enable - :avocado: tags=x86_64 + :avocado: tags=arch:x86_64 """ timeout = 60 diff --git a/tests/acceptance/virtio_version.py b/tests/acceptance/virtio_version.py index ce990250d8..3b280e7fc3 100644 --- a/tests/acceptance/virtio_version.py +++ b/tests/acceptance/virtio_version.py @@ -62,7 +62,7 @@ class VirtioVersionCheck(Test): `disable-legacy`. :avocado: enable - :avocado: tags=x86_64 + :avocado: tags=arch:x86_64 """ # just in case there are failures, show larger diff: diff --git a/tests/requirements.txt b/tests/requirements.txt index 64c6e27a94..426a9e8a9a 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,4 +1,4 @@ # Add Python module requirements, one per line, to be installed # in the tests/venv Python virtual environment. For more info, # refer to: https://pip.pypa.io/en/stable/user_guide/#id1 -avocado-framework==65.0 +avocado-framework==67.0