OLD | NEW |
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 Loading... |
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)) |
OLD | NEW |