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

Side by Side Diff: tools/bots/bot.py

Issue 197313010: Initial refactorings to support archiving the src and debian package builds. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/bots/bot_utils.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 2
3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
4 # for details. All rights reserved. Use of this source code is governed by a 4 # for details. All rights reserved. Use of this source code is governed by a
5 # BSD-style license that can be found in the LICENSE file. 5 # BSD-style license that can be found in the LICENSE file.
6 6
7 """ 7 """
8 Shared code for use in the buildbot scripts. 8 Shared code for use in the buildbot scripts.
9 """ 9 """
10 10
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 return args.name, False 178 return args.name, False
179 179
180 name = os.environ.get(BUILDER_NAME) 180 name = os.environ.get(BUILDER_NAME)
181 if not name: 181 if not name:
182 print 'Use -n $BUILDBOT_NAME for the bot you would like to emulate.' 182 print 'Use -n $BUILDBOT_NAME for the bot you would like to emulate.'
183 sys.exit(1) 183 sys.exit(1)
184 184
185 return name, True 185 return name, True
186 186
187 187
188 def Clobber(): 188 def Clobber(force=None):
189 """ 189 """
190 Clobbers the builder before we do the build, if appropriate. 190 Clobbers the builder before we do the build, if appropriate.
191 191
192 - mode: either 'debug' or 'release' 192 - mode: either 'debug' or 'release'
193 """ 193 """
194 if os.environ.get(BUILDER_CLOBBER) != "1": 194 if os.environ.get(BUILDER_CLOBBER) != "1" and not force:
195 return 195 return
196 clobber_string = 'Clobber'
197 if force:
198 clobber_string = 'Clobber(always)'
196 199
197 with BuildStep('Clobber'): 200 with BuildStep(clobber_string):
198 cmd = [sys.executable, 201 cmd = [sys.executable,
199 './tools/clean_output_directory.py'] 202 './tools/clean_output_directory.py']
200 print 'Clobbering %s' % (' '.join(cmd)) 203 print 'Clobbering %s' % (' '.join(cmd))
201 RunProcess(cmd) 204 RunProcess(cmd)
202 205
203 206
204 def RunTest(name, build_info, targets, flags=None): 207 def RunTest(name, build_info, targets, flags=None):
205 """ 208 """
206 Runs test.py with the given settings. 209 Runs test.py with the given settings.
207 """ 210 """
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 if exit_code != 0: 250 if exit_code != 0:
248 raise OSError(exit_code) 251 raise OSError(exit_code)
249 252
250 253
251 def GetStepName(name, flags): 254 def GetStepName(name, flags):
252 """ 255 """
253 Filters out flags with '=' as this breaks the /stats feature of the buildbot. 256 Filters out flags with '=' as this breaks the /stats feature of the buildbot.
254 """ 257 """
255 flags = [x for x in flags if not '=' in x] 258 flags = [x for x in flags if not '=' in x]
256 return ('%s tests %s' % (name, ' '.join(flags))).strip() 259 return ('%s tests %s' % (name, ' '.join(flags))).strip()
OLDNEW
« no previous file with comments | « no previous file | tools/bots/bot_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698