diff mbox series

[02/21] insane.bbclass: add do_recipe_qa task

Message ID 20230727143627.3718496-2-alex@linutronix.de
State Accepted, archived
Commit e0c71367ab59021fc430ef215bbfc3b525036ba4
Headers show
Series [01/21] meta: add missing summaries for image recipes | expand

Commit Message

Alexander Kanavin July 27, 2023, 2:36 p.m. UTC
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>
---
 meta/classes-global/insane.bbclass | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
diff mbox series

Patch

diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass
index 114781c7803..148ae4b7ad5 100644
--- a/meta/classes-global/insane.bbclass
+++ b/meta/classes-global/insane.bbclass
@@ -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 "