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

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

Issue 11262028: Testing support for running tests minified in dart2js. (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 | « 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 Chromium Authors. All rights reserved. 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # 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 16 matching lines...) Expand all
27 class BuildInfo(object): 27 class BuildInfo(object):
28 """ 28 """
29 Encapsulation of build information. 29 Encapsulation of build information.
30 30
31 - compiler: None, 'dart2dart', 'dart2js' or 'dartc'. 31 - compiler: None, 'dart2dart', 'dart2js' or 'dartc'.
32 - runtime: 'd8', 'ie', 'ff', 'safari', 'chrome', 'opera', or None. 32 - runtime: 'd8', 'ie', 'ff', 'safari', 'chrome', 'opera', or None.
33 - mode: 'debug' or 'release'. 33 - mode: 'debug' or 'release'.
34 - system: 'linux', 'mac', or 'win7'. 34 - system: 'linux', 'mac', or 'win7'.
35 - checked: True if we should run in checked mode, otherwise False. 35 - checked: True if we should run in checked mode, otherwise False.
36 - host_checked: True if we should run in host checked mode, otherwise False. 36 - host_checked: True if we should run in host checked mode, otherwise False.
37 - minified: True if we should minify the code, otherwise False
37 - shard_index: The shard we are running, None when not specified. 38 - shard_index: The shard we are running, None when not specified.
38 - total_shards: The total number of shards, None when not specified. 39 - total_shards: The total number of shards, None when not specified.
39 - is_buildbot: True if we are on a buildbot (or emulating it). 40 - is_buildbot: True if we are on a buildbot (or emulating it).
40 - test_set: Specification of a non standard test set or None. 41 - test_set: Specification of a non standard test set or None.
41 """ 42 """
42 def __init__(self, compiler, runtime, mode, system, checked=False, 43 def __init__(self, compiler, runtime, mode, system, checked=False,
43 host_checked=False, shard_index=None, total_shards=None, 44 host_checked=False, minified=False, shard_index=None,
44 is_buildbot=False, test_set=None): 45 total_shards=None, is_buildbot=False, test_set=None):
45 self.compiler = compiler 46 self.compiler = compiler
46 self.runtime = runtime 47 self.runtime = runtime
47 self.mode = mode 48 self.mode = mode
48 self.system = system 49 self.system = system
49 self.checked = checked 50 self.checked = checked
50 self.host_checked = host_checked 51 self.host_checked = host_checked
52 self.minified = minified
51 self.shard_index = shard_index 53 self.shard_index = shard_index
52 self.total_shards = total_shards 54 self.total_shards = total_shards
53 self.is_buildbot = is_buildbot 55 self.is_buildbot = is_buildbot
54 self.test_set = test_set 56 self.test_set = test_set
55 57
56 def PrintBuildInfo(self): 58 def PrintBuildInfo(self):
57 shard_description = "" 59 shard_description = ""
58 if self.shard_index: 60 if self.shard_index:
59 shard_description = " shard %s of %s" % (self.shard_index, 61 shard_description = " shard %s of %s" % (self.shard_index,
60 self.total_shards) 62 self.total_shards)
61 print ("compiler: %s, runtime: %s mode: %s, system: %s," 63 print ("compiler: %s, runtime: %s mode: %s, system: %s,"
62 " checked: %s, host-checked: %s, test-set: %s%s" 64 " checked: %s, host-checked: %s, minified: %s, test-set: %s%s"
63 ) % (self.compiler, self.runtime, self.mode, self.system, 65 ) % (self.compiler, self.runtime, self.mode, self.system,
64 self.checked, self.host_checked, self.test_set, 66 self.checked, self.host_checked, self.minified, self.test_set,
65 shard_description) 67 shard_description)
66 68
67 69
68 class BuildStep(object): 70 class BuildStep(object):
69 """ 71 """
70 A context manager for handling build steps. 72 A context manager for handling build steps.
71 73
72 When the context manager is entered, it prints the "@@@BUILD_STEP __@@@" 74 When the context manager is entered, it prints the "@@@BUILD_STEP __@@@"
73 message. If it exits from an error being raised it displays the 75 message. If it exits from an error being raised it displays the
74 "@@@STEP_FAILURE@@@" message. 76 "@@@STEP_FAILURE@@@" message.
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 if exit_code != 0: 229 if exit_code != 0:
228 raise OSError(exit_code) 230 raise OSError(exit_code)
229 231
230 232
231 def GetStepName(name, flags): 233 def GetStepName(name, flags):
232 """ 234 """
233 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.
234 """ 236 """
235 flags = [x for x in flags if not '=' in x] 237 flags = [x for x in flags if not '=' in x]
236 return ('%s tests %s' % (name, ' '.join(flags))).strip() 238 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