diff options
Diffstat (limited to 'meta/lib/patchtest/tests')
-rw-r--r-- | meta/lib/patchtest/tests/base.py | 5 | ||||
-rw-r--r-- | meta/lib/patchtest/tests/test_metadata.py | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/meta/lib/patchtest/tests/base.py b/meta/lib/patchtest/tests/base.py index 424e61b5be..911addb199 100644 --- a/meta/lib/patchtest/tests/base.py +++ b/meta/lib/patchtest/tests/base.py | |||
@@ -37,7 +37,6 @@ class Base(unittest.TestCase): | |||
37 | endcommit_messages_regex = re.compile(r'\(From \w+-\w+ rev:|(?<!\S)Signed-off-by|(?<!\S)---\n') | 37 | endcommit_messages_regex = re.compile(r'\(From \w+-\w+ rev:|(?<!\S)Signed-off-by|(?<!\S)---\n') |
38 | patchmetadata_regex = re.compile(r'-{3} \S+|\+{3} \S+|@{2} -\d+,\d+ \+\d+,\d+ @{2} \S+') | 38 | patchmetadata_regex = re.compile(r'-{3} \S+|\+{3} \S+|@{2} -\d+,\d+ \+\d+,\d+ @{2} \S+') |
39 | 39 | ||
40 | |||
41 | @staticmethod | 40 | @staticmethod |
42 | def msg_to_commit(msg): | 41 | def msg_to_commit(msg): |
43 | payload = msg.get_payload() | 42 | payload = msg.get_payload() |
@@ -66,13 +65,13 @@ class Base(unittest.TestCase): | |||
66 | def setUpClass(cls): | 65 | def setUpClass(cls): |
67 | 66 | ||
68 | # General objects: mailbox.mbox and patchset | 67 | # General objects: mailbox.mbox and patchset |
69 | cls.mbox = mailbox.mbox(PatchTestInput.repo.patch) | 68 | cls.mbox = mailbox.mbox(PatchTestInput.repo.patch.path) |
70 | 69 | ||
71 | # Patch may be malformed, so try parsing it | 70 | # Patch may be malformed, so try parsing it |
72 | cls.unidiff_parse_error = '' | 71 | cls.unidiff_parse_error = '' |
73 | cls.patchset = None | 72 | cls.patchset = None |
74 | try: | 73 | try: |
75 | cls.patchset = unidiff.PatchSet.from_filename(PatchTestInput.repo.patch, encoding=u'UTF-8') | 74 | cls.patchset = unidiff.PatchSet.from_filename(PatchTestInput.repo.patch.path, encoding=u'UTF-8') |
76 | except unidiff.UnidiffParseError as upe: | 75 | except unidiff.UnidiffParseError as upe: |
77 | cls.patchset = [] | 76 | cls.patchset = [] |
78 | cls.unidiff_parse_error = str(upe) | 77 | cls.unidiff_parse_error = str(upe) |
diff --git a/meta/lib/patchtest/tests/test_metadata.py b/meta/lib/patchtest/tests/test_metadata.py index 8c2305a184..d7e5e187f6 100644 --- a/meta/lib/patchtest/tests/test_metadata.py +++ b/meta/lib/patchtest/tests/test_metadata.py | |||
@@ -168,7 +168,7 @@ class TestMetadata(base.Metadata): | |||
168 | def test_cve_check_ignore(self): | 168 | def test_cve_check_ignore(self): |
169 | # Skip if we neither modified a recipe or target branches are not | 169 | # Skip if we neither modified a recipe or target branches are not |
170 | # Nanbield and newer. CVE_CHECK_IGNORE was first deprecated in Nanbield. | 170 | # Nanbield and newer. CVE_CHECK_IGNORE was first deprecated in Nanbield. |
171 | if not self.modified or PatchTestInput.repo.branch == "kirkstone" or PatchTestInput.repo.branch == "dunfell": | 171 | if not self.modified or PatchTestInput.repo.patch.branch == "kirkstone" or PatchTestInput.repo.patch.branch == "dunfell": |
172 | self.skip('No modified recipes or older target branch, skipping test') | 172 | self.skip('No modified recipes or older target branch, skipping test') |
173 | for pn in self.modified: | 173 | for pn in self.modified: |
174 | # we are not interested in images | 174 | # we are not interested in images |