mbox series

[0/2] testimage: enable artifacts retrieval for failed tests

Message ID 20240124142930.1038759-1-alexis.lothore@bootlin.com
Headers show
Series testimage: enable artifacts retrieval for failed tests | expand

Message

Alexis Lothoré Jan. 24, 2024, 2:29 p.m. UTC
Hello,
this small series is a very late follow-up to my initial artifacts
retrieval series (sorry for the delay).
The initial series can be found in [1]. The goal is to retrieve some
specific files from target whenever some tests fail, to ease debugging. The
feature relies on a new TESTIMAGE_FAILED_QA_ARTIFACTS variable listing some
files, and the testimage class using this variable after failed tests to
save corresponding files in tmp/log/oeqa/artifacts.

Most of the initial series has been merged, except the part enriching
TESTIMAGE_FAILED_QA_ARTIFACTS with ptest files path from target to save
files specific to ptests ([2]), so the feature is currently not usable to
debug ptests. There was some discussions around how to properly set default
value and then enrich this variable. After wrapping my head around all the
ways to affect this variable (and mostly, struggling with recipes parsing
order), I came up with this new version, which:
- sets default TESTIMAGE_FAILED_QA_ARTIFACTS in core-image-minimal (because
  basically, testimage.bbclass is parsed too late, while we need to tune
  this variable in some core layers)
- uses += instead of append syntax in core layers (e.g: in ptest images),
  so the variable can still be tuned with append/prepend/remove syntax in downstream layers

[1] https://lore.kernel.org/openembedded-core/20230609064802.11777-1-alexis.lothore@bootlin.com/
[2] https://lore.kernel.org/openembedded-core/20230609064802.11777-5-alexis.lothore@bootlin.com/

Alexis Lothoré (2):
  testimage: move TESTIMAGE_FAILED_QA_ARTIFACTS default value to
    core-image-minimal
  core-image-ptest: retrieve ptests directory when ptests fail

 meta/classes-recipe/testimage.bbclass          | 9 ---------
 meta/recipes-core/images/core-image-minimal.bb | 8 ++++++++
 meta/recipes-core/images/core-image-ptest.bb   | 2 ++
 3 files changed, 10 insertions(+), 9 deletions(-)