| 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 subprocess | 18 import subprocess |
| 19 import sys | 19 import sys |
| 20 | 20 |
| 21 import bot | 21 import bot |
| 22 | 22 |
| 23 DARTIUM_BUILDER = r'none-dartium-(linux|mac|windows)' | 23 DARTIUM_BUILDER = r'none-dartium-(linux|mac|windows)' |
| 24 DART2JS_BUILDER = ( | 24 DART2JS_BUILDER = ( |
| 25 r'dart2js-(linux|mac|windows)(-(jsshell))?-(debug|release)(-(checked|host-ch
ecked))?(-(host-checked))?(-(minified))?(-(x64))?-?(\d*)-?(\d*)') | 25 r'dart2js-(linux|mac|windows)(-(jsshell))?-(debug|release)(-(checked|host-ch
ecked))?(-(host-checked))?(-(minified))?(-(x64))?-?(\d*)-?(\d*)') |
| 26 DART2JS_FULL_BUILDER = r'dart2js-full-(linux|mac|windows)(-checked)?(-minified)?
-(\d+)-(\d+)' | 26 DART2JS_FULL_BUILDER = r'dart2js-full-(linux|mac|windows)(-checked)?(-minified)?
-(\d+)-(\d+)' |
| 27 WEB_BUILDER = ( | 27 WEB_BUILDER = ( |
| 28 r'dart2js-(ie9|ie10|ff|safari|chrome|chromeOnAndroid|opera|drt)-(win7|win8|m
ac10\.8|mac10\.7|linux)(-(all|html))?(-(csp))?(-(\d+)-(\d+))?') | 28 r'dart2js-(ie9|ie10|ie11|ff|safari|chrome|chromeOnAndroid|opera|drt)-(win7|w
in8|mac10\.8|mac10\.7|linux)(-(all|html))?(-(csp))?(-(\d+)-(\d+))?') |
| 29 | 29 |
| 30 DART2JS_FULL_CONFIGURATIONS = { | 30 DART2JS_FULL_CONFIGURATIONS = { |
| 31 'linux' : [ ], | 31 'linux' : [ ], |
| 32 'mac' : [ ], | 32 'mac' : [ ], |
| 33 'windows' : [ | 33 'windows' : [ |
| 34 {'runtime' : 'ie9'}, | 34 {'runtime' : 'ie9'}, |
| 35 {'runtime' : 'ie9', 'additional_flags' : ['--checked']}, | 35 {'runtime' : 'ie9', 'additional_flags' : ['--checked']}, |
| 36 {'runtime' : 'ff'}, | 36 {'runtime' : 'ff'}, |
| 37 {'runtime' : 'chrome'}, | 37 {'runtime' : 'chrome'}, |
| 38 ], | 38 ], |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 system == 'linux' and platform.system() != 'Linux'): | 129 system == 'linux' and platform.system() != 'Linux'): |
| 130 print ('Error: You cannot emulate a buildbot with a platform different ' | 130 print ('Error: You cannot emulate a buildbot with a platform different ' |
| 131 'from your own.') | 131 'from your own.') |
| 132 return None | 132 return None |
| 133 return bot.BuildInfo(compiler, runtime, mode, system, checked, host_checked, | 133 return bot.BuildInfo(compiler, runtime, mode, system, checked, host_checked, |
| 134 minified, shard_index, total_shards, is_buildbot, | 134 minified, shard_index, total_shards, is_buildbot, |
| 135 test_set, csp, arch, dart2js_full) | 135 test_set, csp, arch, dart2js_full) |
| 136 | 136 |
| 137 | 137 |
| 138 def NeedsXterm(compiler, runtime): | 138 def NeedsXterm(compiler, runtime): |
| 139 return runtime in ['ie9', 'ie10', 'chrome', 'safari', 'opera', 'ff', 'drt', | 139 return runtime in ['ie9', 'ie10', 'ie11', 'chrome', 'safari', 'opera', |
| 140 'dartium'] | 140 'ff', 'drt', 'dartium'] |
| 141 | 141 |
| 142 | 142 |
| 143 def TestStepName(name, flags): | 143 def TestStepName(name, flags): |
| 144 # Filter out flags with '=' as this breaks the /stats feature of the | 144 # Filter out flags with '=' as this breaks the /stats feature of the |
| 145 # build bot. | 145 # build bot. |
| 146 flags = [x for x in flags if not '=' in x] | 146 flags = [x for x in flags if not '=' in x] |
| 147 return ('%s tests %s' % (name, ' '.join(flags))).strip() | 147 return ('%s tests %s' % (name, ' '.join(flags))).strip() |
| 148 | 148 |
| 149 | 149 |
| 150 IsFirstTestStepCall = True | 150 IsFirstTestStepCall = True |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 if runtime == 'd8': | 254 if runtime == 'd8': |
| 255 # The dart2js compiler isn't self-hosted (yet) so we run its | 255 # The dart2js compiler isn't self-hosted (yet) so we run its |
| 256 # unit tests on the VM. We avoid doing this on the builders | 256 # unit tests on the VM. We avoid doing this on the builders |
| 257 # that run the browser tests to cut down on the cycle time. | 257 # that run the browser tests to cut down on the cycle time. |
| 258 unit_test_flags = [flag for flag in flags if flag.startswith('--shard')] | 258 unit_test_flags = [flag for flag in flags if flag.startswith('--shard')] |
| 259 # Run the unit tests in checked mode (the VM's checked mode). | 259 # Run the unit tests in checked mode (the VM's checked mode). |
| 260 unit_test_flags.append('--checked') | 260 unit_test_flags.append('--checked') |
| 261 TestStep("dart2js_unit", mode, system, 'none', 'vm', ['dart2js'], | 261 TestStep("dart2js_unit", mode, system, 'none', 'vm', ['dart2js'], |
| 262 unit_test_flags, arch) | 262 unit_test_flags, arch) |
| 263 | 263 |
| 264 if compiler == 'dart2js' and system == 'windows' and runtime == 'ie10': | 264 if compiler == 'dart2js' and runtime in ['ie10', 'ie11']: |
| 265 TestStep("%s-%s" % (compiler, runtime), mode, system, compiler, runtime, | 265 TestStep("%s-%s" % (compiler, runtime), mode, system, compiler, runtime, |
| 266 ['html'], flags, arch) | 266 ['html'], flags, arch) |
| 267 else: | 267 else: |
| 268 # Run the default set of test suites. | 268 # Run the default set of test suites. |
| 269 TestStep("%s-%s" % (compiler, runtime), mode, system, compiler, | 269 TestStep("%s-%s" % (compiler, runtime), mode, system, compiler, |
| 270 runtime, [], flags, arch) | 270 runtime, [], flags, arch) |
| 271 | 271 |
| 272 if compiler == 'dart2js': | 272 if compiler == 'dart2js': |
| 273 # TODO(kasperl): Consider running peg and css tests too. | 273 # TODO(kasperl): Consider running peg and css tests too. |
| 274 extras = ['dart2js_extra', 'dart2js_native'] | 274 extras = ['dart2js_extra', 'dart2js_native'] |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 """ | 367 """ |
| 368 with bot.BuildStep('Build SDK'): | 368 with bot.BuildStep('Build SDK'): |
| 369 args = [sys.executable, './tools/build.py', '--mode=' + build_info.mode, | 369 args = [sys.executable, './tools/build.py', '--mode=' + build_info.mode, |
| 370 '--arch=' + build_info.arch, 'dart2js_bot'] | 370 '--arch=' + build_info.arch, 'dart2js_bot'] |
| 371 print 'Build SDK and d8: %s' % (' '.join(args)) | 371 print 'Build SDK and d8: %s' % (' '.join(args)) |
| 372 bot.RunProcess(args) | 372 bot.RunProcess(args) |
| 373 | 373 |
| 374 | 374 |
| 375 if __name__ == '__main__': | 375 if __name__ == '__main__': |
| 376 bot.RunBot(GetBuildInfo, RunCompilerTests, build_step=BuildCompiler) | 376 bot.RunBot(GetBuildInfo, RunCompilerTests, build_step=BuildCompiler) |
| OLD | NEW |