[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH-for-5.1 6/8] tests/Makefile: Add fetch-acceptance-assets rule
From: |
Alex Bennée |
Subject: |
Re: [PATCH-for-5.1 6/8] tests/Makefile: Add fetch-acceptance-assets rule |
Date: |
Mon, 06 Apr 2020 19:22:04 +0100 |
User-agent: |
mu4e 1.3.10; emacs 28.0.50 |
Willian Rampazzo <address@hidden> writes:
> On Mon, Apr 6, 2020 at 12:41 PM Alex Bennée <address@hidden> wrote:
>>
>>
>> Philippe Mathieu-Daudé <address@hidden> writes:
>>
>> > Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
>> > ---
>> > 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
>>
--
Alex Bennée
[NOTFORMERGE PATCH 8/8] Kludge for Avocado issue #3661, Philippe Mathieu-Daudé, 2020/04/03