Chromium Code Reviews| 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 Dart2js buildbot steps | 8 Dart2js buildbot steps |
| 9 | 9 |
| 10 Runs tests for the dart2js compiler. | 10 Runs tests for the dart2js compiler. |
| 11 """ | 11 """ |
| 12 | 12 |
| 13 import os | 13 import os |
| 14 import platform | 14 import platform |
| 15 import re | 15 import re |
| 16 import shutil | 16 import shutil |
| 17 import socket | 17 import socket |
| 18 import string | 18 import string |
| 19 import subprocess | 19 import subprocess |
| 20 import sys | 20 import sys |
| 21 | 21 |
| 22 import bot | 22 import bot |
| 23 | 23 |
| 24 DARTIUM_BUILDER = r'none-dartium-(linux|mac|windows)' | 24 DARTIUM_BUILDER = r'none-dartium-(linux|mac|windows)' |
| 25 DART2JS_BUILDER = ( | 25 DART2JS_BUILDER = ( |
| 26 r'dart2js-(linux|mac|windows)(-(jsshell))?-(debug|release)(-(checked|host-ch ecked))?(-(host-checked))?(-(minified))?(-(x64))?(-(batch))?-?(\d*)-?(\d*)') | 26 r'dart2js-(linux|mac|windows)(-(jsshell))?-(debug|release)(-(checked|host-ch ecked))?(-(host-checked))?(-(minified))?(-(x64))?(-(batch))?-?(\d*)-?(\d*)') |
| 27 DART2JS_FULL_BUILDER = r'dart2js-full-(linux|mac|windows-ie10|windows-ie11)(-che cked)?(-minified)?-(\d+)-(\d+)' | 27 DART2JS_FULL_BUILDER = r'full-(linux|mac|win7|win8)(-(ie10|ie11))?(-checked)?(-m inified)?-(\d+)-(\d+)' |
|
Bill Hesse
2014/07/07 13:02:41
Grab the '-' eagerly? : ...|win8)-((ie10|ie11)-)?
ricow1
2014/07/07 13:05:42
They are not, on the contrary, we overwrite it for
| |
| 28 WEB_BUILDER = ( | 28 WEB_BUILDER = ( |
| 29 r'dart2js-(ie9|ie10|ie11|ff|safari|chrome|chromeOnAndroid|safarimobilesim|op era|drt)-(win7|win8|mac10\.8|mac10\.7|linux)(-(all|html))?(-(csp))?(-(\d+)-(\d+) )?') | 29 r'dart2js-(ie9|ie10|ie11|ff|safari|chrome|chromeOnAndroid|safarimobilesim|op era|drt)-(win7|win8|mac10\.8|mac10\.7|linux)(-(all|html))?(-(csp))?(-(\d+)-(\d+) )?') |
| 30 | 30 |
| 31 IE_VERSIONS = ['ie10', 'ie11'] | 31 IE_VERSIONS = ['ie10', 'ie11'] |
| 32 | 32 |
| 33 DART2JS_FULL_CONFIGURATIONS = { | 33 DART2JS_FULL_CONFIGURATIONS = { |
| 34 'linux' : [ ], | 34 'linux' : [ ], |
| 35 'mac' : [ ], | 35 'mac' : [ ], |
| 36 'windows-ie10' : [ | 36 'windows-ie10' : [ |
| 37 {'runtime' : 'ie10'}, | 37 {'runtime' : 'ie10'}, |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 82 shard_index = web_pattern.group(8) | 82 shard_index = web_pattern.group(8) |
| 83 total_shards = web_pattern.group(9) | 83 total_shards = web_pattern.group(9) |
| 84 elif dart2js_full_pattern: | 84 elif dart2js_full_pattern: |
| 85 mode = 'release' | 85 mode = 'release' |
| 86 compiler = 'dart2js' | 86 compiler = 'dart2js' |
| 87 dart2js_full = True | 87 dart2js_full = True |
| 88 system = dart2js_full_pattern.group(1) | 88 system = dart2js_full_pattern.group(1) |
| 89 # windows-ie10 or windows-ie11 means a windows machine with that respective | 89 # windows-ie10 or windows-ie11 means a windows machine with that respective |
| 90 # version of ie installed. There is no difference in how we handle testing. | 90 # version of ie installed. There is no difference in how we handle testing. |
| 91 # We use the builder tag to pass along this information. | 91 # We use the builder tag to pass along this information. |
| 92 if system.startswith('windows'): | 92 if system.startswith('win'): |
| 93 system_and_ie = string.split(system, '-') | 93 ie = dart2js_full_pattern.group(3) |
| 94 assert len(system_and_ie) == 2 | 94 assert ie in IE_VERSIONS |
| 95 assert system_and_ie[0] == 'windows' | 95 builder_tag = 'windows-%s' % ie |
| 96 assert system_and_ie[1] in IE_VERSIONS | |
| 97 builder_tag = system | |
| 98 system = 'windows' | 96 system = 'windows' |
| 99 if dart2js_full_pattern.group(2): | 97 if dart2js_full_pattern.group(2): |
| 100 checked = True | 98 checked = True |
| 101 if dart2js_full_pattern.group(3): | 99 if dart2js_full_pattern.group(3): |
| 102 minified = True | 100 minified = True |
| 103 shard_index = dart2js_full_pattern.group(4) | 101 shard_index = dart2js_full_pattern.group(4) |
| 104 total_shards = dart2js_full_pattern.group(5) | 102 total_shards = dart2js_full_pattern.group(5) |
| 105 elif dart2js_pattern: | 103 elif dart2js_pattern: |
| 106 compiler = 'dart2js' | 104 compiler = 'dart2js' |
| 107 system = dart2js_pattern.group(1) | 105 system = dart2js_pattern.group(1) |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 143 | 141 |
| 144 # We have both 10.8 and 10.7 bots, functionality is the same. | 142 # We have both 10.8 and 10.7 bots, functionality is the same. |
| 145 if system == 'mac10.8' or system == 'mac10.7': | 143 if system == 'mac10.8' or system == 'mac10.7': |
| 146 system = 'mac' | 144 system = 'mac' |
| 147 | 145 |
| 148 if (system == 'windows' and platform.system() != 'Windows') or ( | 146 if (system == 'windows' and platform.system() != 'Windows') or ( |
| 149 system == 'mac' and platform.system() != 'Darwin') or ( | 147 system == 'mac' and platform.system() != 'Darwin') or ( |
| 150 system == 'linux' and platform.system() != 'Linux'): | 148 system == 'linux' and platform.system() != 'Linux'): |
| 151 print ('Error: You cannot emulate a buildbot with a platform different ' | 149 print ('Error: You cannot emulate a buildbot with a platform different ' |
| 152 'from your own.') | 150 'from your own.') |
| 153 return None | 151 # return None |
|
Bill Hesse
2014/07/07 13:02:41
Stray comment marker?
ricow1
2014/07/07 13:05:42
Thanks
| |
| 154 return bot.BuildInfo(compiler, runtime, mode, system, checked, host_checked, | 152 return bot.BuildInfo(compiler, runtime, mode, system, checked, host_checked, |
| 155 minified, shard_index, total_shards, is_buildbot, | 153 minified, shard_index, total_shards, is_buildbot, |
| 156 test_set, csp, arch, dart2js_full, batch=batch, | 154 test_set, csp, arch, dart2js_full, batch=batch, |
| 157 builder_tag=builder_tag) | 155 builder_tag=builder_tag) |
| 158 | 156 |
| 159 | 157 |
| 160 def NeedsXterm(compiler, runtime): | 158 def NeedsXterm(compiler, runtime): |
| 161 return runtime in ['ie9', 'ie10', 'ie11', 'chrome', 'safari', 'opera', | 159 return runtime in ['ie9', 'ie10', 'ie11', 'chrome', 'safari', 'opera', |
| 162 'ff', 'drt', 'dartium'] | 160 'ff', 'drt', 'dartium'] |
| 163 | 161 |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 401 if build_info.mode == 'debug': | 399 if build_info.mode == 'debug': |
| 402 target = 'dart2js_bot_debug' | 400 target = 'dart2js_bot_debug' |
| 403 args = [sys.executable, './tools/build.py', '--mode=' + build_info.mode, | 401 args = [sys.executable, './tools/build.py', '--mode=' + build_info.mode, |
| 404 '--arch=' + build_info.arch, target] | 402 '--arch=' + build_info.arch, target] |
| 405 print 'Build SDK and d8: %s' % (' '.join(args)) | 403 print 'Build SDK and d8: %s' % (' '.join(args)) |
| 406 bot.RunProcess(args) | 404 bot.RunProcess(args) |
| 407 | 405 |
| 408 | 406 |
| 409 if __name__ == '__main__': | 407 if __name__ == '__main__': |
| 410 bot.RunBot(GetBuildInfo, RunCompilerTests, build_step=BuildCompiler) | 408 bot.RunBot(GetBuildInfo, RunCompilerTests, build_step=BuildCompiler) |
| OLD | NEW |