summaryrefslogtreecommitdiffstats
path: root/meta/lib/patchtest/tests/test_patch.py
diff options
context:
space:
mode:
authorTrevor Gamblin <tgamblin@baylibre.com>2023-11-29 09:32:41 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-12-04 11:23:37 +0000
commit5c1070e258685730fac6238f8f425ad2cc4a120e (patch)
tree97075e24306600be954102fc16ddaba3d877a53f /meta/lib/patchtest/tests/test_patch.py
parent2a888143420c34124f1e372896d431d69682b083 (diff)
downloadpoky-5c1070e258685730fac6238f8f425ad2cc4a120e.tar.gz
patchtest: shorten patch signed-off-by test output
The patch Signed-off-by test's output line is excessively long, and can trigger a failsafe in the patchtest automated service's email content generation. Shorten the output by reducing redundant phrasing and using os.path.basename to get only the failing patch's name, not the entire path, as the submitter should have a good idea of where it is located regardless. (From OE-Core rev: cc7546ded87dd44a988d7a23f1d7645094b5cdd4) Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/patchtest/tests/test_patch.py')
-rw-r--r--meta/lib/patchtest/tests/test_patch.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/lib/patchtest/tests/test_patch.py b/meta/lib/patchtest/tests/test_patch.py
index 65d0f930b0..d7187a0cb1 100644
--- a/meta/lib/patchtest/tests/test_patch.py
+++ b/meta/lib/patchtest/tests/test_patch.py
@@ -6,6 +6,7 @@
6# 6#
7 7
8import base 8import base
9import os
9import parse_signed_off_by 10import parse_signed_off_by
10import parse_upstream_status 11import parse_upstream_status
11import pyparsing 12import pyparsing
@@ -87,7 +88,7 @@ class TestPatch(base.Base):
87 if TestPatch.prog.search_string(payload): 88 if TestPatch.prog.search_string(payload):
88 break 89 break
89 else: 90 else:
90 self.fail('A patch file has been added without a Signed-off-by tag. Sign off the added patch file (%s)' % newpatch.path) 91 self.fail('A patch file has been added without a Signed-off-by tag: \'%s\'' % os.path.basename(newpatch.path))
91 92
92 def test_cve_tag_format(self): 93 def test_cve_tag_format(self):
93 for commit in TestPatch.commits: 94 for commit in TestPatch.commits: