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

Side by Side Diff: testing_support/fake_repos.py

Issue 8508015: Create a new depot_tools_testing_lib to move utility modules there (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Renamed to testing_support Created 9 years, 1 month 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 | « testing_support/__init__.py ('k') | testing_support/filesystem_mock.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) 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 """Generate fake repositories for testing.""" 6 """Generate fake repositories for testing."""
7 7
8 import atexit 8 import atexit
9 import datetime 9 import datetime
10 import errno 10 import errno
11 import logging 11 import logging
12 import os 12 import os
13 import pprint 13 import pprint
14 import re 14 import re
15 import socket 15 import socket
16 import sys 16 import sys
17 import tempfile 17 import tempfile
18 import time 18 import time
19 19
20 # trial_dir must be first for non-system libraries. 20 # trial_dir must be first for non-system libraries.
21 from tests import trial_dir 21 from testing_support import trial_dir
22 import gclient_utils 22 import gclient_utils
23 import scm 23 import scm
24 import subprocess2 24 import subprocess2
25 25
26 26
27 def write(path, content): 27 def write(path, content):
28 f = open(path, 'wb') 28 f = open(path, 'wb')
29 f.write(content) 29 f.write(content)
30 f.close() 30 f.close()
31 31
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 fake.set_up_git() 743 fake.set_up_git()
744 print('Fake setup, press enter to quit or Ctrl-C to keep the checkouts.') 744 print('Fake setup, press enter to quit or Ctrl-C to keep the checkouts.')
745 sys.stdin.readline() 745 sys.stdin.readline()
746 except KeyboardInterrupt: 746 except KeyboardInterrupt:
747 trial_dir.TrialDir.SHOULD_LEAK.leak = True 747 trial_dir.TrialDir.SHOULD_LEAK.leak = True
748 return 0 748 return 0
749 749
750 750
751 if __name__ == '__main__': 751 if __name__ == '__main__':
752 sys.exit(main(sys.argv)) 752 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « testing_support/__init__.py ('k') | testing_support/filesystem_mock.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698