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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
63 | 63 |
64 retries = 0 | 64 retries = 0 |
65 except: | 65 except: |
66 retries -= 1 | 66 retries -= 1 |
67 if retries > 0: | 67 if retries > 0: |
68 Warning('CBUILDBOT -- Repo Sync Failed, retrying') | 68 Warning('CBUILDBOT -- Repo Sync Failed, retrying') |
69 else: | 69 else: |
70 Warning('CBUILDBOT -- Retries exhausted') | 70 Warning('CBUILDBOT -- Retries exhausted') |
71 raise | 71 raise |
72 | 72 |
73 # Output manifest | |
sosa
2010/09/25 21:46:43
Period at end of comment . Also why to stdout rat
davidjames
2010/09/25 22:43:46
What's redirect_stdout? Is there a difference betw
| |
74 RunCommand(['repo', 'manifest', '-r', '-o', '-'], cwd=buildroot) | |
75 | |
73 # =========================== Command Helpers ================================= | 76 # =========================== Command Helpers ================================= |
74 | 77 |
75 def _GetAllGitRepos(buildroot, debug=False): | 78 def _GetAllGitRepos(buildroot, debug=False): |
76 """Returns a list of tuples containing [git_repo, src_path].""" | 79 """Returns a list of tuples containing [git_repo, src_path].""" |
77 manifest_tuples = [] | 80 manifest_tuples = [] |
78 # Gets all the git repos from a full repo manifest. | 81 # Gets all the git repos from a full repo manifest. |
79 repo_cmd = "repo manifest -o -".split() | 82 repo_cmd = "repo manifest -o -".split() |
80 output = RunCommand(repo_cmd, cwd=buildroot, redirect_stdout=True, | 83 output = RunCommand(repo_cmd, cwd=buildroot, redirect_stdout=True, |
81 redirect_stderr=True, print_cmd=debug) | 84 redirect_stderr=True, print_cmd=debug) |
82 | 85 |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
400 except: | 403 except: |
401 # Send failure to master bot. | 404 # Send failure to master bot. |
402 if not buildconfig['master'] and buildconfig['important']: | 405 if not buildconfig['master'] and buildconfig['important']: |
403 cbuildbot_comm.PublishStatus(cbuildbot_comm.STATUS_BUILD_FAILED) | 406 cbuildbot_comm.PublishStatus(cbuildbot_comm.STATUS_BUILD_FAILED) |
404 | 407 |
405 raise | 408 raise |
406 | 409 |
407 | 410 |
408 if __name__ == '__main__': | 411 if __name__ == '__main__': |
409 main() | 412 main() |
OLD | NEW |