diff options
author | Trevor Gamblin <tgamblin@baylibre.com> | 2023-10-20 10:42:02 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-10-20 17:02:10 +0100 |
commit | dc9126e45e74b915faaf296037e7ece41785bf4a (patch) | |
tree | bcf79bb824d8c134bbc72d630f751294474a4fa4 /meta/lib | |
parent | 2a3f69b83ed10622d6a39774528dbfaebb3e5ded (diff) | |
download | openembedded-core-contrib-dc9126e45e74b915faaf296037e7ece41785bf4a.tar.gz |
patchtest: fix lic_files_chksum test regex
the test_lic_files_chksum_modified_not_mentioned test in patchtest
wasn't picking up on 'License-Update:' tags correctly. Use pyparsing's
AtLineStart class to simplify the regex setup and search.
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/patchtest/tests/test_metadata_lic_files_chksum.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/meta/lib/patchtest/tests/test_metadata_lic_files_chksum.py b/meta/lib/patchtest/tests/test_metadata_lic_files_chksum.py index cb3e7c9d34..fa4a28c7b2 100644 --- a/meta/lib/patchtest/tests/test_metadata_lic_files_chksum.py +++ b/meta/lib/patchtest/tests/test_metadata_lic_files_chksum.py @@ -12,8 +12,7 @@ class LicFilesChkSum(base.Metadata): metadata = 'LIC_FILES_CHKSUM' license = 'LICENSE' closed = 'CLOSED' - lictag = 'License-Update' - lictag_re = pyparsing.Regex("^%s:" % lictag) + lictag_re = pyparsing.AtLineStart("License-Update:") def test_lic_files_chksum_presence(self): if not self.added: @@ -71,5 +70,5 @@ class LicFilesChkSum(base.Metadata): if self.lictag_re.search_string(commit.commit_message): break else: - self.fail('LIC_FILES_CHKSUM changed on target %s but there is no "%s" tag in commit message. Include it with a brief description' % (pn, self.lictag), + self.fail('LIC_FILES_CHKSUM changed on target %s but there is no "License-Update:" tag in commit message. Include it with a brief description' % pn, data=[('Current checksum', pretest), ('New checksum', test)]) |