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

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

Issue 12386047: Quote all arguments when printing test.py command (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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/compiler.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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 '--progress=buildbot', 209 '--progress=buildbot',
210 '-v', '--time', '--use-sdk', '--report' 210 '-v', '--time', '--use-sdk', '--report'
211 ] 211 ]
212 212
213 if build_info.checked: 213 if build_info.checked:
214 cmd.append('--checked') 214 cmd.append('--checked')
215 215
216 cmd.extend(flags) 216 cmd.extend(flags)
217 cmd.extend(targets) 217 cmd.extend(targets)
218 218
219 print 'Running: %s' % (' '.join(cmd)) 219 print 'Running: %s' % (' '.join(map(lambda arg: '"%s"' % arg, cmd)))
220 RunProcess(cmd) 220 RunProcess(cmd)
221 221
222 222
223 def RunProcess(command): 223 def RunProcess(command):
224 """ 224 """
225 Runs command. 225 Runs command.
226 226
227 If a non-zero exit code is returned, raises an OSError with errno as the exit 227 If a non-zero exit code is returned, raises an OSError with errno as the exit
228 code. 228 code.
229 """ 229 """
230 exit_code = subprocess.call(command, env=NO_COLOR_ENV) 230 exit_code = subprocess.call(command, env=NO_COLOR_ENV)
231 if exit_code != 0: 231 if exit_code != 0:
232 raise OSError(exit_code) 232 raise OSError(exit_code)
233 233
234 234
235 def GetStepName(name, flags): 235 def GetStepName(name, flags):
236 """ 236 """
237 Filters out flags with '=' as this breaks the /stats feature of the buildbot. 237 Filters out flags with '=' as this breaks the /stats feature of the buildbot.
238 """ 238 """
239 flags = [x for x in flags if not '=' in x] 239 flags = [x for x in flags if not '=' in x]
240 return ('%s tests %s' % (name, ' '.join(flags))).strip() 240 return ('%s tests %s' % (name, ' '.join(flags))).strip()
OLDNEW
« no previous file with comments | « no previous file | tools/bots/compiler.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698