[gcc(refs/users/guojiufu/heads/guojiufu-branch)] git_commit.py: Add tests for signatures.
Jiu Fu Guo
guojiufu@gcc.gnu.org
Wed Jun 10 02:58:48 GMT 2020
https://gcc.gnu.org/g:29c34351be83bc84238cbc8c3c8818c0f46cef38
commit 29c34351be83bc84238cbc8c3c8818c0f46cef38
Author: Martin Liska <mliska@suse.cz>
Date: Wed May 20 11:05:23 2020 +0200
git_commit.py: Add tests for signatures.
* gcc-changelog/git_commit.py: Refactor to make flake8 happy.
* gcc-changelog/test_email.py: Add new test.
* gcc-changelog/test_patches.txt: Add new patch.
Diff:
---
contrib/ChangeLog | 6 ++++++
contrib/gcc-changelog/git_commit.py | 4 ++--
contrib/gcc-changelog/test_email.py | 5 +++++
contrib/gcc-changelog/test_patches.txt | 34 ++++++++++++++++++++++++++++++++++
4 files changed, 47 insertions(+), 2 deletions(-)
diff --git a/contrib/ChangeLog b/contrib/ChangeLog
index faa56374669..11f47e69799 100644
--- a/contrib/ChangeLog
+++ b/contrib/ChangeLog
@@ -1,3 +1,9 @@
+2020-05-20 Martin Liska <mliska@suse.cz>
+
+ * gcc-changelog/git_commit.py: Refactor to make flake8 happy.
+ * gcc-changelog/test_email.py: Add new test.
+ * gcc-changelog/test_patches.txt: Add new patch.
+
2020-05-20 Frederik Harwath <frederik@codesourcery.com>
* gcc-changelog/git_commit.py: Skip over lines starting
diff --git a/contrib/gcc-changelog/git_commit.py b/contrib/gcc-changelog/git_commit.py
index c9b849706c4..e4903cac4ef 100755
--- a/contrib/gcc-changelog/git_commit.py
+++ b/contrib/gcc-changelog/git_commit.py
@@ -155,9 +155,10 @@ REVIEWED_BY_PREFIX = 'reviewed-by: '
REVIEWED_ON_PREFIX = 'reviewed-on: '
SIGNED_OFF_BY_PREFIX = 'signed-off-by: '
-REVIEW_PREFIXES = (REVIEWED_BY_PREFIX, REVIEWED_ON_PREFIX,\
+REVIEW_PREFIXES = (REVIEWED_BY_PREFIX, REVIEWED_ON_PREFIX,
SIGNED_OFF_BY_PREFIX)
+
class Error:
def __init__(self, message, line=None):
self.message = message
@@ -350,7 +351,6 @@ class GitCommit:
else:
pr_line = line.lstrip()
-
lowered_line = line.lower()
if lowered_line.startswith(CO_AUTHORED_BY_PREFIX):
name = line[len(CO_AUTHORED_BY_PREFIX):]
diff --git a/contrib/gcc-changelog/test_email.py b/contrib/gcc-changelog/test_email.py
index 5e99d3240e8..92bcb89ed8b 100755
--- a/contrib/gcc-changelog/test_email.py
+++ b/contrib/gcc-changelog/test_email.py
@@ -262,3 +262,8 @@ class TestGccChangelog(unittest.TestCase):
def test_cherry_pick_format(self):
email = self.from_patch_glob('0001-c-Alias.patch')
assert not email.errors
+
+ def test_signatures(self):
+ email = self.from_patch_glob('0001-RISC-V-Make-unique.patch')
+ assert not email.errors
+ assert len(email.changelog_entries) == 1
diff --git a/contrib/gcc-changelog/test_patches.txt b/contrib/gcc-changelog/test_patches.txt
index ec667be9a92..7a78c4de897 100644
--- a/contrib/gcc-changelog/test_patches.txt
+++ b/contrib/gcc-changelog/test_patches.txt
@@ -2410,4 +2410,38 @@ index b8f03d18541..7230ac724ba 100644
+
--
2.26.2
+=== 0001-RISC-V-Make-unique.patch ===
+From adce62f53d8ad00e8110a6a2de7962d7a850de16 Mon Sep 17 00:00:00 2001
+From: Keith Packard <keithp@keithp.com>
+Date: Wed, 29 Apr 2020 09:49:56 -0700
+Subject: [PATCH] RISC-V: Make unique SECCAT_SRODATA names start with .srodata
+ (not .sdata2)
+
+default_unique_section uses ".sdata2" as a prefix for SECCAT_SRODATA
+unique sections, but RISC-V uses ".srodata" instead. Override the
+TARGET_ASM_UNIQUE_SECTION function to catch this case, allowing the
+default to be used for all other sections.
+gcc/
+ * config/riscv/riscv.c (riscv_unique_section): New.
+ (TARGET_ASM_UNIQUE_SECTION): New.
+
+Signed-off-by: Keith Packard <keithp@keithp.com>
+Reviewed-by: Keith Packard <keithp@keithp.com>
+Reviewed-on: Keith Packard <keithp@keithp.com>
+Co-Authored-by: Keith Packard <keithp@keithp.com>
+---
+ gcc/ChangeLog | 5 +++++
+ gcc/config/riscv/riscv.c | 40 ++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 45 insertions(+)
+
+diff --git a/gcc/config/riscv/riscv.c b/gcc/config/riscv/riscv.c
+index e4c08d780db..1ad9799fce4 100644
+--- a/gcc/config/riscv/riscv.c
++++ b/gcc/config/riscv/riscv.c
+@@ -1 +1,2 @@
+
++
+
+--
+2.26.2
More information about the Gcc-cvs
mailing list