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

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

Issue 11411004: Remove the mode flag for clobbering - we will now just nuke the complete output directory. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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 | « client/tools/buildbot_annotated_steps.py ('k') | no next file » | 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 print 'Could not handle unfamiliar bot name "%s".' % name 130 print 'Could not handle unfamiliar bot name "%s".' % name
131 sys.exit(1) 131 sys.exit(1)
132 132
133 # Print out the buildinfo for easy debugging. 133 # Print out the buildinfo for easy debugging.
134 build_info.PrintBuildInfo() 134 build_info.PrintBuildInfo()
135 135
136 # Make sure we are in the dart directory 136 # Make sure we are in the dart directory
137 os.chdir(DART_PATH) 137 os.chdir(DART_PATH)
138 138
139 try: 139 try:
140 Clobber(build_info.mode) 140 Clobber()
141 build_step(build_info) 141 build_step(build_info)
142 142
143 custom_steps(build_info) 143 custom_steps(build_info)
144 except OSError as e: 144 except OSError as e:
145 sys.exit(e.errno) 145 sys.exit(e.errno)
146 146
147 sys.exit(0) 147 sys.exit(0)
148 148
149 149
150 def GetBotName(): 150 def GetBotName():
(...skipping 13 matching lines...) Expand all
164 return args.name, False 164 return args.name, False
165 165
166 name = os.environ.get(BUILDER_NAME) 166 name = os.environ.get(BUILDER_NAME)
167 if not name: 167 if not name:
168 print 'Use -n $BUILDBOT_NAME for the bot you would like to emulate.' 168 print 'Use -n $BUILDBOT_NAME for the bot you would like to emulate.'
169 sys.exit(1) 169 sys.exit(1)
170 170
171 return name, True 171 return name, True
172 172
173 173
174 def Clobber(mode): 174 def Clobber():
175 """ 175 """
176 Clobbers the builder before we do the build, if appropriate. 176 Clobbers the builder before we do the build, if appropriate.
177 177
178 - mode: either 'debug' or 'release' 178 - mode: either 'debug' or 'release'
179 """ 179 """
180 if os.environ.get(BUILDER_CLOBBER) != "1": 180 if os.environ.get(BUILDER_CLOBBER) != "1":
181 return 181 return
182 182
183 with BuildStep('Clobber'): 183 with BuildStep('Clobber'):
184 cmd = [sys.executable, 184 cmd = [sys.executable,
185 './tools/clean_output_directory.py', 185 './tools/clean_output_directory.py']
186 '--mode=' + mode]
187 print 'Clobbering %s' % (' '.join(cmd)) 186 print 'Clobbering %s' % (' '.join(cmd))
188 RunProcess(cmd) 187 RunProcess(cmd)
189 188
190 189
191 def RunTest(name, build_info, targets, flags=None): 190 def RunTest(name, build_info, targets, flags=None):
192 """ 191 """
193 Runs test.py with the given settings. 192 Runs test.py with the given settings.
194 """ 193 """
195 if not flags: 194 if not flags:
196 flags = [] 195 flags = []
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 if exit_code != 0: 229 if exit_code != 0:
231 raise OSError(exit_code) 230 raise OSError(exit_code)
232 231
233 232
234 def GetStepName(name, flags): 233 def GetStepName(name, flags):
235 """ 234 """
236 Filters out flags with '=' as this breaks the /stats feature of the buildbot. 235 Filters out flags with '=' as this breaks the /stats feature of the buildbot.
237 """ 236 """
238 flags = [x for x in flags if not '=' in x] 237 flags = [x for x in flags if not '=' in x]
239 return ('%s tests %s' % (name, ' '.join(flags))).strip() 238 return ('%s tests %s' % (name, ' '.join(flags))).strip()
OLDNEW
« no previous file with comments | « client/tools/buildbot_annotated_steps.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698