diff options
author | Trevor Gamblin <tgamblin@baylibre.com> | 2023-10-12 09:24:58 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-10-13 11:53:06 +0100 |
commit | 2fdabc368a52a9bf60f76f33e92b94de843688a8 (patch) | |
tree | 1a9ab2e980cc66a656692bf4b450dd0b3156d6a0 /meta/lib/patchtest | |
parent | 575b00dca5a9ae15b0eec7c8eea3c415c2a37bc1 (diff) | |
download | poky-2fdabc368a52a9bf60f76f33e92b94de843688a8.tar.gz |
patchtest: improve test issue messages
The patchtest tests provide vague feedback to the user, and many of them
also provide redundant 'fix' strings that could easily be incorporated
into the issue messages themselves. Simplify them so that it is more
clear what the errors are and how they can be addressed. No
recommendation is given when the issue string adequately conveys the
issue, e.g. with a missing "LICENSE" entry in a newly-created recipe.
(From OE-Core rev: 0bfb3614244ec7aa79b6424bc63f9f2bccdabe98)
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/patchtest')
18 files changed, 29 insertions, 52 deletions
diff --git a/meta/lib/patchtest/tests/test_mbox_author.py b/meta/lib/patchtest/tests/test_mbox_author.py index 6c79f164d4..fb8f10e1fd 100644 --- a/meta/lib/patchtest/tests/test_mbox_author.py +++ b/meta/lib/patchtest/tests/test_mbox_author.py | |||
@@ -21,9 +21,9 @@ class Author(base.Base): | |||
21 | for commit in self.commits: | 21 | for commit in self.commits: |
22 | for invalid in self.invalids: | 22 | for invalid in self.invalids: |
23 | if invalid.search(commit.author): | 23 | if invalid.search(commit.author): |
24 | self.fail('Invalid author %s' % commit.author, 'Resend the series with a valid patch\'s author', commit) | 24 | self.fail('Invalid author %s. Resend the series with a valid patch author' % commit.author, commit=commit) |
25 | 25 | ||
26 | def test_non_auh_upgrade(self): | 26 | def test_non_auh_upgrade(self): |
27 | for commit in self.commits: | 27 | for commit in self.commits: |
28 | if self.auh_email in commit.payload: | 28 | if self.auh_email in commit.payload: |
29 | self.fail('Invalid author %s in commit message' % self.auh_email, 'Resend the series with a valid patch\'s author', commit) | 29 | self.fail('Invalid author %s. Resend the series with a valid patch author' % self.auh_email, commit=commit) |
diff --git a/meta/lib/patchtest/tests/test_mbox_bugzilla.py b/meta/lib/patchtest/tests/test_mbox_bugzilla.py index e8de48bb8d..aa53b77f87 100644 --- a/meta/lib/patchtest/tests/test_mbox_bugzilla.py +++ b/meta/lib/patchtest/tests/test_mbox_bugzilla.py | |||
@@ -16,7 +16,5 @@ class Bugzilla(base.Base): | |||
16 | for line in commit.commit_message.splitlines(): | 16 | for line in commit.commit_message.splitlines(): |
17 | if self.rexp_detect.match(line): | 17 | if self.rexp_detect.match(line): |
18 | if not self.rexp_validation.match(line): | 18 | if not self.rexp_validation.match(line): |
19 | self.fail('Yocto Project bugzilla tag is not correctly formatted', | 19 | self.fail('Bugzilla issue ID is not correctly formatted - specify it with format: "[YOCTO #<bugzilla ID>]"', commit=commit) |
20 | 'Specify bugzilla ID in commit description with format: "[YOCTO #<bugzilla ID>]"', | ||
21 | commit) | ||
22 | 20 | ||
diff --git a/meta/lib/patchtest/tests/test_mbox_cve.py b/meta/lib/patchtest/tests/test_mbox_cve.py index f99194c094..36548aa10c 100644 --- a/meta/lib/patchtest/tests/test_mbox_cve.py +++ b/meta/lib/patchtest/tests/test_mbox_cve.py | |||
@@ -44,6 +44,5 @@ class CVE(base.Base): | |||
44 | if self.revert_shortlog_regex.match(commit.shortlog): | 44 | if self.revert_shortlog_regex.match(commit.shortlog): |
45 | continue | 45 | continue |
46 | if not self.prog.search_string(commit.payload): | 46 | if not self.prog.search_string(commit.payload): |
47 | self.fail('Missing or incorrectly formatted CVE tag in mbox', | 47 | 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"', |
48 | 'Correct or include the CVE tag in the mbox with format: "CVE: CVE-YYYY-XXXX"', | 48 | commit=commit) |
49 | commit) | ||
diff --git a/meta/lib/patchtest/tests/test_mbox_description.py b/meta/lib/patchtest/tests/test_mbox_description.py index 7addc6b5f7..46bedd46ce 100644 --- a/meta/lib/patchtest/tests/test_mbox_description.py +++ b/meta/lib/patchtest/tests/test_mbox_description.py | |||
@@ -11,7 +11,5 @@ class CommitMessage(base.Base): | |||
11 | def test_commit_message_presence(self): | 11 | def test_commit_message_presence(self): |
12 | for commit in CommitMessage.commits: | 12 | for commit in CommitMessage.commits: |
13 | if not commit.commit_message.strip(): | 13 | if not commit.commit_message.strip(): |
14 | self.fail('Patch is missing a descriptive commit message', | 14 | self.fail('Mbox is missing a descriptive commit message. Please include a commit message on your patch explaining the change', commit=commit) |
15 | 'Please include a commit message on your patch explaining the change (most importantly why the change is being made)', | ||
16 | commit) | ||
17 | 15 | ||
diff --git a/meta/lib/patchtest/tests/test_mbox_format.py b/meta/lib/patchtest/tests/test_mbox_format.py index 85c452ca0d..42a8491a09 100644 --- a/meta/lib/patchtest/tests/test_mbox_format.py +++ b/meta/lib/patchtest/tests/test_mbox_format.py | |||
@@ -11,6 +11,5 @@ class MboxFormat(base.Base): | |||
11 | 11 | ||
12 | def test_mbox_format(self): | 12 | def test_mbox_format(self): |
13 | if self.unidiff_parse_error: | 13 | if self.unidiff_parse_error: |
14 | self.fail('Series cannot be parsed correctly due to malformed diff lines', | 14 | 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', |
15 | 'Create the series again using git-format-patch and ensure it can be applied using git am', | ||
16 | data=[('Diff line', re.sub('^.+:\s(?<!$)','',self.unidiff_parse_error))]) | 15 | data=[('Diff line', re.sub('^.+:\s(?<!$)','',self.unidiff_parse_error))]) |
diff --git a/meta/lib/patchtest/tests/test_mbox_mailinglist.py b/meta/lib/patchtest/tests/test_mbox_mailinglist.py index de38e205b1..1f9e0be07f 100644 --- a/meta/lib/patchtest/tests/test_mbox_mailinglist.py +++ b/meta/lib/patchtest/tests/test_mbox_mailinglist.py | |||
@@ -43,16 +43,15 @@ class MailingList(base.Base): | |||
43 | for commit in MailingList.commits: | 43 | for commit in MailingList.commits: |
44 | match = project_regex.match(commit.subject) | 44 | match = project_regex.match(commit.subject) |
45 | if match: | 45 | if match: |
46 | self.fail('Series sent to the wrong mailing list', | 46 | 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'), |
47 | 'Check the project\'s README (%s) and send the patch to the indicated list' % match.group('project'), | 47 | commit=commit) |
48 | commit) | ||
49 | 48 | ||
50 | for patch in self.patchset: | 49 | for patch in self.patchset: |
51 | folders = patch.path.split('/') | 50 | folders = patch.path.split('/') |
52 | base_path = folders[0] | 51 | base_path = folders[0] |
53 | for project in [self.bitbake, self.doc, self.oe, self.poky]: | 52 | for project in [self.bitbake, self.doc, self.oe, self.poky]: |
54 | if base_path in project.paths: | 53 | if base_path in project.paths: |
55 | 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)', | 54 | 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)', |
56 | data=[('Suggested ML', '%s [%s]' % (project.listemail, project.gitrepo)), | 55 | data=[('Suggested ML', '%s [%s]' % (project.listemail, project.gitrepo)), |
57 | ('Patch\'s path:', patch.path)]) | 56 | ('Patch\'s path:', patch.path)]) |
58 | 57 | ||
@@ -60,5 +59,5 @@ class MailingList(base.Base): | |||
60 | if base_path.startswith('scripts'): | 59 | if base_path.startswith('scripts'): |
61 | for poky_file in self.poky_scripts: | 60 | for poky_file in self.poky_scripts: |
62 | if patch.path.startswith(poky_file): | 61 | if patch.path.startswith(poky_file): |
63 | 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)', | 62 | 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)', |
64 | data=[('Suggested ML', '%s [%s]' % (self.poky.listemail, self.poky.gitrepo)),('Patch\'s path:', patch.path)]) | 63 | data=[('Suggested ML', '%s [%s]' % (self.poky.listemail, self.poky.gitrepo)),('Patch\'s path:', patch.path)]) |
diff --git a/meta/lib/patchtest/tests/test_mbox_merge.py b/meta/lib/patchtest/tests/test_mbox_merge.py index c8b6718d15..a7e0821e72 100644 --- a/meta/lib/patchtest/tests/test_mbox_merge.py +++ b/meta/lib/patchtest/tests/test_mbox_merge.py | |||
@@ -20,6 +20,5 @@ class Merge(base.Base): | |||
20 | def test_series_merge_on_head(self): | 20 | def test_series_merge_on_head(self): |
21 | if not PatchTestInput.repo.ismerged: | 21 | if not PatchTestInput.repo.ismerged: |
22 | commithash, author, date, shortlog = headlog() | 22 | commithash, author, date, shortlog = headlog() |
23 | self.fail('Series does not apply on top of target branch', | 23 | self.fail('Series does not apply on top of target branch. Rebase your series and ensure the target is correct', |
24 | 'Rebase your series on top of targeted branch', | ||
25 | data=[('Targeted branch', '%s (currently at %s)' % (PatchTestInput.repo.branch, commithash))]) | 24 | data=[('Targeted branch', '%s (currently at %s)' % (PatchTestInput.repo.branch, commithash))]) |
diff --git a/meta/lib/patchtest/tests/test_mbox_shortlog.py b/meta/lib/patchtest/tests/test_mbox_shortlog.py index b6c2a209ff..7cc71562f6 100644 --- a/meta/lib/patchtest/tests/test_mbox_shortlog.py +++ b/meta/lib/patchtest/tests/test_mbox_shortlog.py | |||
@@ -24,9 +24,8 @@ class Shortlog(base.Base): | |||
24 | try: | 24 | try: |
25 | parse_shortlog.shortlog.parseString(shortlog) | 25 | parse_shortlog.shortlog.parseString(shortlog) |
26 | except pyparsing.ParseException as pe: | 26 | except pyparsing.ParseException as pe: |
27 | self.fail('Shortlog does not follow expected format', | 27 | self.fail('Commit shortlog (first line of commit message) should follow the format "<target>: <summary>"', |
28 | 'Commit shortlog (first line of commit message) should follow the format "<target>: <summary>"', | 28 | commit=commit) |
29 | commit) | ||
30 | 29 | ||
31 | def test_shortlog_length(self): | 30 | def test_shortlog_length(self): |
32 | for commit in Shortlog.commits: | 31 | for commit in Shortlog.commits: |
@@ -36,6 +35,5 @@ class Shortlog(base.Base): | |||
36 | continue | 35 | continue |
37 | l = len(shortlog) | 36 | l = len(shortlog) |
38 | if l > maxlength: | 37 | if l > maxlength: |
39 | self.fail('Commit shortlog is too long', | 38 | self.fail('Edit shortlog so that it is %d characters or less (currently %d characters)' % (maxlength, l), |
40 | 'Edit shortlog so that it is %d characters or less (currently %d characters)' % (maxlength, l), | 39 | commit=commit) |
41 | commit) | ||
diff --git a/meta/lib/patchtest/tests/test_mbox_signed_off_by.py b/meta/lib/patchtest/tests/test_mbox_signed_off_by.py index 6458951f1c..8fd705a2ef 100644 --- a/meta/lib/patchtest/tests/test_mbox_signed_off_by.py +++ b/meta/lib/patchtest/tests/test_mbox_signed_off_by.py | |||
@@ -23,6 +23,5 @@ class SignedOffBy(base.Base): | |||
23 | if self.revert_shortlog_regex.match(commit.shortlog): | 23 | if self.revert_shortlog_regex.match(commit.shortlog): |
24 | continue | 24 | continue |
25 | if not SignedOffBy.prog.search_string(commit.payload): | 25 | if not SignedOffBy.prog.search_string(commit.payload): |
26 | self.fail('Patch is missing Signed-off-by', | 26 | self.fail('Mbox is missing Signed-off-by. Add it manually or with "git commit --amend -s"', |
27 | 'Sign off the patch (either manually or with "git commit --amend -s")', | 27 | commit=commit) |
28 | commit) | ||
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 e9a5b6bb4e..a25a65c6db 100644 --- a/meta/lib/patchtest/tests/test_metadata_lic_files_chksum.py +++ b/meta/lib/patchtest/tests/test_metadata_lic_files_chksum.py | |||
@@ -34,8 +34,7 @@ class LicFilesChkSum(base.Metadata): | |||
34 | if rd.getVar(self.license) == self.closed: | 34 | if rd.getVar(self.license) == self.closed: |
35 | continue | 35 | continue |
36 | if not lic_files_chksum: | 36 | if not lic_files_chksum: |
37 | self.fail('%s is missing in newly added recipe' % self.metadata, | 37 | self.fail('%s is missing in newly added recipe' % self.metadata) |
38 | 'Specify the variable %s in %s' % (self.metadata, pn)) | ||
39 | 38 | ||
40 | def pretest_lic_files_chksum_modified_not_mentioned(self): | 39 | def pretest_lic_files_chksum_modified_not_mentioned(self): |
41 | if not self.modified: | 40 | if not self.modified: |
@@ -77,6 +76,5 @@ class LicFilesChkSum(base.Metadata): | |||
77 | if self.lictag_re.search(commit.commit_message): | 76 | if self.lictag_re.search(commit.commit_message): |
78 | break | 77 | break |
79 | else: | 78 | else: |
80 | self.fail('LIC_FILES_CHKSUM changed on target %s but there is no "%s" tag in commit message' % (pn, self.lictag), | 79 | 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), |
81 | 'Include "%s: <description>" into the commit message with a brief description' % self.lictag, | ||
82 | data=[('Current checksum', pretest), ('New checksum', test)]) | 80 | data=[('Current checksum', pretest), ('New checksum', test)]) |
diff --git a/meta/lib/patchtest/tests/test_metadata_license.py b/meta/lib/patchtest/tests/test_metadata_license.py index 16604dbfb1..e49331603c 100644 --- a/meta/lib/patchtest/tests/test_metadata_license.py +++ b/meta/lib/patchtest/tests/test_metadata_license.py | |||
@@ -51,5 +51,5 @@ class License(base.Metadata): | |||
51 | fd.write(''.join(lines[:-1])) | 51 | fd.write(''.join(lines[:-1])) |
52 | 52 | ||
53 | if no_license: | 53 | if no_license: |
54 | self.fail('Recipe does not have the LICENSE field set', 'Include a LICENSE into the new recipe') | 54 | self.fail('Recipe does not have the LICENSE field set.') |
55 | 55 | ||
diff --git a/meta/lib/patchtest/tests/test_metadata_max_length.py b/meta/lib/patchtest/tests/test_metadata_max_length.py index 04a5e23469..b3a5dc9b79 100644 --- a/meta/lib/patchtest/tests/test_metadata_max_length.py +++ b/meta/lib/patchtest/tests/test_metadata_max_length.py | |||
@@ -21,6 +21,5 @@ class MaxLength(base.Base): | |||
21 | if self.add_mark.match(line): | 21 | if self.add_mark.match(line): |
22 | current_line_length = len(line[1:]) | 22 | current_line_length = len(line[1:]) |
23 | if current_line_length > self.max_length: | 23 | if current_line_length > self.max_length: |
24 | self.fail('Patch line too long (current length %s)' % current_line_length, | 24 | self.fail('Patch line too long (current length %s, maximum is %s)' % (current_line_length, self.max_length), |
25 | 'Shorten the corresponding patch line (max length supported %s)' % self.max_length, | ||
26 | data=[('Patch', patch.path), ('Line', '%s ...' % line[0:80])]) | 25 | data=[('Patch', patch.path), ('Line', '%s ...' % line[0:80])]) |
diff --git a/meta/lib/patchtest/tests/test_metadata_src_uri.py b/meta/lib/patchtest/tests/test_metadata_src_uri.py index 718229d7ad..ce2ace17bb 100644 --- a/meta/lib/patchtest/tests/test_metadata_src_uri.py +++ b/meta/lib/patchtest/tests/test_metadata_src_uri.py | |||
@@ -69,7 +69,6 @@ class SrcUri(base.Metadata): | |||
69 | # TODO: we are not taking into account renames, so test may raise false positives | 69 | # TODO: we are not taking into account renames, so test may raise false positives |
70 | not_removed = filesremoved_from_usr_uri - filesremoved_from_patchset | 70 | not_removed = filesremoved_from_usr_uri - filesremoved_from_patchset |
71 | if not_removed: | 71 | if not_removed: |
72 | self.fail('Patches not removed from tree', | 72 | self.fail('Patches not removed from tree. Remove them and amend the submitted mbox', |
73 | 'Amend the patch containing the software patch file removal', | ||
74 | data=[('Patch', f) for f in not_removed]) | 73 | data=[('Patch', f) for f in not_removed]) |
75 | 74 | ||
diff --git a/meta/lib/patchtest/tests/test_metadata_summary.py b/meta/lib/patchtest/tests/test_metadata_summary.py index 931b26768e..8bcea453c2 100644 --- a/meta/lib/patchtest/tests/test_metadata_summary.py +++ b/meta/lib/patchtest/tests/test_metadata_summary.py | |||
@@ -28,5 +28,4 @@ class Summary(base.Metadata): | |||
28 | 28 | ||
29 | # "${PN} version ${PN}-${PR}" is the default, so fail if default | 29 | # "${PN} version ${PN}-${PR}" is the default, so fail if default |
30 | if summary.startswith('%s version' % pn): | 30 | if summary.startswith('%s version' % pn): |
31 | self.fail('%s is missing in newly added recipe' % self.metadata, | 31 | self.fail('%s is missing in newly added recipe' % self.metadata) |
32 | 'Specify the variable %s in %s' % (self.metadata, pn)) | ||
diff --git a/meta/lib/patchtest/tests/test_patch_cve.py b/meta/lib/patchtest/tests/test_patch_cve.py index 46ed9ef791..144e130707 100644 --- a/meta/lib/patchtest/tests/test_patch_cve.py +++ b/meta/lib/patchtest/tests/test_patch_cve.py | |||
@@ -46,6 +46,5 @@ class CVE(base.Base): | |||
46 | tag_found = True | 46 | tag_found = True |
47 | break | 47 | break |
48 | if not tag_found: | 48 | if not tag_found: |
49 | self.fail('Missing or incorrectly formatted CVE tag in included patch file', | 49 | self.fail('Missing or incorrectly formatted CVE tag in patch file. Correct or include the CVE tag in the patch with format: "CVE: CVE-YYYY-XXXX"', |
50 | 'Correct or include the CVE tag on cve patch with format: "CVE: CVE-YYYY-XXXX"', | 50 | commit=commit) |
51 | commit) | ||
diff --git a/meta/lib/patchtest/tests/test_patch_signed_off_by.py b/meta/lib/patchtest/tests/test_patch_signed_off_by.py index 4855d6daf7..5892033af0 100644 --- a/meta/lib/patchtest/tests/test_patch_signed_off_by.py +++ b/meta/lib/patchtest/tests/test_patch_signed_off_by.py | |||
@@ -39,5 +39,4 @@ class PatchSignedOffBy(base.Base): | |||
39 | if PatchSignedOffBy.prog.search_string(payload): | 39 | if PatchSignedOffBy.prog.search_string(payload): |
40 | break | 40 | break |
41 | else: | 41 | else: |
42 | self.fail('A patch file has been added, but does not have a Signed-off-by tag', | 42 | self.fail('A patch file has been added, but does not have a Signed-off-by tag. Sign off the added patch file (%s)' % newpatch.path) |
43 | 'Sign off the added patch file (%s)' % newpatch.path) | ||
diff --git a/meta/lib/patchtest/tests/test_patch_upstream_status.py b/meta/lib/patchtest/tests/test_patch_upstream_status.py index eda5353c66..c21aeaf28f 100644 --- a/meta/lib/patchtest/tests/test_patch_upstream_status.py +++ b/meta/lib/patchtest/tests/test_patch_upstream_status.py | |||
@@ -34,8 +34,7 @@ class PatchUpstreamStatus(base.Base): | |||
34 | for newpatch in PatchUpstreamStatus.newpatches: | 34 | for newpatch in PatchUpstreamStatus.newpatches: |
35 | payload = newpatch.__str__() | 35 | payload = newpatch.__str__() |
36 | if not self.upstream_status_regex.search_string(payload): | 36 | if not self.upstream_status_regex.search_string(payload): |
37 | self.fail('Added patch file is missing Upstream-Status in the header', | 37 | self.fail('Added patch file is missing Upstream-Status in the header. Add Upstream-Status: <Valid status> to the header', |
38 | 'Add Upstream-Status: <Valid status> to the header of %s' % newpatch.path, | ||
39 | data=[('Standard format', self.standard_format), ('Valid status', self.valid_status)]) | 38 | data=[('Standard format', self.standard_format), ('Valid status', self.valid_status)]) |
40 | for line in payload.splitlines(): | 39 | for line in payload.splitlines(): |
41 | if self.patchmetadata_regex.match(line): | 40 | if self.patchmetadata_regex.match(line): |
@@ -46,19 +45,16 @@ class PatchUpstreamStatus(base.Base): | |||
46 | parse_upstream_status.upstream_status_inappropriate_info.parseString(line.lstrip('+')) | 45 | parse_upstream_status.upstream_status_inappropriate_info.parseString(line.lstrip('+')) |
47 | except pyparsing.ParseException as pe: | 46 | except pyparsing.ParseException as pe: |
48 | self.fail('Upstream-Status is Inappropriate, but no reason was provided', | 47 | self.fail('Upstream-Status is Inappropriate, but no reason was provided', |
49 | 'Include a brief reason why %s is inappropriate' % os.path.basename(newpatch.path), | ||
50 | data=[('Current', pe.pstr), ('Standard format', 'Upstream-Status: Inappropriate [reason]')]) | 48 | data=[('Current', pe.pstr), ('Standard format', 'Upstream-Status: Inappropriate [reason]')]) |
51 | elif parse_upstream_status.submitted_status_mark.searchString(line): | 49 | elif parse_upstream_status.submitted_status_mark.searchString(line): |
52 | try: | 50 | try: |
53 | parse_upstream_status.upstream_status_submitted_info.parseString(line.lstrip('+')) | 51 | parse_upstream_status.upstream_status_submitted_info.parseString(line.lstrip('+')) |
54 | except pyparsing.ParseException as pe: | 52 | except pyparsing.ParseException as pe: |
55 | self.fail('Upstream-Status is Submitted, but it is not mentioned where', | 53 | self.fail('Upstream-Status is Submitted, but it is not mentioned where', |
56 | 'Include where %s was submitted' % os.path.basename(newpatch.path), | ||
57 | data=[('Current', pe.pstr), ('Standard format', 'Upstream-Status: Submitted [where]')]) | 54 | data=[('Current', pe.pstr), ('Standard format', 'Upstream-Status: Submitted [where]')]) |
58 | else: | 55 | else: |
59 | try: | 56 | try: |
60 | parse_upstream_status.upstream_status.parseString(line.lstrip('+')) | 57 | parse_upstream_status.upstream_status.parseString(line.lstrip('+')) |
61 | except pyparsing.ParseException as pe: | 58 | except pyparsing.ParseException as pe: |
62 | self.fail('Upstream-Status is in incorrect format', | 59 | self.fail('Upstream-Status is in incorrect format', |
63 | 'Fix Upstream-Status format in %s' % os.path.basename(newpatch.path), | ||
64 | data=[('Current', pe.pstr), ('Standard format', self.standard_format), ('Valid status', self.valid_status)]) | 60 | data=[('Current', pe.pstr), ('Standard format', self.standard_format), ('Valid status', self.valid_status)]) |
diff --git a/meta/lib/patchtest/tests/test_python_pylint.py b/meta/lib/patchtest/tests/test_python_pylint.py index ea8efb7c2a..907bd9eef4 100644 --- a/meta/lib/patchtest/tests/test_python_pylint.py +++ b/meta/lib/patchtest/tests/test_python_pylint.py | |||
@@ -56,6 +56,5 @@ class PyLint(base.Base): | |||
56 | 56 | ||
57 | for issue in self.pylint_test: | 57 | for issue in self.pylint_test: |
58 | if self.pylint_test[issue] not in self.pylint_pretest.values(): | 58 | if self.pylint_test[issue] not in self.pylint_pretest.values(): |
59 | self.fail('Errors in your Python code were encountered', | 59 | self.fail('Errors in your Python code were encountered. Please check your code with a linter and resubmit', |
60 | 'Correct the lines introduced by your patch', | ||
61 | data=[('Output', 'Please, fix the listed issues:'), ('', issue + ' ' + self.pylint_test[issue])]) | 60 | data=[('Output', 'Please, fix the listed issues:'), ('', issue + ' ' + self.pylint_test[issue])]) |