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*)') |
|
ricow1
2014/08/12 13:17:06
I will remove it from here once I have removed the
| |
| 27 DART2JS_FULL_BUILDER = r'full-(linux|mac|win7|win8)(-(ie10|ie11))?(-checked)?(-m inified)?-(\d+)-(\d+)' | 27 DART2JS_FULL_BUILDER = r'full-(linux|mac|win7|win8)(-(ie10|ie11))?(-checked)?(-m inified)?-(\d+)-(\d+)' |
| 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' : [ |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 56 system = None | 56 system = None |
| 57 checked = False | 57 checked = False |
| 58 host_checked = False | 58 host_checked = False |
| 59 minified = False | 59 minified = False |
| 60 shard_index = None | 60 shard_index = None |
| 61 total_shards = None | 61 total_shards = None |
| 62 test_set = None | 62 test_set = None |
| 63 csp = None | 63 csp = None |
| 64 arch = None | 64 arch = None |
| 65 dart2js_full = False | 65 dart2js_full = False |
| 66 batch = False | 66 batch = True |
| 67 builder_tag = None | 67 builder_tag = None |
| 68 | 68 |
| 69 dart2js_pattern = re.match(DART2JS_BUILDER, builder_name) | 69 dart2js_pattern = re.match(DART2JS_BUILDER, builder_name) |
| 70 dart2js_full_pattern = re.match(DART2JS_FULL_BUILDER, builder_name) | 70 dart2js_full_pattern = re.match(DART2JS_FULL_BUILDER, builder_name) |
| 71 web_pattern = re.match(WEB_BUILDER, builder_name) | 71 web_pattern = re.match(WEB_BUILDER, builder_name) |
| 72 dartium_pattern = re.match(DARTIUM_BUILDER, builder_name) | 72 dartium_pattern = re.match(DARTIUM_BUILDER, builder_name) |
| 73 | 73 |
| 74 if web_pattern: | 74 if web_pattern: |
| 75 compiler = 'dart2js' | 75 compiler = 'dart2js' |
| 76 runtime = web_pattern.group(1) | 76 runtime = web_pattern.group(1) |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 116 if dart2js_pattern.group(6) == 'checked': | 116 if dart2js_pattern.group(6) == 'checked': |
| 117 checked = True | 117 checked = True |
| 118 if dart2js_pattern.group(6) == 'host-checked': | 118 if dart2js_pattern.group(6) == 'host-checked': |
| 119 host_checked = True | 119 host_checked = True |
| 120 if dart2js_pattern.group(8) == 'host-checked': | 120 if dart2js_pattern.group(8) == 'host-checked': |
| 121 host_checked = True | 121 host_checked = True |
| 122 if dart2js_pattern.group(10) == 'minified': | 122 if dart2js_pattern.group(10) == 'minified': |
| 123 minified = True | 123 minified = True |
| 124 if dart2js_pattern.group(12) == 'x64': | 124 if dart2js_pattern.group(12) == 'x64': |
| 125 arch = 'x64' | 125 arch = 'x64' |
| 126 if dart2js_pattern.group(14) == 'batch': | |
| 127 batch = True | |
| 128 | |
| 129 shard_index = dart2js_pattern.group(15) | 126 shard_index = dart2js_pattern.group(15) |
| 130 total_shards = dart2js_pattern.group(16) | 127 total_shards = dart2js_pattern.group(16) |
| 131 elif dartium_pattern: | 128 elif dartium_pattern: |
| 132 compiler = 'none' | 129 compiler = 'none' |
| 133 runtime = 'dartium' | 130 runtime = 'dartium' |
| 134 mode = 'release' | 131 mode = 'release' |
| 135 system = dartium_pattern.group(1) | 132 system = dartium_pattern.group(1) |
| 136 else : | 133 else : |
| 137 return None | 134 return None |
| 138 | 135 |
| 139 # We have both win7 and win8 bots, functionality is the same. | 136 # We have both win7 and win8 bots, functionality is the same. |
| 140 if system.startswith('win'): | 137 if system.startswith('win'): |
| 141 system = 'windows' | 138 system = 'windows' |
| 142 | 139 |
| 143 # We have both 10.8 and 10.7 bots, functionality is the same. | 140 # We have both 10.8 and 10.7 bots, functionality is the same. |
| 144 if system == 'mac10.8' or system == 'mac10.7': | 141 if system == 'mac10.8' or system == 'mac10.7': |
| 145 system = 'mac' | 142 system = 'mac' |
| 146 | 143 |
| 147 # This is temporary, slowly enabling this. | |
| 148 if system == 'linux' or system == 'mac': | |
| 149 batch = True | |
| 150 | |
| 151 if (system == 'windows' and platform.system() != 'Windows') or ( | 144 if (system == 'windows' and platform.system() != 'Windows') or ( |
| 152 system == 'mac' and platform.system() != 'Darwin') or ( | 145 system == 'mac' and platform.system() != 'Darwin') or ( |
| 153 system == 'linux' and platform.system() != 'Linux'): | 146 system == 'linux' and platform.system() != 'Linux'): |
| 154 print ('Error: You cannot emulate a buildbot with a platform different ' | 147 print ('Error: You cannot emulate a buildbot with a platform different ' |
| 155 'from your own.') | 148 'from your own.') |
| 156 return None | 149 return None |
| 157 return bot.BuildInfo(compiler, runtime, mode, system, checked, host_checked, | 150 return bot.BuildInfo(compiler, runtime, mode, system, checked, host_checked, |
| 158 minified, shard_index, total_shards, is_buildbot, | 151 minified, shard_index, total_shards, is_buildbot, |
| 159 test_set, csp, arch, dart2js_full, batch=batch, | 152 test_set, csp, arch, dart2js_full, batch=batch, |
| 160 builder_tag=builder_tag) | 153 builder_tag=builder_tag) |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 404 if build_info.mode == 'debug': | 397 if build_info.mode == 'debug': |
| 405 target = 'dart2js_bot_debug' | 398 target = 'dart2js_bot_debug' |
| 406 args = [sys.executable, './tools/build.py', '--mode=' + build_info.mode, | 399 args = [sys.executable, './tools/build.py', '--mode=' + build_info.mode, |
| 407 '--arch=' + build_info.arch, target] | 400 '--arch=' + build_info.arch, target] |
| 408 print 'Build SDK and d8: %s' % (' '.join(args)) | 401 print 'Build SDK and d8: %s' % (' '.join(args)) |
| 409 bot.RunProcess(args) | 402 bot.RunProcess(args) |
| 410 | 403 |
| 411 | 404 |
| 412 if __name__ == '__main__': | 405 if __name__ == '__main__': |
| 413 bot.RunBot(GetBuildInfo, RunCompilerTests, build_step=BuildCompiler) | 406 bot.RunBot(GetBuildInfo, RunCompilerTests, build_step=BuildCompiler) |
| OLD | NEW |