aboutsummaryrefslogtreecommitdiff
path: root/contrib/mklog.py
diff options
context:
space:
mode:
authorTobias Burnus <tobias@codesourcery.com>2020-09-21 11:22:49 +0200
committerTobias Burnus <tobias@codesourcery.com>2020-09-21 11:22:49 +0200
commited5ae55e939d3add275930d7999d88f69f607f3d (patch)
tree521a59bb503caf19aef9a51844ae6c504425fb38 /contrib/mklog.py
parentf5e73de00e9c853ce65333efada7409b0d00f758 (diff)
downloadgcc-ed5ae55e939d3add275930d7999d88f69f607f3d.zip
gcc-ed5ae55e939d3add275930d7999d88f69f607f3d.tar.gz
gcc-ed5ae55e939d3add275930d7999d88f69f607f3d.tar.bz2
mklog.py: Parse first 10 lines for PR/DR number
contrib/ChangeLog: * mklog.py: Parse first 10 lines for PR/DR number not only the first line.
Diffstat (limited to 'contrib/mklog.py')
-rwxr-xr-xcontrib/mklog.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/contrib/mklog.py b/contrib/mklog.py
index 243edbb..1e85dfe 100755
--- a/contrib/mklog.py
+++ b/contrib/mklog.py
@@ -38,6 +38,7 @@ from unidiff import PatchSet
pr_regex = re.compile(r'(\/(\/|\*)|[Cc*!])\s+(?P<pr>PR [a-z+-]+\/[0-9]+)')
dr_regex = re.compile(r'(\/(\/|\*)|[Cc*!])\s+(?P<dr>DR [0-9]+)')
+dg_regex = re.compile(r'{\s+dg-(error|warning)')
identifier_regex = re.compile(r'^([a-zA-Z0-9_#].*)')
comment_regex = re.compile(r'^\/\*')
struct_regex = re.compile(r'^(class|struct|union|enum)\s+'
@@ -137,7 +138,10 @@ def generate_changelog(data, no_functions=False, fill_pr_titles=False):
# Extract PR entries from newly added tests
if 'testsuite' in file.path and file.is_added_file:
- for line in list(file)[0]:
+ # Only search first ten lines as later lines may
+ # contains commented code which a note that it
+ # has not been tested due to a certain PR or DR.
+ for line in list(file)[0][0:10]:
m = pr_regex.search(line.value)
if m:
pr = m.group('pr')
@@ -149,7 +153,8 @@ def generate_changelog(data, no_functions=False, fill_pr_titles=False):
dr = m.group('dr')
if dr not in prs:
prs.append(dr)
- else:
+ elif dg_regex.search(line.value):
+ # Found dg-warning/dg-error line
break
if fill_pr_titles: