| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 | 2 |
| 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 """CBuildbot is wrapper around the build process used by the pre-flight queue""" | 7 """CBuildbot is wrapper around the build process used by the pre-flight queue""" |
| 8 | 8 |
| 9 import errno | 9 import errno |
| 10 import re | 10 import re |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 redirect_stdout=True) | 221 redirect_stdout=True) |
| 222 return (vdisk_size.strip(), statefulfs_size.strip()) | 222 return (vdisk_size.strip(), statefulfs_size.strip()) |
| 223 | 223 |
| 224 | 224 |
| 225 # =========================== Main Commands =================================== | 225 # =========================== Main Commands =================================== |
| 226 | 226 |
| 227 def _FullCheckout(buildroot, rw_checkout=True, retries=_DEFAULT_RETRIES): | 227 def _FullCheckout(buildroot, rw_checkout=True, retries=_DEFAULT_RETRIES): |
| 228 """Performs a full checkout and clobbers any previous checkouts.""" | 228 """Performs a full checkout and clobbers any previous checkouts.""" |
| 229 RunCommand(['sudo', 'rm', '-rf', buildroot]) | 229 RunCommand(['sudo', 'rm', '-rf', buildroot]) |
| 230 MakeDir(buildroot, parents=True) | 230 MakeDir(buildroot, parents=True) |
| 231 RunCommand(['repo', 'init', '-u', 'http://src.chromium.org/git/manifest'], | 231 RunCommand(['repo', 'init', '-u', 'http://git.chromium.org/git/manifest'], |
| 232 cwd=buildroot, input='\n\ny\n') | 232 cwd=buildroot, input='\n\ny\n') |
| 233 RepoSync(buildroot, rw_checkout, retries) | 233 RepoSync(buildroot, rw_checkout, retries) |
| 234 | 234 |
| 235 | 235 |
| 236 def _IncrementalCheckout(buildroot, rw_checkout=True, | 236 def _IncrementalCheckout(buildroot, rw_checkout=True, |
| 237 retries=_DEFAULT_RETRIES): | 237 retries=_DEFAULT_RETRIES): |
| 238 """Performs a checkout without clobbering previous checkout.""" | 238 """Performs a checkout without clobbering previous checkout.""" |
| 239 _UprevCleanup(buildroot, error_ok=True) | 239 _UprevCleanup(buildroot, error_ok=True) |
| 240 RepoSync(buildroot, rw_checkout, retries) | 240 RepoSync(buildroot, rw_checkout, retries) |
| 241 | 241 |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 except: | 453 except: |
| 454 # Send failure to master bot. | 454 # Send failure to master bot. |
| 455 if not buildconfig['master'] and buildconfig['important']: | 455 if not buildconfig['master'] and buildconfig['important']: |
| 456 cbuildbot_comm.PublishStatus(cbuildbot_comm.STATUS_BUILD_FAILED) | 456 cbuildbot_comm.PublishStatus(cbuildbot_comm.STATUS_BUILD_FAILED) |
| 457 | 457 |
| 458 raise | 458 raise |
| 459 | 459 |
| 460 | 460 |
| 461 if __name__ == '__main__': | 461 if __name__ == '__main__': |
| 462 main() | 462 main() |
| OLD | NEW |