OLD | NEW |
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 Loading... |
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() |
OLD | NEW |