summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes-global/yocto-check-layer.bbclass16
1 files changed, 10 insertions, 6 deletions
diff --git a/meta/classes-global/yocto-check-layer.bbclass b/meta/classes-global/yocto-check-layer.bbclass
index 1cdab49661..92a392af9c 100644
--- a/meta/classes-global/yocto-check-layer.bbclass
+++ b/meta/classes-global/yocto-check-layer.bbclass
@@ -4,17 +4,17 @@
4# SPDX-License-Identifier: MIT 4# SPDX-License-Identifier: MIT
5# 5#
6 6
7# 7# This class is used by the yocto-check-layer script for additional
8# This class is used by yocto-check-layer script to ensure that packages 8# per-recipe tests.
9# from Yocto Project Compatible layers don't skip required QA checks listed
10# in CHECKLAYER_REQUIRED_TESTS defined by insane.bbclass
11# 9#
12# It adds an anonymous python function with extra processing to all recipes, 10# It adds an anonymous python function with extra processing to all recipes,
13# globally inheriting this class isn't advisable - yocto-check-layer script 11# globally inheriting this class isn't advisable - yocto-check-layer script
14# handles that during its signature dump 12# handles that during its signature dump
15#
16 13
17python () { 14
15# Ensure that recipes don't skip required QA checks as listed
16# in CHECKLAYER_REQUIRED_TESTS, defined by insane.bbclass
17def check_insane_skip(d):
18 required_tests = set((d.getVar('CHECKLAYER_REQUIRED_TESTS') or '').split()) 18 required_tests = set((d.getVar('CHECKLAYER_REQUIRED_TESTS') or '').split())
19 packages = set((d.getVar('PACKAGES') or '').split()) 19 packages = set((d.getVar('PACKAGES') or '').split())
20 for package in packages: 20 for package in packages:
@@ -25,4 +25,8 @@ python () {
25 oe.qa.write_error(" ".join(skip_required), 'Package %s is skipping required QA tests.' % package, d) 25 oe.qa.write_error(" ".join(skip_required), 'Package %s is skipping required QA tests.' % package, d)
26 bb.error("QA Issue: %s [%s]" % ('Package %s is skipping required QA tests.' % package, " ".join(skip_required))) 26 bb.error("QA Issue: %s [%s]" % ('Package %s is skipping required QA tests.' % package, " ".join(skip_required)))
27 d.setVar("QA_ERRORS_FOUND", "True") 27 d.setVar("QA_ERRORS_FOUND", "True")
28
29
30python () {
31 check_insane_skip(d)
28} 32}