From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: alexis.lothore@bootlin.com, Openembedded-core@lists.openembedded.org
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Mikko Rapeli <mikko.rapeli@linaro.org>
Subject: Re: [OE-Core][PATCH v3 1/2] testimage: move TESTIMAGE_FAILED_QA_ARTIFACTS default to core-image
Date: Mon, 05 Feb 2024 15:08:33 +0000 [thread overview]
Message-ID: <5358961809135d87d89ec9004c7f4bc164c82fe2.camel@linuxfoundation.org> (raw)
In-Reply-To: <20240205143757.81826-2-alexis.lothore@bootlin.com>
On Mon, 2024-02-05 at 15:37 +0100, Alexis Lothoré via
lists.openembedded.org wrote:
> From: Alexis Lothoré <alexis.lothore@bootlin.com>
>
> TESTIMAGE_FAILED_QA_ARTIFACTS currently sets a default list of files to be
> saved whenever some tests fail. Unfortunately, this default value is very
> easily discarded, because TESTIMAGE_FAILED_QA_ARTIFACTS is expected to be
> enriched by some core recipes (example: ptest images) which are often
> parsed before testimage.bbclass. Those core recipes could still manage to
> get the default value AND add some files by using override syntax, but then
> it makes it difficult for downstream recipes or bbappend files to tune this
> variable.
>
> Allow to set this default value and make sure it is not overwritten by
> recipes wanting to tune it, by setting the default value in core-image,
> which is parsed early enough. While doing so, set it as a default value
> instead of a weak default value.
>
> Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
> ---
> Changes in v3:
> - fix commit subject length and content
>
> Changes in v2:
> - set the default value in core-image instead of core-image-minimal
> ---
> meta/classes-recipe/core-image.bbclass | 8 ++++++++
> meta/classes-recipe/testimage.bbclass | 9 ---------
> 2 files changed, 8 insertions(+), 9 deletions(-)
>
> diff --git a/meta/classes-recipe/core-image.bbclass b/meta/classes-recipe/core-image.bbclass
> index 40fc15cb04f2..8ca64a95a318 100644
> --- a/meta/classes-recipe/core-image.bbclass
> +++ b/meta/classes-recipe/core-image.bbclass
> @@ -83,4 +83,12 @@ CORE_IMAGE_EXTRA_INSTALL ?= ""
>
> IMAGE_INSTALL ?= "${CORE_IMAGE_BASE_INSTALL}"
>
> +# When any test fails, TESTIMAGE_FAILED_QA_ARTIFACTS will be parsed and for
> +# each entry in it, if artifact pointed by path description exists on target,
> +# it will be retrieved onto host
> +TESTIMAGE_FAILED_QA_ARTIFACTS ?= "\
> + ${localstatedir}/log \
> + ${sysconfdir}/version \
> + ${sysconfdir}/os-release"
> +
> inherit image
> diff --git a/meta/classes-recipe/testimage.bbclass b/meta/classes-recipe/testimage.bbclass
> index f36d9418914f..cfda5b631ba8 100644
> --- a/meta/classes-recipe/testimage.bbclass
> +++ b/meta/classes-recipe/testimage.bbclass
> @@ -18,15 +18,6 @@ inherit image-artifact-names
>
> TESTIMAGE_AUTO ??= "0"
>
> -# When any test fails, TESTIMAGE_FAILED_QA ARTIFACTS will be parsed and for
> -# each entry in it, if artifact pointed by path description exists on target,
> -# it will be retrieved onto host
> -
> -TESTIMAGE_FAILED_QA_ARTIFACTS ??= "\
> - ${localstatedir}/log \
> - ${sysconfdir}/version \
> - ${sysconfdir}/os-release"
> -
> # You can set (or append to) TEST_SUITES in local.conf to select the tests
> # which you want to run for your target.
> # The test names are the module names in meta/lib/oeqa/runtime/cases.
I can imagine why ??= breaks if you use +=.
Does this work if you change it from ??= to just = ?
I'd really prefer to keep this in testimage.bbclass. Recipes should be
able to use += if it is set with = and the addition is after the class
inherit.
Cheers,
Richard
next prev parent reply other threads:[~2024-02-05 15:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-05 14:37 [OE-Core][PATCH v3 0/2] testimage: enable artifacts retrieval for failed tests Alexis Lothoré
2024-02-05 14:37 ` [OE-Core][PATCH v3 1/2] testimage: move TESTIMAGE_FAILED_QA_ARTIFACTS default to core-image Alexis Lothoré
2024-02-05 15:08 ` Richard Purdie [this message]
2024-02-05 19:22 ` Alexis Lothoré
2024-02-06 10:29 ` Richard Purdie
2024-02-06 11:09 ` Alexis Lothoré
2024-02-06 12:00 ` Richard Purdie
2024-02-06 13:23 ` Alexis Lothoré
2024-02-05 14:37 ` [OE-Core][PATCH v3 2/2] core-image-ptest: retrieve ptests directory when ptests fail Alexis Lothoré
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5358961809135d87d89ec9004c7f4bc164c82fe2.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=Openembedded-core@lists.openembedded.org \
--cc=alexandre.belloni@bootlin.com \
--cc=alexis.lothore@bootlin.com \
--cc=mikko.rapeli@linaro.org \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox