mirror of
https://git.yoctoproject.org/poky
synced 2026-09-19 09:49:33 +02:00
classes/yocto-check-layer: refactor to be extended easily
Rearrange the class so that the check is a separate function, to make it neater to add further tests in the future. (From OE-Core rev: 36658a113811de98249bc1e1b79cfadd405e5391) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
43fd724eac
commit
e4c9b45a98
@@ -4,17 +4,17 @@
|
|||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
#
|
#
|
||||||
|
|
||||||
#
|
# This class is used by the yocto-check-layer script for additional
|
||||||
# This class is used by yocto-check-layer script to ensure that packages
|
# per-recipe tests.
|
||||||
# from Yocto Project Compatible layers don't skip required QA checks listed
|
|
||||||
# in CHECKLAYER_REQUIRED_TESTS defined by insane.bbclass
|
|
||||||
#
|
#
|
||||||
# It adds an anonymous python function with extra processing to all recipes,
|
# It adds an anonymous python function with extra processing to all recipes,
|
||||||
# globally inheriting this class isn't advisable - yocto-check-layer script
|
# globally inheriting this class isn't advisable - yocto-check-layer script
|
||||||
# handles that during its signature dump
|
# handles that during its signature dump
|
||||||
#
|
|
||||||
|
|
||||||
python () {
|
|
||||||
|
# Ensure that recipes don't skip required QA checks as listed
|
||||||
|
# in CHECKLAYER_REQUIRED_TESTS, defined by insane.bbclass
|
||||||
|
def check_insane_skip(d):
|
||||||
required_tests = set((d.getVar('CHECKLAYER_REQUIRED_TESTS') or '').split())
|
required_tests = set((d.getVar('CHECKLAYER_REQUIRED_TESTS') or '').split())
|
||||||
packages = set((d.getVar('PACKAGES') or '').split())
|
packages = set((d.getVar('PACKAGES') or '').split())
|
||||||
for package in packages:
|
for package in packages:
|
||||||
@@ -25,4 +25,8 @@ python () {
|
|||||||
oe.qa.write_error(" ".join(skip_required), 'Package %s is skipping required QA tests.' % package, d)
|
oe.qa.write_error(" ".join(skip_required), 'Package %s is skipping required QA tests.' % package, d)
|
||||||
bb.error("QA Issue: %s [%s]" % ('Package %s is skipping required QA tests.' % package, " ".join(skip_required)))
|
bb.error("QA Issue: %s [%s]" % ('Package %s is skipping required QA tests.' % package, " ".join(skip_required)))
|
||||||
d.setVar("QA_ERRORS_FOUND", "True")
|
d.setVar("QA_ERRORS_FOUND", "True")
|
||||||
|
|
||||||
|
|
||||||
|
python () {
|
||||||
|
check_insane_skip(d)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user