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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 rev_file = open(revisionfile) | 308 rev_file = open(revisionfile) |
309 revisions = rev_file.read() | 309 revisions = rev_file.read() |
310 rev_file.close() | 310 rev_file.close() |
311 except Exception, e: | 311 except Exception, e: |
312 print >> sys.stderr, 'Error reading %s, revving all' % revisionfile | 312 print >> sys.stderr, 'Error reading %s, revving all' % revisionfile |
313 print e | 313 print e |
314 revisions = 'None' | 314 revisions = 'None' |
315 | 315 |
316 revisions = revisions.strip() | 316 revisions = revisions.strip() |
317 | 317 |
| 318 # TODO(sosa): Un-comment once we close individual trees. |
318 # Revisions == "None" indicates a Force Build. | 319 # Revisions == "None" indicates a Force Build. |
319 if revisions != 'None': | 320 #if revisions != 'None': |
320 print >> sys.stderr, 'CBUILDBOT Revision list found %s' % revisions | 321 # print >> sys.stderr, 'CBUILDBOT Revision list found %s' % revisions |
321 revision_list = _ParseRevisionString(revisions, | 322 # revision_list = _ParseRevisionString(revisions, |
322 _CreateRepoDictionary(buildroot, board)) | 323 # _CreateRepoDictionary(buildroot, board)) |
323 _UprevFromRevisionList(buildroot, revision_list) | 324 # _UprevFromRevisionList(buildroot, revision_list) |
324 else: | 325 #else: |
325 print >> sys.stderr, 'CBUILDBOT Revving all' | 326 print >> sys.stderr, 'CBUILDBOT Revving all' |
326 _UprevAllPackages(buildroot) | 327 _UprevAllPackages(buildroot) |
327 | 328 |
328 | 329 |
329 def _UprevCleanup(buildroot): | 330 def _UprevCleanup(buildroot): |
330 """Clean up after a previous uprev attempt.""" | 331 """Clean up after a previous uprev attempt.""" |
331 cwd = os.path.join(buildroot, 'src', 'scripts') | 332 cwd = os.path.join(buildroot, 'src', 'scripts') |
332 RunCommand(['./cros_mark_as_stable', '--srcroot=..', | 333 RunCommand(['./cros_mark_as_stable', '--srcroot=..', |
333 '--tracking_branch="cros/master"', 'clean'], | 334 '--tracking_branch="cros/master"', 'clean'], |
334 cwd=cwd) | 335 cwd=cwd) |
335 | 336 |
336 | 337 |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 | 438 |
438 # Send failure to master bot. | 439 # Send failure to master bot. |
439 if not buildconfig['master'] and buildconfig['important']: | 440 if not buildconfig['master'] and buildconfig['important']: |
440 cbuildbot_comm.PublishStatus(cbuildbot_comm.STATUS_BUILD_FAILED) | 441 cbuildbot_comm.PublishStatus(cbuildbot_comm.STATUS_BUILD_FAILED) |
441 | 442 |
442 raise | 443 raise |
443 | 444 |
444 | 445 |
445 if __name__ == '__main__': | 446 if __name__ == '__main__': |
446 main() | 447 main() |
OLD | NEW |