Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(843)

Unified Diff: bin/cbuildbot.py

Issue 3238012: Change clobber logic to be explicit (Closed) Base URL: http://git.chromium.org/git/crosutils.git
Patch Set: Fix comment Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bin/cbuildbot.py
diff --git a/bin/cbuildbot.py b/bin/cbuildbot.py
index 4eee360b70affa85e9eec0b5b00004be195d76da..08ad2229b5647e0b3bc737bc0f6f263f46185ff7 100755
--- a/bin/cbuildbot.py
+++ b/bin/cbuildbot.py
@@ -376,14 +376,17 @@ def main():
help='build number', type='int', default=0)
parser.add_option('-f', '--revisionfile',
help='file where new revisions are stored')
- parser.add_option('--noclobber', action='store_false', dest='clobber',
- default=True,
- help='Disables clobbering the buildroot on failure')
+ parser.add_option('--clobber', action='store_true', dest='clobber',
+ default=False,
+ help='Clobbers an old checkout before syncing')
(options, args) = parser.parse_args()
buildroot = options.buildroot
revisionfile = options.revisionfile
- clobber = options.clobber
+
+ # Passed option to clobber.
+ if options.clobber:
+ RunCommand(['sudo', 'rm', '-rf', buildroot])
if len(args) == 1:
buildconfig = _GetConfig(args[0])
@@ -432,10 +435,6 @@ def main():
_UprevCleanup(buildroot)
except:
- # Something went wrong, cleanup (being paranoid) for next build.
- if clobber:
- RunCommand(['sudo', 'rm', '-rf', buildroot], print_cmd=False)
-
# Send failure to master bot.
if not buildconfig['master'] and buildconfig['important']:
cbuildbot_comm.PublishStatus(cbuildbot_comm.STATUS_BUILD_FAILED)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698