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

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

Issue 15741006: Add chromeOnAndroid support to the buildbot annotated steps scripts. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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
11 import optparse 11 import optparse
12 import os 12 import os
13 from os.path import abspath 13 from os.path import abspath
14 from os.path import dirname 14 from os.path import dirname
15 import subprocess 15 import subprocess
16 import sys 16 import sys
17 17
18 DART_PATH = dirname(dirname(dirname(abspath(__file__)))) 18 DART_PATH = dirname(dirname(dirname(abspath(__file__))))
19 19
20 NO_COLOR_ENV = dict(os.environ)
21 NO_COLOR_ENV['TERM'] = 'nocolor'
22
23 BUILDER_NAME = 'BUILDBOT_BUILDERNAME' 20 BUILDER_NAME = 'BUILDBOT_BUILDERNAME'
24 BUILDER_CLOBBER = 'BUILDBOT_CLOBBER' 21 BUILDER_CLOBBER = 'BUILDBOT_CLOBBER'
25 22
26 23
27 class BuildInfo(object): 24 class BuildInfo(object):
28 """ 25 """
29 Encapsulation of build information. 26 Encapsulation of build information.
30 27
31 - compiler: None, 'dart2dart', 'dart2js' or 'dartc'. 28 - compiler: None, 'dart2dart', 'dart2js' or 'dartc'.
32 - runtime: 'd8', 'ie', 'ff', 'safari', 'chrome', 'opera', or None. 29 - runtime: 'd8', 'ie', 'ff', 'safari', 'chrome', 'opera', or None.
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 RunProcess(cmd) 219 RunProcess(cmd)
223 220
224 221
225 def RunProcess(command): 222 def RunProcess(command):
226 """ 223 """
227 Runs command. 224 Runs command.
228 225
229 If a non-zero exit code is returned, raises an OSError with errno as the exit 226 If a non-zero exit code is returned, raises an OSError with errno as the exit
230 code. 227 code.
231 """ 228 """
232 exit_code = subprocess.call(command, env=NO_COLOR_ENV) 229 no_color_env = dict(os.environ)
230 no_color_env['TERM'] = 'nocolor'
231
232 exit_code = subprocess.call(command, env=no_color_env)
233 if exit_code != 0: 233 if exit_code != 0:
234 raise OSError(exit_code) 234 raise OSError(exit_code)
235 235
236 236
237 def GetStepName(name, flags): 237 def GetStepName(name, flags):
238 """ 238 """
239 Filters out flags with '=' as this breaks the /stats feature of the buildbot. 239 Filters out flags with '=' as this breaks the /stats feature of the buildbot.
240 """ 240 """
241 flags = [x for x in flags if not '=' in x] 241 flags = [x for x in flags if not '=' in x]
242 return ('%s tests %s' % (name, ' '.join(flags))).strip() 242 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