diff options
author | Martin Liska <mliska@suse.cz> | 2021-05-10 14:13:53 +0200 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2021-05-11 10:55:07 +0200 |
commit | 8f67bf25a48a6fd235bdba13c8708a686d942772 (patch) | |
tree | 29cae2404259bd1d79cc1ca6a7e6dd2ff01de169 /contrib/gcc-changelog/test_email.py | |
parent | 772e5e82e3114f6faccb549cfcc30c06b4678354 (diff) | |
download | gcc-8f67bf25a48a6fd235bdba13c8708a686d942772.zip gcc-8f67bf25a48a6fd235bdba13c8708a686d942772.tar.gz gcc-8f67bf25a48a6fd235bdba13c8708a686d942772.tar.bz2 |
gcc-changelog: Remove non-strict mode.
contrib/ChangeLog:
* gcc-changelog/git_check_commit.py: Remove --non-strict-mode.
* gcc-changelog/git_commit.py: Remove strict mode.
* gcc-changelog/git_email.py: Likewise.
* gcc-changelog/git_repository.py: Likewise.
* gcc-changelog/test_email.py: Likewise.
* gcc-changelog/test_patches.txt: Update patches so that they
don't contain a ChangeLog file changes.
Diffstat (limited to 'contrib/gcc-changelog/test_email.py')
-rwxr-xr-x | contrib/gcc-changelog/test_email.py | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/contrib/gcc-changelog/test_email.py b/contrib/gcc-changelog/test_email.py index d66bf5b..7472762 100755 --- a/contrib/gcc-changelog/test_email.py +++ b/contrib/gcc-changelog/test_email.py @@ -62,17 +62,17 @@ class TestGccChangelog(unittest.TestCase): assert t.endswith('.patch') os.remove(t) - def get_git_email(self, filename, strict=False): + def get_git_email(self, filename): with tempfile.NamedTemporaryFile(mode='w+', suffix='.patch', delete=False) as f: f.write('\n'.join(self.patches[filename])) self.temps.append(f.name) - return GitEmail(f.name, strict) + return GitEmail(f.name) - def from_patch_glob(self, name, strict=False): + def from_patch_glob(self, name): files = [f for f in self.patches.keys() if f.startswith(name)] assert len(files) == 1 - return self.get_git_email(files[0], strict) + return self.get_git_email(files[0]) def test_simple_patch_format(self): email = self.get_git_email('0577-aarch64-Add-an-and.patch') @@ -247,7 +247,7 @@ class TestGccChangelog(unittest.TestCase): assert email.changelog_entries[1].prs == [] def test_multiple_prs_not_added(self): - email = self.from_patch_glob('0001-Add-patch_are') + email = self.from_patch_glob('0002-Add-patch_are') assert not email.errors assert email.changelog_entries[0].prs == ['PR target/93492'] assert email.changelog_entries[1].prs == ['PR target/12345'] @@ -255,18 +255,17 @@ class TestGccChangelog(unittest.TestCase): assert email.changelog_entries[2].folder == 'gcc/testsuite' def test_strict_mode(self): - email = self.from_patch_glob('0001-Add-patch_are', - True) + email = self.from_patch_glob('0001-Add-patch_are') msg = 'ChangeLog, DATESTAMP, BASE-VER and DEV-PHASE updates should ' \ 'be done separately from normal commits' assert email.errors[0].message == msg def test_strict_mode_normal_patch(self): - email = self.get_git_email('0001-Just-test-it.patch', True) + email = self.get_git_email('0001-Just-test-it.patch') assert not email.errors def test_strict_mode_datestamp_only(self): - email = self.get_git_email('0002-Bump-date.patch', True) + email = self.get_git_email('0002-Bump-date.patch') assert not email.errors def test_wrong_changelog_entry(self): @@ -418,7 +417,7 @@ class TestGccChangelog(unittest.TestCase): assert email.errors[0].message == 'bad parentheses wrapping' def test_changelog_removal(self): - email = self.from_patch_glob('0001-ChangeLog-removal.patch', strict=True) + email = self.from_patch_glob('0001-ChangeLog-removal.patch') assert not email.errors def test_long_filenames(self): |