mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-05 05:04:44 +02:00
insane: Improve patch-status layer filtering
Now that we have layer overrides, we can easily enable patch-status in ERROR_QA without the hardcoded code making it easier for other layers to opt into the checks. (From OE-Core rev: 61a881fdbe8b5a21c6276b8a5d06cc30486b1eb3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
42921e63a4
commit
6b26715fd7
|
@ -44,10 +44,11 @@ ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \
|
|||
already-stripped installed-vs-shipped ldflags compile-host-path \
|
||||
install-host-path pn-overrides unknown-configure-option \
|
||||
useless-rpaths rpaths staticdev empty-dirs \
|
||||
patch-fuzz patch-status-core\
|
||||
patch-fuzz \
|
||||
"
|
||||
# Add usrmerge QA check based on distro feature
|
||||
ERROR_QA:append = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', ' usrmerge', '', d)}"
|
||||
ERROR_QA:append:layer-core = " patch-status"
|
||||
|
||||
FAKEROOT_QA = "host-user-contaminated"
|
||||
FAKEROOT_QA[doc] = "QA tests which need to run under fakeroot. If any \
|
||||
|
@ -1334,24 +1335,13 @@ python do_qa_patch() {
|
|||
import re
|
||||
from oe import patch
|
||||
|
||||
allpatches = False
|
||||
if bb.utils.filter('ERROR_QA', 'patch-status-noncore', d) or bb.utils.filter('WARN_QA', 'patch-status-noncore', d):
|
||||
allpatches = True
|
||||
|
||||
coremeta_path = os.path.join(d.getVar('COREBASE'), 'meta', '')
|
||||
for url in patch.src_patches(d):
|
||||
(_, _, fullpath, _, _, _) = bb.fetch.decodeurl(url)
|
||||
|
||||
# skip patches not in oe-core
|
||||
patchtype = "patch-status-core"
|
||||
if not os.path.abspath(fullpath).startswith(coremeta_path):
|
||||
patchtype = "patch-status-noncore"
|
||||
if not allpatches:
|
||||
continue
|
||||
|
||||
msg = oe.qa.check_upstream_status(fullpath)
|
||||
if msg:
|
||||
oe.qa.handle_error(patchtype, msg, d)
|
||||
oe.qa.handle_error("patch-status", msg, d)
|
||||
|
||||
oe.qa.exit_if_errors(d)
|
||||
}
|
||||
|
|
|
@ -1469,6 +1469,7 @@ class DevtoolUpdateTests(DevtoolBase):
|
|||
def test_devtool_finish_modify_git_subdir(self):
|
||||
# Check preconditions
|
||||
testrecipe = 'dos2unix'
|
||||
self.append_config('ERROR_QA:remove:pn-dos2unix = "patch-status"\n')
|
||||
bb_vars = get_bb_vars(['SRC_URI', 'S', 'WORKDIR', 'FILE'], testrecipe)
|
||||
self.assertIn('git://', bb_vars['SRC_URI'], 'This test expects the %s recipe to be a git recipe' % testrecipe)
|
||||
workdir_git = '%s/git/' % bb_vars['WORKDIR']
|
||||
|
|
|
@ -64,6 +64,7 @@ class KernelDev(OESelftestTestCase):
|
|||
recipe_append = os.path.join(self.recipeskernel_dir, 'linux-yocto_%.bbappend')
|
||||
with open(recipe_append, 'w+') as fh:
|
||||
fh.write('SRC_URI += "file://%s"\n' % patch_name)
|
||||
fh.write('ERROR_QA:remove:pn-linux-yocto = "patch-status"\n')
|
||||
fh.write('FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"')
|
||||
|
||||
runCmd('bitbake virtual/kernel -c clean')
|
||||
|
|
Loading…
Reference in New Issue
Block a user