Add --debug option to cbuildbot for developers to use cbuildbot without pushing changes.

Change-Id: Idda6c7287cdb1863eb4abe8c56da2e763e9fe777

BUG=7926
TEST=Ran with --debug and verified I didn't push a change.

Review URL: http://codereview.chromium.org/3880002
This commit is contained in:
Chris Sosa 2010-10-20 11:00:44 -07:00
parent cd1c749b0e
commit debca51332

View File

@ -395,6 +395,9 @@ def main():
parser.add_option('--clobber', action='store_true', dest='clobber', parser.add_option('--clobber', action='store_true', dest='clobber',
default=False, default=False,
help='Clobbers an old checkout before syncing') help='Clobbers an old checkout before syncing')
parser.add_option('--debug', action='store_true', dest='debug',
default=False,
help='Override some options to run as a developer.')
(options, args) = parser.parse_args() (options, args) = parser.parse_args()
buildroot = options.buildroot buildroot = options.buildroot
@ -441,21 +444,23 @@ def main():
_RunSmokeSuite(buildroot) _RunSmokeSuite(buildroot)
if buildconfig['uprev']: if buildconfig['uprev']:
if buildconfig['master']: # Don't push changes for developers.
# Master bot needs to check if the other slaves completed. if options.debug:
if cbuildbot_comm.HaveSlavesCompleted(config): if buildconfig['master']:
_UprevPush(buildroot) # Master bot needs to check if the other slaves completed.
_UprevCleanup(buildroot) if cbuildbot_comm.HaveSlavesCompleted(config):
else: _UprevPush(buildroot)
# At least one of the slaves failed or we timed out. else:
_UprevCleanup(buildroot) # At least one of the slaves failed or we timed out.
Die('CBUILDBOT - One of the slaves has failed!!!') _UprevCleanup(buildroot)
else: Die('CBUILDBOT - One of the slaves has failed!!!')
# Publish my status to the master if its expecting it.
if buildconfig['important']:
cbuildbot_comm.PublishStatus(cbuildbot_comm.STATUS_BUILD_COMPLETE)
_UprevCleanup(buildroot) else:
# Publish my status to the master if its expecting it.
if buildconfig['important']:
cbuildbot_comm.PublishStatus(cbuildbot_comm.STATUS_BUILD_COMPLETE)
_UprevCleanup(buildroot)
except: except:
# Send failure to master bot. # Send failure to master bot.
if not buildconfig['master'] and buildconfig['important']: if not buildconfig['master'] and buildconfig['important']: