mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 12:59:02 +02:00

Copy the core components of the patchtest-oe repo into meta/lib/patchtest in oe-core. (From OE-Core rev: 257f64f4e4414b78981104aec132b067beb5a92a) Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
29 lines
956 B
Python
29 lines
956 B
Python
# Checks related to the patch's signed-off-by lines
|
|
#
|
|
# Copyright (C) 2016 Intel Corporation
|
|
#
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
import base
|
|
import parse_signed_off_by
|
|
import re
|
|
|
|
class SignedOffBy(base.Base):
|
|
|
|
revert_shortlog_regex = re.compile('Revert\s+".*"')
|
|
|
|
@classmethod
|
|
def setUpClassLocal(cls):
|
|
# match self.mark with no '+' preceding it
|
|
cls.prog = parse_signed_off_by.signed_off_by
|
|
|
|
def test_signed_off_by_presence(self):
|
|
for commit in SignedOffBy.commits:
|
|
# skip those patches that revert older commits, these do not required the tag presence
|
|
if self.revert_shortlog_regex.match(commit.shortlog):
|
|
continue
|
|
if not SignedOffBy.prog.search_string(commit.payload):
|
|
self.fail('Patch is missing Signed-off-by',
|
|
'Sign off the patch (either manually or with "git commit --amend -s")',
|
|
commit)
|