From debca5133266ea0a7af36d88f5fbe66970b5b6f4 Mon Sep 17 00:00:00 2001 From: Chris Sosa Date: Wed, 20 Oct 2010 11:00:44 -0700 Subject: [PATCH] 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 --- bin/cbuildbot.py | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/bin/cbuildbot.py b/bin/cbuildbot.py index 1bf9503061..21b582f564 100755 --- a/bin/cbuildbot.py +++ b/bin/cbuildbot.py @@ -395,6 +395,9 @@ def main(): parser.add_option('--clobber', action='store_true', dest='clobber', default=False, 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() buildroot = options.buildroot @@ -441,21 +444,23 @@ def main(): _RunSmokeSuite(buildroot) if buildconfig['uprev']: - if buildconfig['master']: - # Master bot needs to check if the other slaves completed. - if cbuildbot_comm.HaveSlavesCompleted(config): - _UprevPush(buildroot) - _UprevCleanup(buildroot) - else: - # At least one of the slaves failed or we timed out. - _UprevCleanup(buildroot) - Die('CBUILDBOT - One of the slaves has failed!!!') - else: - # Publish my status to the master if its expecting it. - if buildconfig['important']: - cbuildbot_comm.PublishStatus(cbuildbot_comm.STATUS_BUILD_COMPLETE) + # Don't push changes for developers. + if options.debug: + if buildconfig['master']: + # Master bot needs to check if the other slaves completed. + if cbuildbot_comm.HaveSlavesCompleted(config): + _UprevPush(buildroot) + else: + # At least one of the slaves failed or we timed out. + _UprevCleanup(buildroot) + Die('CBUILDBOT - One of the slaves has failed!!!') - _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: # Send failure to master bot. if not buildconfig['master'] and buildconfig['important']: