summaryrefslogtreecommitdiffstats
path: root/meta/lib/patchtest/tests/test_mbox.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/patchtest/tests/test_mbox.py')
-rw-r--r--meta/lib/patchtest/tests/test_mbox.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/meta/lib/patchtest/tests/test_mbox.py b/meta/lib/patchtest/tests/test_mbox.py
index 95002c9e2a..2449564d0f 100644
--- a/meta/lib/patchtest/tests/test_mbox.py
+++ b/meta/lib/patchtest/tests/test_mbox.py
@@ -100,7 +100,7 @@ class TestMbox(base.Base):
100 self.skip("Skipping merge test since patch is not intended for master branch. Target detected is %s" % PatchTestInput.repo.branch) 100 self.skip("Skipping merge test since patch is not intended for master branch. Target detected is %s" % PatchTestInput.repo.branch)
101 if not PatchTestInput.repo.ismerged: 101 if not PatchTestInput.repo.ismerged:
102 commithash, author, date, shortlog = headlog() 102 commithash, author, date, shortlog = headlog()
103 self.fail('Series does not apply on top of target branch. Rebase your series and ensure the target is correct', 103 self.fail('Series does not apply on top of target branch %s' % PatchTestInput.repo.branch,
104 data=[('Targeted branch', '%s (currently at %s)' % (PatchTestInput.repo.branch, commithash))]) 104 data=[('Targeted branch', '%s (currently at %s)' % (PatchTestInput.repo.branch, commithash))])
105 105
106 def test_target_mailing_list(self): 106 def test_target_mailing_list(self):
@@ -114,7 +114,7 @@ class TestMbox(base.Base):
114 for commit in TestMbox.commits: 114 for commit in TestMbox.commits:
115 match = project_regex.search_string(commit.subject) 115 match = project_regex.search_string(commit.subject)
116 if match: 116 if match:
117 self.fail('Series sent to the wrong mailing list. Check the project\'s README (%s) and send the patch to the indicated list' % match.group('project'), 117 self.fail('Series sent to the wrong mailing list or some patches from the series correspond to different mailing lists',
118 commit=commit) 118 commit=commit)
119 119
120 for patch in self.patchset: 120 for patch in self.patchset:
@@ -122,7 +122,7 @@ class TestMbox(base.Base):
122 base_path = folders[0] 122 base_path = folders[0]
123 for project in [self.bitbake, self.doc, self.oe, self.poky]: 123 for project in [self.bitbake, self.doc, self.oe, self.poky]:
124 if base_path in project.paths: 124 if base_path in project.paths:
125 self.fail('Series sent to the wrong mailing list or some patches from the series correspond to different mailing lists. Send the series again to the correct mailing list (ML)', 125 self.fail('Series sent to the wrong mailing list or some patches from the series correspond to different mailing lists',
126 data=[('Suggested ML', '%s [%s]' % (project.listemail, project.gitrepo)), 126 data=[('Suggested ML', '%s [%s]' % (project.listemail, project.gitrepo)),
127 ('Patch\'s path:', patch.path)]) 127 ('Patch\'s path:', patch.path)])
128 128
@@ -130,18 +130,18 @@ class TestMbox(base.Base):
130 if base_path.startswith('scripts'): 130 if base_path.startswith('scripts'):
131 for poky_file in self.poky_scripts: 131 for poky_file in self.poky_scripts:
132 if patch.path.startswith(poky_file): 132 if patch.path.startswith(poky_file):
133 self.fail('Series sent to the wrong mailing list or some patches from the series correspond to different mailing lists. Send the series again to the correct mailing list (ML)', 133 self.fail('Series sent to the wrong mailing list or some patches from the series correspond to different mailing lists',
134 data=[('Suggested ML', '%s [%s]' % (self.poky.listemail, self.poky.gitrepo)),('Patch\'s path:', patch.path)]) 134 data=[('Suggested ML', '%s [%s]' % (self.poky.listemail, self.poky.gitrepo)),('Patch\'s path:', patch.path)])
135 135
136 def test_mbox_format(self): 136 def test_mbox_format(self):
137 if self.unidiff_parse_error: 137 if self.unidiff_parse_error:
138 self.fail('Series cannot be parsed correctly due to malformed diff lines. Create the series again using git-format-patch and ensure it can be applied using git am', 138 self.fail('Series has malformed diff lines. Create the series again using git-format-patch and ensure it applies using git am',
139 data=[('Diff line',self.unidiff_parse_error)]) 139 data=[('Diff line',self.unidiff_parse_error)])
140 140
141 def test_commit_message_presence(self): 141 def test_commit_message_presence(self):
142 for commit in TestMbox.commits: 142 for commit in TestMbox.commits:
143 if not commit.commit_message.strip(): 143 if not commit.commit_message.strip():
144 self.fail('Mbox is missing a descriptive commit message. Please include a commit message on your patch explaining the change', commit=commit) 144 self.fail('Please include a commit message on your patch explaining the change', commit=commit)
145 145
146 def test_cve_presence_in_commit_message(self): 146 def test_cve_presence_in_commit_message(self):
147 if self.unidiff_parse_error: 147 if self.unidiff_parse_error:
@@ -161,7 +161,7 @@ class TestMbox(base.Base):
161 if not self.patch_prog.search_string(commit.payload): 161 if not self.patch_prog.search_string(commit.payload):
162 self.skip("No CVE tag in added patch, so not needed in mbox") 162 self.skip("No CVE tag in added patch, so not needed in mbox")
163 elif not self.prog.search_string(commit.payload): 163 elif not self.prog.search_string(commit.payload):
164 self.fail('Missing or incorrectly formatted CVE tag in mbox. Correct or include the CVE tag in the mbox with format: "CVE: CVE-YYYY-XXXX"', 164 self.fail('A CVE tag should be provided in the commit message with format: "CVE: CVE-YYYY-XXXX"',
165 commit=commit) 165 commit=commit)
166 166
167 def test_bugzilla_entry_format(self): 167 def test_bugzilla_entry_format(self):