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

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

Issue 2231073002: Change SDK builder bot to use sysroots when compiling (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | tools/bots/dart_sdk.py » ('j') | tools/bots/dart_sdk.py » ('J')
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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 os.path.join('third_party', 'pkg', 'test', 'bin', 'test.dart')) 264 os.path.join('third_party', 'pkg', 'test', 'bin', 'test.dart'))
265 265
266 with utils.ChangedWorkingDirectory(path): 266 with utils.ChangedWorkingDirectory(path):
267 args = [dart_bin, '--package-root=' + package_root, test_bin, 267 args = [dart_bin, '--package-root=' + package_root, test_bin,
268 '--package-root', package_root, '--reporter', 'expanded', 268 '--package-root', package_root, '--reporter', 'expanded',
269 '--no-color'] 269 '--no-color']
270 print("Running %s" % ' '.join(args)) 270 print("Running %s" % ' '.join(args))
271 RunProcess(args) 271 RunProcess(args)
272 272
273 273
274 def RunProcess(command): 274 def RunProcess(command, env=None):
275 """ 275 """
276 Runs command. 276 Runs command.
277 277
278 If a non-zero exit code is returned, raises an OSError with errno as the exit 278 If a non-zero exit code is returned, raises an OSError with errno as the exit
279 code. 279 code.
280 """ 280 """
281 no_color_env = dict(os.environ) 281 if env is None:
282 no_color_env = dict(os.environ)
283 else:
284 no_color_env = env
282 no_color_env['TERM'] = 'nocolor' 285 no_color_env['TERM'] = 'nocolor'
283 286
284 exit_code = subprocess.call(command, env=no_color_env) 287 exit_code = subprocess.call(command, env=no_color_env)
285 if exit_code != 0: 288 if exit_code != 0:
286 raise OSError(exit_code) 289 raise OSError(exit_code)
287 290
288 291
289 def GetStepName(name, flags): 292 def GetStepName(name, flags):
290 """ 293 """
291 Filters out flags with '=' as this breaks the /stats feature of the buildbot. 294 Filters out flags with '=' as this breaks the /stats feature of the buildbot.
292 """ 295 """
293 flags = [x for x in flags if not '=' in x] 296 flags = [x for x in flags if not '=' in x]
294 return ('%s tests %s' % (name, ' '.join(flags))).strip() 297 return ('%s tests %s' % (name, ' '.join(flags))).strip()
OLDNEW
« no previous file with comments | « no previous file | tools/bots/dart_sdk.py » ('j') | tools/bots/dart_sdk.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698