Bug #912858: test_authors_up_to_date does not deal with capitalized names properly

ensure we are not fooled by capitalized names, by turning emails and names into lower cases before the matching.

Change-Id: Idbb8535174c0f1451ad6fd0628f35508f0f1e466
This commit is contained in:
Armando Migliaccio
2012-01-06 17:49:57 +00:00
parent 4f63540735
commit d92f0e37e2

View File

@@ -47,7 +47,8 @@ class ProjectTestCase(test.TestCase):
missing = set()
contributors = set()
mailmap = parse_mailmap(os.path.join(topdir, '.mailmap'))
authors_file = open(os.path.join(topdir, 'Authors'), 'r').read()
authors_file = open(os.path.join(topdir,
'Authors'), 'r').read().lower()
if os.path.exists(os.path.join(topdir, '.git')):
for email in commands.getoutput('git log --format=%ae').split():
@@ -55,7 +56,7 @@ class ProjectTestCase(test.TestCase):
continue
if "jenkins" in email and "openstack.org" in email:
continue
email = '<' + email + '>'
email = '<' + email.lower() + '>'
contributors.add(str_dict_replace(email, mailmap))
else:
return