##// END OF EJS Templates
tests: stabilize Git committer in test_vcs_operations...
Mads Kiilerich -
r8768:d6d3cb59 stable
parent child Browse files
Show More
@@ -150,6 +150,10 b' class Command(object):'
150 testenv['LANGUAGE'] = 'en_US:en'
150 testenv['LANGUAGE'] = 'en_US:en'
151 testenv['HGPLAIN'] = ''
151 testenv['HGPLAIN'] = ''
152 testenv['HGRCPATH'] = ''
152 testenv['HGRCPATH'] = ''
153 testenv['GIT_COMMITTER_NAME'] = base.TEST_USER_ADMIN_LOGIN
154 testenv['GIT_COMMITTER_EMAIL'] = base.TEST_USER_ADMIN_EMAIL
155 testenv['GIT_AUTHOR_NAME'] = base.TEST_USER_REGULAR_LOGIN
156 testenv['GIT_AUTHOR_EMAIL'] = base.TEST_USER_REGULAR_EMAIL
153 testenv.update(environ)
157 testenv.update(environ)
154 p = Popen(command, shell=True, stdout=PIPE, stderr=PIPE, cwd=self.cwd, env=testenv)
158 p = Popen(command, shell=True, stdout=PIPE, stderr=PIPE, cwd=self.cwd, env=testenv)
155 stdout, stderr = p.communicate()
159 stdout, stderr = p.communicate()
@@ -195,8 +199,7 b' def _add_files(vcs, dest_dir, files_no=3'
195 cmd = """git commit -m "committed new %s" --author "%s" "%s" """ % (
199 cmd = """git commit -m "committed new %s" --author "%s" "%s" """ % (
196 i, author_str, added_file
200 i, author_str, added_file
197 )
201 )
198 # git commit needs EMAIL on some machines
202 Command(dest_dir).execute(cmd)
199 Command(dest_dir).execute(cmd, EMAIL=email)
200
203
201 def _add_files_and_push(webserver, vt, dest_dir, clone_url, ignoreReturnCode=False, files_no=3):
204 def _add_files_and_push(webserver, vt, dest_dir, clone_url, ignoreReturnCode=False, files_no=3):
202 _add_files(vt.repo_type, dest_dir, files_no=files_no)
205 _add_files(vt.repo_type, dest_dir, files_no=files_no)
@@ -618,7 +621,7 b' class TestVCSOperations(base.TestControl'
618 # add submodule
621 # add submodule
619 stdout, stderr = Command(base.TESTS_TMP_PATH).execute('git clone', fork_url, dest_dir)
622 stdout, stderr = Command(base.TESTS_TMP_PATH).execute('git clone', fork_url, dest_dir)
620 stdout, stderr = Command(dest_dir).execute('git submodule add', clone_url, 'testsubmodule')
623 stdout, stderr = Command(dest_dir).execute('git submodule add', clone_url, 'testsubmodule')
621 stdout, stderr = Command(dest_dir).execute('git commit -am "added testsubmodule pointing to', clone_url, '"', EMAIL=base.TEST_USER_ADMIN_EMAIL)
624 stdout, stderr = Command(dest_dir).execute('git commit -am "added testsubmodule pointing to', clone_url, '"')
622 stdout, stderr = Command(dest_dir).execute('git push', fork_url, 'master')
625 stdout, stderr = Command(dest_dir).execute('git push', fork_url, 'master')
623
626
624 # check for testsubmodule link in files page
627 # check for testsubmodule link in files page
General Comments 0
You need to be logged in to leave comments. Login now