]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
insane.bbclass: add do_recipe_qa task
authorAlexander Kanavin <alex.kanavin@gmail.com>
Thu, 27 Jul 2023 14:36:08 +0000 (16:36 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 30 Jul 2023 08:16:50 +0000 (09:16 +0100)
There is a need to run QA checks that can operate entirely from
recipe metadata and do not need any of the build artefacts or
source code. After some deliberation it was concluded that such
checks are best collected in their own task that runs as early as possible,
and so this commit adds the task.

Like package_qa, the task is sstate enabled, but doesn't (yet)
register the qa results into sstate.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-global/insane.bbclass

index 114781c780308e337e490e0549d1e10ec1cf7f67..148ae4b7ad56fd8a1fcac2a49331ebb3e40da9c2 100644 (file)
@@ -1469,6 +1469,20 @@ python do_qa_unpack() {
     unpack_check_src_uri(d.getVar('PN'), d)
 }
 
+python do_recipe_qa() {
+    oe.qa.exit_if_errors(d)
+}
+
+addtask do_recipe_qa before do_fetch do_package_qa do_build
+
+SSTATETASKS += "do_recipe_qa"
+do_recipe_qa[sstate-inputdirs] = ""
+do_recipe_qa[sstate-outputdirs] = ""
+python do_recipe_qa_setscene () {
+    sstate_setscene(d)
+}
+addtask do_recipe_qa_setscene
+
 # Check for patch fuzz
 do_patch[postfuncs] += "do_qa_patch "