summaryrefslogtreecommitdiffstats
path: root/meta/lib/patchtest/tests/test_mbox_shortlog.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/patchtest/tests/test_mbox_shortlog.py')
-rw-r--r--meta/lib/patchtest/tests/test_mbox_shortlog.py39
1 files changed, 0 insertions, 39 deletions
diff --git a/meta/lib/patchtest/tests/test_mbox_shortlog.py b/meta/lib/patchtest/tests/test_mbox_shortlog.py
deleted file mode 100644
index f5dbbc7807..0000000000
--- a/meta/lib/patchtest/tests/test_mbox_shortlog.py
+++ /dev/null
@@ -1,39 +0,0 @@
1# Checks related to the patch's summary
2#
3# Copyright (C) 2016 Intel Corporation
4#
5# SPDX-License-Identifier: GPL-2.0-only
6
7import base
8import parse_shortlog
9import pyparsing
10
11maxlength = 90
12
13class Shortlog(base.Base):
14
15 def test_shortlog_format(self):
16 for commit in Shortlog.commits:
17 shortlog = commit.shortlog
18 if not shortlog.strip():
19 self.skip('Empty shortlog, no reason to execute shortlog format test')
20 else:
21 # no reason to re-check on revert shortlogs
22 if shortlog.startswith('Revert "'):
23 continue
24 try:
25 parse_shortlog.shortlog.parseString(shortlog)
26 except pyparsing.ParseException as pe:
27 self.fail('Commit shortlog (first line of commit message) should follow the format "<target>: <summary>"',
28 commit=commit)
29
30 def test_shortlog_length(self):
31 for commit in Shortlog.commits:
32 # no reason to re-check on revert shortlogs
33 shortlog = commit.shortlog
34 if shortlog.startswith('Revert "'):
35 continue
36 l = len(shortlog)
37 if l > maxlength:
38 self.fail('Edit shortlog so that it is %d characters or less (currently %d characters)' % (maxlength, l),
39 commit=commit)