OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Unit tests for gclient_scm.py.""" | 6 """Unit tests for gclient_scm.py.""" |
7 | 7 |
8 # pylint: disable=E1103 | 8 # pylint: disable=E1103 |
9 | 9 |
10 # Import before super_mox to keep valid references. | 10 # Import before super_mox to keep valid references. |
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
743 Popen(['git', 'checkout', '-q'], stdout=PIPE, stderr=STDOUT, | 743 Popen(['git', 'checkout', '-q'], stdout=PIPE, stderr=STDOUT, |
744 cwd=path).communicate() | 744 cwd=path).communicate() |
745 Popen(['git', 'remote', 'add', '-f', 'origin', '.'], stdout=PIPE, | 745 Popen(['git', 'remote', 'add', '-f', 'origin', '.'], stdout=PIPE, |
746 stderr=STDOUT, cwd=path).communicate() | 746 stderr=STDOUT, cwd=path).communicate() |
747 Popen(['git', 'checkout', '-b', 'new', 'origin/master', '-q'], stdout=PIPE, | 747 Popen(['git', 'checkout', '-b', 'new', 'origin/master', '-q'], stdout=PIPE, |
748 stderr=STDOUT, cwd=path).communicate() | 748 stderr=STDOUT, cwd=path).communicate() |
749 Popen(['git', 'push', 'origin', 'origin/origin:origin/master', '-q'], | 749 Popen(['git', 'push', 'origin', 'origin/origin:origin/master', '-q'], |
750 stdout=PIPE, stderr=STDOUT, cwd=path).communicate() | 750 stdout=PIPE, stderr=STDOUT, cwd=path).communicate() |
751 Popen(['git', 'config', '--unset', 'remote.origin.fetch'], stdout=PIPE, | 751 Popen(['git', 'config', '--unset', 'remote.origin.fetch'], stdout=PIPE, |
752 stderr=STDOUT, cwd=path).communicate() | 752 stderr=STDOUT, cwd=path).communicate() |
| 753 Popen(['git', 'config', 'user.email', 'someuser@chromium.org'], stdout=PIPE, |
| 754 stderr=STDOUT, cwd=path).communicate() |
| 755 Popen(['git', 'config', 'user.name', 'Some User'], stdout=PIPE, |
| 756 stderr=STDOUT, cwd=path).communicate() |
753 return True | 757 return True |
754 | 758 |
755 def setUp(self): | 759 def setUp(self): |
756 TestCaseUtils.setUp(self) | 760 TestCaseUtils.setUp(self) |
757 unittest.TestCase.setUp(self) | 761 unittest.TestCase.setUp(self) |
758 self.url = 'git://foo' | 762 self.url = 'git://foo' |
759 self.root_dir = tempfile.mkdtemp() | 763 self.root_dir = tempfile.mkdtemp() |
760 self.relpath = '.' | 764 self.relpath = '.' |
761 self.base_path = join(self.root_dir, self.relpath) | 765 self.base_path = join(self.root_dir, self.relpath) |
762 self.enabled = self.CreateGitRepo(self.sample_git_import, self.base_path) | 766 self.enabled = self.CreateGitRepo(self.sample_git_import, self.base_path) |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1176 | 1180 |
1177 if __name__ == '__main__': | 1181 if __name__ == '__main__': |
1178 if '-v' in sys.argv: | 1182 if '-v' in sys.argv: |
1179 logging.basicConfig( | 1183 logging.basicConfig( |
1180 level=logging.DEBUG, | 1184 level=logging.DEBUG, |
1181 format='%(asctime).19s %(levelname)s %(filename)s:' | 1185 format='%(asctime).19s %(levelname)s %(filename)s:' |
1182 '%(lineno)s %(message)s') | 1186 '%(lineno)s %(message)s') |
1183 unittest.main() | 1187 unittest.main() |
1184 | 1188 |
1185 # vim: ts=2:sw=2:tw=80:et: | 1189 # vim: ts=2:sw=2:tw=80:et: |
OLD | NEW |