OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 | 2 |
3 import errno | 3 import errno |
4 import optparse | 4 import optparse |
5 import os | 5 import os |
6 import shutil | 6 import shutil |
7 import subprocess | 7 import subprocess |
8 | 8 |
9 from cbuildbot_config import config | 9 from cbuildbot_config import config |
10 | 10 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 raise | 47 raise |
48 | 48 |
49 # Main functions | 49 # Main functions |
50 | 50 |
51 def _FullCheckout(buildroot): | 51 def _FullCheckout(buildroot): |
52 MakeDir(buildroot, parents=True) | 52 MakeDir(buildroot, parents=True) |
53 RunCommand(['repo', 'init', '-u', 'http://src.chromium.org/git/manifest'], | 53 RunCommand(['repo', 'init', '-u', 'http://src.chromium.org/git/manifest'], |
54 cwd=buildroot, input='\n\ny\n') | 54 cwd=buildroot, input='\n\ny\n') |
55 RunCommand(['repo', 'sync'], cwd=buildroot) | 55 RunCommand(['repo', 'sync'], cwd=buildroot) |
56 RunCommand(['repo', 'forall', '-c', 'git', 'config', | 56 RunCommand(['repo', 'forall', '-c', 'git', 'config', |
57 'url.ssh://gitrw.chromium.org.pushinsteadof', | 57 'url.ssh://git@gitrw.chromium.org:9222.pushinsteadof', |
58 'http://src.chromium.org/git'], cwd=buildroot) | 58 'http://src.chromium.org/git'], cwd=buildroot) |
59 | 59 |
60 def _IncrementalCheckout(buildroot): | 60 def _IncrementalCheckout(buildroot): |
61 RunCommand(['repo', 'sync'], cwd=buildroot) | 61 RunCommand(['repo', 'sync'], cwd=buildroot) |
62 | 62 |
63 def _MakeChroot(buildroot): | 63 def _MakeChroot(buildroot): |
64 cwd = os.path.join(buildroot, 'src', 'scripts') | 64 cwd = os.path.join(buildroot, 'src', 'scripts') |
65 RunCommand(['./make_chroot', '--fast'], cwd=cwd) | 65 RunCommand(['./make_chroot', '--fast'], cwd=cwd) |
66 | 66 |
67 def _SetupBoard(buildroot, board='x86-generic'): | 67 def _SetupBoard(buildroot, board='x86-generic'): |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 if buildconfig['uprev']: | 131 if buildconfig['uprev']: |
132 _UprevPush(buildroot) | 132 _UprevPush(buildroot) |
133 _UprevCleanup(buildroot) | 133 _UprevCleanup(buildroot) |
134 except: | 134 except: |
135 # something went wrong, cleanup (being paranoid) for next build | 135 # something went wrong, cleanup (being paranoid) for next build |
136 RunCommand(['sudo', 'rm', '-rf', buildroot]) | 136 RunCommand(['sudo', 'rm', '-rf', buildroot]) |
137 raise | 137 raise |
138 | 138 |
139 if __name__ == '__main__': | 139 if __name__ == '__main__': |
140 main() | 140 main() |
OLD | NEW |