Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Side by Side Diff: tests/gclient_scm_test.py

Issue 7828024: Do not run integration tests on upload, they are too slow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: git branch has no -q flag Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « PRESUBMIT.py ('k') | tests/upstream.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2011 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=E1101,E1103,W0403 8 # pylint: disable=E1101,E1103,W0403
9 9
10 # Import before super_mox to keep valid references. 10 # Import before super_mox to keep valid references.
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 if not self.enabled: 750 if not self.enabled:
751 return 751 return
752 options = self.Options() 752 options = self.Options()
753 scm = gclient_scm.CreateSCM(url=self.url, root_dir=self.root_dir, 753 scm = gclient_scm.CreateSCM(url=self.url, root_dir=self.root_dir,
754 relpath=self.relpath) 754 relpath=self.relpath)
755 file_path = join(self.base_path, 'b') 755 file_path = join(self.base_path, 'b')
756 open(file_path, 'w').writelines('conflict\n') 756 open(file_path, 'w').writelines('conflict\n')
757 try: 757 try:
758 scm.update(options, (), []) 758 scm.update(options, (), [])
759 self.fail() 759 self.fail()
760 except gclient_scm.gclient_utils.CheckCallError: 760 except gclient_scm.gclient_utils.Error:
761 # The exact exception text varies across git versions so it's not worth 761 # The exact exception text varies across git versions so it's not worth
762 # verifying it. It's fine as long as it throws. 762 # verifying it. It's fine as long as it throws.
763 pass 763 pass
764 # Manually flush stdout since we can't verify it's content accurately across 764 # Manually flush stdout since we can't verify it's content accurately across
765 # git versions. 765 # git versions.
766 sys.stdout.getvalue() 766 sys.stdout.getvalue()
767 sys.stdout.close() 767 sys.stdout.close()
768 768
769 def testUpdateConflict(self): 769 def testUpdateConflict(self):
770 if not self.enabled: 770 if not self.enabled:
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 824
825 if __name__ == '__main__': 825 if __name__ == '__main__':
826 if '-v' in sys.argv: 826 if '-v' in sys.argv:
827 logging.basicConfig( 827 logging.basicConfig(
828 level=logging.DEBUG, 828 level=logging.DEBUG,
829 format='%(asctime).19s %(levelname)s %(filename)s:' 829 format='%(asctime).19s %(levelname)s %(filename)s:'
830 '%(lineno)s %(message)s') 830 '%(lineno)s %(message)s')
831 unittest.main() 831 unittest.main()
832 832
833 # vim: ts=2:sw=2:tw=80:et: 833 # vim: ts=2:sw=2:tw=80:et:
OLDNEW
« no previous file with comments | « PRESUBMIT.py ('k') | tests/upstream.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698