summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Rosen <jeremy.rosen@smile.fr>2023-10-10 15:49:28 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-10-15 09:11:40 +0100
commit282ae38543e22cbdcbf69c64eace551997927ce3 (patch)
tree8596303088e414d2ced57e5dd41643e02ff3423d
parent599046ea9302af0cf856d3fcd827f6a2be75b7e1 (diff)
downloadopenembedded-core-282ae38543e22cbdcbf69c64eace551997927ce3.tar.gz
insane: Add unimplemented-ptest infrastructure
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" Signed-off-by: Jérémy Rosen <jeremy.rosen@smile.fr> Reviewed-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
-rw-r--r--meta/classes-global/insane.bbclass9
1 files changed, 9 insertions, 0 deletions
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)
}