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

Side by Side Diff: tests/gclient_scm_test.py

Issue 18328003: Add a git cache for gclient sync operations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Make cache_dir .gclient only, and move it to GitWrapper Created 7 years, 5 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 | « gclient_scm.py ('k') | tests/gclient_smoketest.py » ('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) 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 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 class OptionsObject(object): 678 class OptionsObject(object):
679 def __init__(self, verbose=False, revision=None): 679 def __init__(self, verbose=False, revision=None):
680 self.verbose = verbose 680 self.verbose = verbose
681 self.revision = revision 681 self.revision = revision
682 self.manually_grab_svn_rev = True 682 self.manually_grab_svn_rev = True
683 self.deps_os = None 683 self.deps_os = None
684 self.force = False 684 self.force = False
685 self.reset = False 685 self.reset = False
686 self.nohooks = False 686 self.nohooks = False
687 self.upstream = False 687 self.upstream = False
688 self.cache_dir = None
688 self.merge = False 689 self.merge = False
689 self.jobs = 1 690 self.jobs = 1
690 self.delete_unversioned_trees = False 691 self.delete_unversioned_trees = False
691 692
692 sample_git_import = """blob 693 sample_git_import = """blob
693 mark :1 694 mark :1
694 data 6 695 data 6
695 Hello 696 Hello
696 697
697 blob 698 blob
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 789
789 class ManagedGitWrapperTestCase(BaseGitWrapperTestCase): 790 class ManagedGitWrapperTestCase(BaseGitWrapperTestCase):
790 def testDir(self): 791 def testDir(self):
791 members = [ 792 members = [
792 'BinaryExists', 793 'BinaryExists',
793 'FullUrlForRelativeUrl', 794 'FullUrlForRelativeUrl',
794 'GetCheckoutRoot', 795 'GetCheckoutRoot',
795 'GetRevisionDate', 796 'GetRevisionDate',
796 'GetUsableRev', 797 'GetUsableRev',
797 'RunCommand', 798 'RunCommand',
799 'cache_dir',
800 'cache_locks',
798 'cleanup', 801 'cleanup',
799 'diff', 802 'diff',
800 'nag_max', 803 'nag_max',
801 'nag_timer', 804 'nag_timer',
802 'pack', 805 'pack',
803 'UpdateSubmoduleConfig', 806 'UpdateSubmoduleConfig',
804 'relpath', 807 'relpath',
805 'revert', 808 'revert',
806 'revinfo', 809 'revinfo',
807 'runhooks', 810 'runhooks',
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
1193 1196
1194 if __name__ == '__main__': 1197 if __name__ == '__main__':
1195 if '-v' in sys.argv: 1198 if '-v' in sys.argv:
1196 logging.basicConfig( 1199 logging.basicConfig(
1197 level=logging.DEBUG, 1200 level=logging.DEBUG,
1198 format='%(asctime).19s %(levelname)s %(filename)s:' 1201 format='%(asctime).19s %(levelname)s %(filename)s:'
1199 '%(lineno)s %(message)s') 1202 '%(lineno)s %(message)s')
1200 unittest.main() 1203 unittest.main()
1201 1204
1202 # vim: ts=2:sw=2:tw=80:et: 1205 # vim: ts=2:sw=2:tw=80:et:
OLDNEW
« no previous file with comments | « gclient_scm.py ('k') | tests/gclient_smoketest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698