diff mbox series

insane: skip unimplemented-ptest checks if disabled

Message ID 20240709224231.2092887-1-yoann.congal@smile.fr
State Accepted, archived
Commit 8ee42430a91d13de2b7a53c2ae04aa54bd76fad0
Headers show
Series insane: skip unimplemented-ptest checks if disabled | expand

Commit Message

Yoann Congal July 9, 2024, 10:42 p.m. UTC
From: Yoann Congal <yoann.congal@smile.fr>

This avoids searching through ${S} multiple times if unimplemented-ptest
QA check is disabled (the default case).

Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
---

While I have not seen decrease on build time on my machine, I hope to
see an effect on world build time.

---
 meta/classes-global/insane.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass
index 6888fa06f0..3b04944f0a 100644
--- a/meta/classes-global/insane.bbclass
+++ b/meta/classes-global/insane.bbclass
@@ -1361,7 +1361,7 @@  python do_qa_patch() {
         return False
 
     srcdir = d.getVar('S')
-    if not bb.utils.contains('DISTRO_FEATURES', 'ptest', True, False, d):
+    if not bb.utils.contains('DISTRO_FEATURES', 'ptest', True, False, d) or not bb.utils.contains('ALL_QA', 'unimplemented-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'))