qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/2] tests/avocado: Allow passing command line parameters via


From: Daniel Henrique Barboza
Subject: Re: [PATCH 2/2] tests/avocado: Allow passing command line parameters via Makefile
Date: Thu, 2 Feb 2023 09:05:29 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0



On 1/20/23 19:15, Fabiano Rosas wrote:
Add support for the 'avocado run' "-p" option, which allows us to pass
parameters in the form key=value to be applied to all tests selected
for a given run. This is useful to force generic tests to use a
specific machine, cpu or qemu-binary where otherwise the defaults
would be used.

E.g.:
  $ make check-avocado AVOCADO_PARAMS="machine=virt arch=riscv64"

  <runs all tests replacing machine and arch in those that do not have
   these parameters already set via tags>

Signed-off-by: Fabiano Rosas <farosas@suse.de>
---

Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>

  tests/Makefile.include | 6 +++++-
  1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/Makefile.include b/tests/Makefile.include
index 9422ddaece..f92e730aa0 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -107,6 +107,10 @@ else
        AVOCADO_CMDLINE_TAGS=$(addprefix -t , $(AVOCADO_TAGS))
  endif
+ifdef AVOCADO_PARAMS
+       AVOCADO_CMDLINE_PARAMS=$(addprefix -p , $(AVOCADO_PARAMS))
+endif
+
  quiet-venv-pip = $(quiet-@)$(call quiet-command-run, \
      $(TESTS_PYTHON) -m pip -q --disable-pip-version-check $1, \
      "VENVPIP","$1")
@@ -144,7 +148,7 @@ check-avocado: check-venv $(TESTS_RESULTS_DIR) get-vm-images
              --show=$(AVOCADO_SHOW) run --job-results-dir=$(TESTS_RESULTS_DIR) 
\
              $(if $(AVOCADO_TAGS),, --filter-by-tags-include-empty \
                        --filter-by-tags-include-empty-key) \
-            $(AVOCADO_CMDLINE_TAGS) \
+            $(AVOCADO_CMDLINE_TAGS) $(AVOCADO_CMDLINE_PARAMS) \
              $(if $(GITLAB_CI),,--failfast) $(AVOCADO_TESTS), \
              "AVOCADO", "tests/avocado")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]