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 |
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 BUILDER_NAME = 'BUILDBOT_BUILDERNAME' | 20 BUILDER_NAME = 'BUILDBOT_BUILDERNAME' |
21 BUILDER_CLOBBER = 'BUILDBOT_CLOBBER' | 21 BUILDER_CLOBBER = 'BUILDBOT_CLOBBER' |
22 | 22 |
23 | 23 |
24 class BuildInfo(object): | 24 class BuildInfo(object): |
25 """ | 25 """ |
26 Encapsulation of build information. | 26 Encapsulation of build information. |
27 | 27 |
28 - compiler: None, 'dart2dart' or 'dart2js' | 28 - compiler: None or 'dart2js' |
29 - runtime: 'd8', 'ie', 'ff', 'safari', 'chrome', 'opera', or None. | 29 - runtime: 'd8', 'ie', 'ff', 'safari', 'chrome', 'opera', or None. |
30 - mode: 'debug' or 'release'. | 30 - mode: 'debug' or 'release'. |
31 - system: 'linux', 'mac', or 'win7'. | 31 - system: 'linux', 'mac', or 'win7'. |
32 - checked: True if we should run in checked mode, otherwise False. | 32 - checked: True if we should run in checked mode, otherwise False. |
33 - host_checked: True if we should run in host checked mode, otherwise False. | 33 - host_checked: True if we should run in host checked mode, otherwise False. |
34 - minified: True if we should minify the code, otherwise False | 34 - minified: True if we should minify the code, otherwise False |
35 - shard_index: The shard we are running, None when not specified. | 35 - shard_index: The shard we are running, None when not specified. |
36 - total_shards: The total number of shards, None when not specified. | 36 - total_shards: The total number of shards, None when not specified. |
37 - is_buildbot: True if we are on a buildbot (or emulating it). | 37 - is_buildbot: True if we are on a buildbot (or emulating it). |
38 - test_set: Specification of a non standard test set or None. | 38 - test_set: Specification of a non standard test set or None. |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 if exit_code != 0: | 254 if exit_code != 0: |
255 raise OSError(exit_code) | 255 raise OSError(exit_code) |
256 | 256 |
257 | 257 |
258 def GetStepName(name, flags): | 258 def GetStepName(name, flags): |
259 """ | 259 """ |
260 Filters out flags with '=' as this breaks the /stats feature of the buildbot. | 260 Filters out flags with '=' as this breaks the /stats feature of the buildbot. |
261 """ | 261 """ |
262 flags = [x for x in flags if not '=' in x] | 262 flags = [x for x in flags if not '=' in x] |
263 return ('%s tests %s' % (name, ' '.join(flags))).strip() | 263 return ('%s tests %s' % (name, ' '.join(flags))).strip() |
OLD | NEW |