From nobody Mon Feb 9 08:56:51 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1632762212; cv=none; d=zohomail.com; s=zohoarc; b=BmpHa3TqUX4rG8HPw6a27M64BW0LR258YhBpMGKpxuHY30uoVV5R8fmn+IjbQOqTL8779xAAf3v+1Nr06RdFyneVPpTXNUWQ3v5i3c8sePQQdZiO+qAJzy8iDDFTUHPwm84wKVOv3h0ZUsh8lYR6alHb/HjczXP5pBREgX/tUsM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1632762212; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=mhGqr1t891o054kB4FzWFV92AJKwIKbsNyCWXLesBJE=; b=luYPYAyQ5CM0gXc60zxlhHOjckSEuW9w6OmnTykgiwL47XLF9k7BCCJJ1+vlvexIcU03Ue6B8Lx9UXuJ76g3KmuPIMXbLbYQkhZ1WRuXFdssgcWO7zUi7M0ZwHDoafMCeF3ZIkkwFadkaSEKXNpCAWmkv9R72jtgNZx9co2Lpvw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 163276221211349.123275264473705; Mon, 27 Sep 2021 10:03:32 -0700 (PDT) Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-302-tseoy7zLMC2pxKdhRea_bw-1; Mon, 27 Sep 2021 13:03:28 -0400 Received: by mail-wr1-f72.google.com with SMTP id z15-20020adfec8f000000b001606a799300so493164wrn.19 for ; Mon, 27 Sep 2021 10:03:28 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.redhat.com (118.red-83-35-24.dynamicip.rima-tde.net. [83.35.24.118]) by smtp.gmail.com with ESMTPSA id n26sm50478wmi.43.2021.09.27.10.03.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Sep 2021 10:03:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632762211; 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=mhGqr1t891o054kB4FzWFV92AJKwIKbsNyCWXLesBJE=; b=QNcJB0zdUKRFG5QWRD74IQ7zdcsFeHQO04Ncd/KY3QtHkHe4l09/GV+mwz+OG8AcFgX+ay PWQs3LAootVMJLF1crfaNZHeED6GZkMY4hcZty1IE2YJ5D6yEMmwaODkWr63PgebnDQw3X I5yWwfSqJeesyhxSpfTjwhYBmCeIlpU= X-MC-Unique: tseoy7zLMC2pxKdhRea_bw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mhGqr1t891o054kB4FzWFV92AJKwIKbsNyCWXLesBJE=; b=KJSKKvxX+BY09vXGNW4Wccn5RLTEJKKHdne1quOkAjADL30KfVDWXzRinwSC7AN66l +eI7HSK1/Iz/1/Gk+iM+3vU/lZg/kvEJ1SY0QjW8vNygfQkkPL0tqKMdSSaSpu04L5E1 Jgnsa5S5AOVrzwN/pbDDfkYBNG/YRvUmflrdi4oNJV6LrEk00PvgpzE1QOjJaL7xORqF Ak+pI4JgCoyYm5MmBQritXZENDoz3xcDScPUUccOlD6RBD8Di9j1jtR0lSglLOdlLX5q odhyVlTMrEs60MB6VvWF0s8typJn9ifvRfEbqkc3CzSsnLmRC1ECHExDsuw7HRy1uwat MSQA== X-Gm-Message-State: AOAM5338HK4GelXQkjDoGvg0VQQClgYy0LeCOzaUDXErRzoCwTDjXdTv Mrb0xFyQkgdA5iASbQUVOAUhpiBWmbyhZylZ08+lEDlxdupIq5/ERop6aXDH5HKMtLGKj8BwZtm BZJcXF4iVWoAQyA== X-Received: by 2002:a1c:21c3:: with SMTP id h186mr167813wmh.20.1632762207737; Mon, 27 Sep 2021 10:03:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMKOcHVjY+iVeK3uGqwijgreU4pdJL73gNLtYP84ICYAfan9yV6aQ+ag2TNcNbV2qulXUcOg== X-Received: by 2002:a1c:21c3:: with SMTP id h186mr167786wmh.20.1632762207511; Mon, 27 Sep 2021 10:03:27 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Willian Rampazzo , Wainer dos Santos Moschetta , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 13/21] tests/Makefile: allow control over tags during check-acceptance Date: Mon, 27 Sep 2021 19:02:19 +0200 Message-Id: <20210927170227.2014482-14-philmd@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210927170227.2014482-1-philmd@redhat.com> References: <20210927170227.2014482-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1632762212879100003 From: Willian Rampazzo Although it is possible to run a specific test using the avocado command-line, a user may want to use a specific tag while running the ``make check-acceptance`` during the development or debugging. This allows using the AVOCADO_TAGS environment variable where the user takes total control of which tests should run based on the tags defined. This also makes the check-acceptance command flexible to restrict tests based on tags while running on CI. e.g.: AVOCADO_TAGS=3D"foo bar baz" make check-acceptance Signed-off-by: Willian Rampazzo Tested-by: Wainer dos Santos Moschetta Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20210923161141.232208-2-willianr@redhat.com> --- docs/devel/testing.rst | 14 ++++++++++++++ tests/Makefile.include | 12 +++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index 4a0abbf23d3..d1841e35d57 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -732,6 +732,20 @@ available. On Debian and Ubuntu based systems, depend= ing on the specific version, they may be on packages named ``python3-venv`` and ``python3-pip``. =20 +It is also possible to run tests based on tags using the +``make check-acceptance`` command and the ``AVOCADO_TAGS`` environment +variable: + +.. code:: + + make check-acceptance AVOCADO_TAGS=3Dquick + +Note that tags separated with commas have an AND behavior, while tags +separated by spaces have an OR behavior. For more information on Avocado +tags, see: + + https://avocado-framework.readthedocs.io/en/latest/guides/user/chapters/t= ags.html + The scripts installed inside the virtual environment may be used without an "activation". For instance, the Avocado test runner may be invoked by running: diff --git a/tests/Makefile.include b/tests/Makefile.include index 6e16c05f10b..f6484e5b31d 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -92,7 +92,12 @@ TESTS_RESULTS_DIR=3D$(BUILD_DIR)/tests/results # Any number of command separated loggers are accepted. For more # information please refer to "avocado --help". AVOCADO_SHOW=3Dapp -AVOCADO_TAGS=3D$(patsubst %-softmmu,-t arch:%, $(filter %-softmmu,$(TARGET= S))) +ifndef AVOCADO_TAGS + AVOCADO_CMDLINE_TAGS=3D$(patsubst %-softmmu,-t arch:%, \ + $(filter %-softmmu,$(TARGETS))) +else + AVOCADO_CMDLINE_TAGS=3D$(addprefix -t , $(AVOCADO_TAGS)) +endif =20 $(TESTS_VENV_DIR): $(TESTS_VENV_REQ) $(call quiet-command, \ @@ -128,8 +133,9 @@ check-acceptance: check-venv $(TESTS_RESULTS_DIR) get-v= m-images $(call quiet-command, \ $(TESTS_VENV_DIR)/bin/python -m avocado \ --show=3D$(AVOCADO_SHOW) run --job-results-dir=3D$(TESTS_RESUL= TS_DIR) \ - --filter-by-tags-include-empty --filter-by-tags-include-empty-= key \ - $(AVOCADO_TAGS) \ + $(if $(AVOCADO_TAGS),, --filter-by-tags-include-empty \ + --filter-by-tags-include-empty-key) \ + $(AVOCADO_CMDLINE_TAGS) \ $(if $(GITLAB_CI),,--failfast) tests/acceptance, \ "AVOCADO", "tests/acceptance") =20 --=20 2.31.1