summaryrefslogtreecommitdiffstats
path: root/meta/classes/yocto-check-layer.bbclass
blob: 404f5fd9f2272a65e6daf5f77fa6b706a8484d1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#
# Copyright OpenEmbedded Contributors
#
# SPDX-License-Identifier: MIT
#

#
# This class is used by yocto-check-layer script for additional per-recipe tests
# The first test ensures that the layer has no recipes skipping 'installed-vs-shipped' QA checks
#

WARN_QA:remove = "installed-vs-shipped"
ERROR_QA:append = " installed-vs-shipped"

python () {
    packages = set((d.getVar('PACKAGES') or '').split())
    for package in packages:
        skip = set((d.getVar('INSANE_SKIP') or "").split() +
                   (d.getVar('INSANE_SKIP:' + package) or "").split())
        if 'installed-vs-shipped' in skip:
            oe.qa.handle_error("installed-vs-shipped", 'Package %s is skipping "installed-vs-shipped" QA test.' % package, d)
}