Skip to content

Commit 56253ed

Browse files
denix0rpurdie
authored andcommitted
yocto-check-layer: expand to cover all required QA checks
insane.bbclass now defines CHECKLAYER_REQUIRED_TESTS list with required QA checks that are becoming mandatory for Yocto Project Compatible layers. Update yocto-check-layer.bbclass in order to catch when packages from such layers try to skip any of the required QA checks. (From OE-Core rev: e397251727f81bff9c09de29e46e20c1c94fa0bf) Signed-off-by: Denys Dmytriyenko <[email protected]> Signed-off-by: Mathieu Dubois-Briand <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
1 parent 2d58f58 commit 56253ed

File tree

2 files changed

+28
-22
lines changed

2 files changed

+28
-22
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#
2+
# Copyright OpenEmbedded Contributors
3+
#
4+
# SPDX-License-Identifier: MIT
5+
#
6+
7+
#
8+
# This class is used by yocto-check-layer script to ensure that packages
9+
# from Yocto Project Compatible layers don't skip required QA checks listed
10+
# in CHECKLAYER_REQUIRED_TESTS defined by insane.bbclass
11+
#
12+
# It adds an anonymous python function with extra processing to all recipes,
13+
# globally inheriting this class isn't advisable - yocto-check-layer script
14+
# handles that during its signature dump
15+
#
16+
17+
python () {
18+
required_tests = set((d.getVar('CHECKLAYER_REQUIRED_TESTS') or '').split())
19+
packages = set((d.getVar('PACKAGES') or '').split())
20+
for package in packages:
21+
skip = set((d.getVar('INSANE_SKIP') or "").split() +
22+
(d.getVar('INSANE_SKIP:' + package) or "").split())
23+
skip_required = skip & required_tests
24+
if skip_required:
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)))
27+
d.setVar("QA_ERRORS_FOUND", "True")
28+
}

meta/classes/yocto-check-layer.bbclass

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)