From 5330065f51fc0dcc2b74360220b2c97c4b80e622 Mon Sep 17 00:00:00 2001 From: Jérémy Rosen Date: Tue, 10 Oct 2023 15:49:28 +0200 Subject: insane: Add unimplemented-ptest infrastructure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This infrastructure will use heuristics to detect when package sources seem to have unit tests implemented but no ptest have been implemented in the recipe. No heuristics have been implemented at this point, only the infrastructure to skip the test when ptest are implemented. This is part of python_do_qa_patch since we need the sources in their final state but do not need any configuration done A missing-ptest QA test already existed but it was used for a different purpose and overridden by ptest.bbclass. Thus, a new QA keyword was added Note: The QA test is not enabled by default and may be enabled to hunt down potential ptests with: WARN_QA += "unimplemented-ptest" (From OE-Core rev: 282ae38543e22cbdcbf69c64eace551997927ce3) Signed-off-by: Jérémy Rosen Reviewed-by: Yoann Congal Signed-off-by: Luca Ceresoli Signed-off-by: Richard Purdie --- meta/classes-global/insane.bbclass | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass index 5743d91240..c40bae7e3d 100644 --- a/meta/classes-global/insane.bbclass +++ b/meta/classes-global/insane.bbclass @@ -1348,6 +1348,15 @@ python do_qa_patch() { if msg: oe.qa.handle_error("patch-status", msg, d) + ########################################################################### + # Check for missing ptests + ########################################################################### + srcdir = d.getVar('S') + if not bb.utils.contains('DISTRO_FEATURES', 'ptest', True, False, d): + pass + elif bb.data.inherits_class('ptest', d): + bb.note("Package %s QA: skipping unimplemented-ptest: ptest implementation detected" % d.getVar('PN')) + oe.qa.exit_if_errors(d) } -- cgit v1.2.3-54-g00ecf