| 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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 _RunUnitTests(buildroot) | 438 _RunUnitTests(buildroot) |
| 439 | 439 |
| 440 _BuildImage(buildroot) | 440 _BuildImage(buildroot) |
| 441 | 441 |
| 442 if buildconfig['smoke_bvt']: | 442 if buildconfig['smoke_bvt']: |
| 443 _BuildVMImageForTesting(buildroot) | 443 _BuildVMImageForTesting(buildroot) |
| 444 _RunSmokeSuite(buildroot) | 444 _RunSmokeSuite(buildroot) |
| 445 | 445 |
| 446 if buildconfig['uprev']: | 446 if buildconfig['uprev']: |
| 447 # Don't push changes for developers. | 447 # Don't push changes for developers. |
| 448 if options.debug: | 448 if not options.debug: |
| 449 if buildconfig['master']: | 449 if buildconfig['master']: |
| 450 # Master bot needs to check if the other slaves completed. | 450 # Master bot needs to check if the other slaves completed. |
| 451 if cbuildbot_comm.HaveSlavesCompleted(config): | 451 if cbuildbot_comm.HaveSlavesCompleted(config): |
| 452 _UprevPush(buildroot) | 452 _UprevPush(buildroot) |
| 453 else: | 453 else: |
| 454 # At least one of the slaves failed or we timed out. | 454 # At least one of the slaves failed or we timed out. |
| 455 _UprevCleanup(buildroot) | 455 _UprevCleanup(buildroot) |
| 456 Die('CBUILDBOT - One of the slaves has failed!!!') | 456 Die('CBUILDBOT - One of the slaves has failed!!!') |
| 457 | 457 |
| 458 else: | 458 else: |
| 459 # Publish my status to the master if its expecting it. | 459 # Publish my status to the master if its expecting it. |
| 460 if buildconfig['important']: | 460 if buildconfig['important']: |
| 461 cbuildbot_comm.PublishStatus(cbuildbot_comm.STATUS_BUILD_COMPLETE) | 461 cbuildbot_comm.PublishStatus(cbuildbot_comm.STATUS_BUILD_COMPLETE) |
| 462 | 462 |
| 463 _UprevCleanup(buildroot) | 463 _UprevCleanup(buildroot) |
| 464 except: | 464 except: |
| 465 # Send failure to master bot. | 465 # Send failure to master bot. |
| 466 if not buildconfig['master'] and buildconfig['important']: | 466 if not buildconfig['master'] and buildconfig['important']: |
| 467 cbuildbot_comm.PublishStatus(cbuildbot_comm.STATUS_BUILD_FAILED) | 467 cbuildbot_comm.PublishStatus(cbuildbot_comm.STATUS_BUILD_FAILED) |
| 468 | 468 |
| 469 raise | 469 raise |
| 470 | 470 |
| 471 | 471 |
| 472 if __name__ == '__main__': | 472 if __name__ == '__main__': |
| 473 main() | 473 main() |
| OLD | NEW |