Message ID | 20200403172919.24621-7-philmd@redhat.com |
---|---|
State | New |
Headers | show |
Series | Acceptance tests queue | expand |
Philippe Mathieu-Daudé <philmd@redhat.com> writes: > Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> > --- > tests/Makefile.include | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/tests/Makefile.include b/tests/Makefile.include > index 51de676298..90f457593c 100644 > --- a/tests/Makefile.include > +++ b/tests/Makefile.include > @@ -906,6 +906,13 @@ get-vm-image-fedora-31-%: check-venv > # download all vm images, according to defined targets > get-vm-images: check-venv $(patsubst %,get-vm-image-fedora-31-%, $(FEDORA_31_DOWNLOAD)) > > +fetch-acceptance-assets: check-venv > + $(call quiet-command, \ > + $(TESTS_VENV_DIR)/bin/python -m avocado \ > + --show=$(if $(DEBUG),avocado.test,$(AVOCADO_SHOW)) assets fetch \ > + tests/acceptance/*py, \ > + "AVOCADO", "tests/acceptance") > + I'm wondering if we could expand this to a rule per-test group and therefor allow parallel fetching of groups of assets? > check-acceptance: check-venv $(TESTS_RESULTS_DIR) get-vm-images > $(call quiet-command, \ > $(TESTS_VENV_DIR)/bin/python -m avocado \
On Mon, Apr 6, 2020 at 12:41 PM Alex Bennée <alex.bennee@linaro.org> wrote: > > > Philippe Mathieu-Daudé <philmd@redhat.com> writes: > > > Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> > > --- > > tests/Makefile.include | 7 +++++++ > > 1 file changed, 7 insertions(+) > > > > diff --git a/tests/Makefile.include b/tests/Makefile.include > > index 51de676298..90f457593c 100644 > > --- a/tests/Makefile.include > > +++ b/tests/Makefile.include > > @@ -906,6 +906,13 @@ get-vm-image-fedora-31-%: check-venv > > # download all vm images, according to defined targets > > get-vm-images: check-venv $(patsubst %,get-vm-image-fedora-31-%, $(FEDORA_31_DOWNLOAD)) > > > > +fetch-acceptance-assets: check-venv > > + $(call quiet-command, \ > > + $(TESTS_VENV_DIR)/bin/python -m avocado \ > > + --show=$(if $(DEBUG),avocado.test,$(AVOCADO_SHOW)) assets fetch \ > > + tests/acceptance/*py, \ > > + "AVOCADO", "tests/acceptance") > > + > > I'm wondering if we could expand this to a rule per-test group and > therefor allow parallel fetching of groups of assets? This is a valid idea! Additionally, my suggestion is to organize the tests by subdirectories under `tests/acceptance/`. Doing so makes it easy to handle the target rule, adding the subdirectory to the assets fetch command instead of listing specific tests for each group. Making a list of tests for each group requires extra editing to the makefile target when a new test is added. This can lead to new tests being missed in their groups by mistake. > > > check-acceptance: check-venv $(TESTS_RESULTS_DIR) get-vm-images > > $(call quiet-command, \ > > $(TESTS_VENV_DIR)/bin/python -m avocado \ > > > -- > Alex Bennée >
Willian Rampazzo <wrampazz@redhat.com> writes: > On Mon, Apr 6, 2020 at 12:41 PM Alex Bennée <alex.bennee@linaro.org> wrote: >> >> >> Philippe Mathieu-Daudé <philmd@redhat.com> writes: >> >> > Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> >> > --- >> > tests/Makefile.include | 7 +++++++ >> > 1 file changed, 7 insertions(+) >> > >> > diff --git a/tests/Makefile.include b/tests/Makefile.include >> > index 51de676298..90f457593c 100644 >> > --- a/tests/Makefile.include >> > +++ b/tests/Makefile.include >> > @@ -906,6 +906,13 @@ get-vm-image-fedora-31-%: check-venv >> > # download all vm images, according to defined targets >> > get-vm-images: check-venv $(patsubst %,get-vm-image-fedora-31-%, $(FEDORA_31_DOWNLOAD)) >> > >> > +fetch-acceptance-assets: check-venv >> > + $(call quiet-command, \ >> > + $(TESTS_VENV_DIR)/bin/python -m avocado \ >> > + --show=$(if $(DEBUG),avocado.test,$(AVOCADO_SHOW)) assets fetch \ >> > + tests/acceptance/*py, \ >> > + "AVOCADO", "tests/acceptance") >> > + >> >> I'm wondering if we could expand this to a rule per-test group and >> therefor allow parallel fetching of groups of assets? > > This is a valid idea! Additionally, my suggestion is to organize the > tests by subdirectories under `tests/acceptance/`. Doing so makes it > easy to handle the target rule, adding the subdirectory to the assets > fetch command instead of listing specific tests for each group. Making > a list of tests for each group requires extra editing to the makefile > target when a new test is added. This can lead to new tests being > missed in their groups by mistake. I'd use wildcards to build up the groups so the Makefile doesn't need to be messed with again. > >> >> > check-acceptance: check-venv $(TESTS_RESULTS_DIR) get-vm-images >> > $(call quiet-command, \ >> > $(TESTS_VENV_DIR)/bin/python -m avocado \ >> >> >> -- >> Alex Bennée >>
diff --git a/tests/Makefile.include b/tests/Makefile.include index 51de676298..90f457593c 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -906,6 +906,13 @@ get-vm-image-fedora-31-%: check-venv # download all vm images, according to defined targets get-vm-images: check-venv $(patsubst %,get-vm-image-fedora-31-%, $(FEDORA_31_DOWNLOAD)) +fetch-acceptance-assets: check-venv + $(call quiet-command, \ + $(TESTS_VENV_DIR)/bin/python -m avocado \ + --show=$(if $(DEBUG),avocado.test,$(AVOCADO_SHOW)) assets fetch \ + tests/acceptance/*py, \ + "AVOCADO", "tests/acceptance") + check-acceptance: check-venv $(TESTS_RESULTS_DIR) get-vm-images $(call quiet-command, \ $(TESTS_VENV_DIR)/bin/python -m avocado \
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> --- tests/Makefile.include | 7 +++++++ 1 file changed, 7 insertions(+)