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:47 +0100
commit5330065f51fc0dcc2b74360220b2c97c4b80e622 (patch)
tree7f899349e50a0c50617c5f20a0af500359cfafb8
parent9c7148318fd78eefe7c30d2d151b7f1ffd3834f8 (diff)
downloadpoky-5330065f51fc0dcc2b74360220b2c97c4b80e622.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" (From OE-Core rev: 282ae38543e22cbdcbf69c64eace551997927ce3) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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() {
1348 if msg: 1348 if msg:
1349 oe.qa.handle_error("patch-status", msg, d) 1349 oe.qa.handle_error("patch-status", msg, d)
1350 1350
1351 ###########################################################################
1352 # Check for missing ptests
1353 ###########################################################################
1354 srcdir = d.getVar('S')
1355 if not bb.utils.contains('DISTRO_FEATURES', 'ptest', True, False, d):
1356 pass
1357 elif bb.data.inherits_class('ptest', d):
1358 bb.note("Package %s QA: skipping unimplemented-ptest: ptest implementation detected" % d.getVar('PN'))
1359
1351 oe.qa.exit_if_errors(d) 1360 oe.qa.exit_if_errors(d)
1352} 1361}
1353 1362