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

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

Issue 1087153002: Change annotated steps to support the cps based dart2js backend (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 months 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 | « tools/bots/bot.py ('k') | no next file » | 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 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))?-?(\d*)-?(\d*)') 26 r'dart2js-(linux|mac|windows)(-(jsshell))?-(debug|release)(-(checked|host-ch ecked))?(-(host-checked))?(-(minified))?(-(x64))?(-(cps))?-?(\d*)-?(\d*)')
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\.7|mac10\.8|mac10\.9|linux)(-(all|html))?(-(csp))?(-(\ d+)-(\d+))?') 29 r'dart2js-(ie9|ie10|ie11|ff|safari|chrome|chromeOnAndroid|safarimobilesim|op era|drt)-(win7|win8|mac10\.7|mac10\.8|mac10\.9|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 {'runtime' : 'ff'}, 35 {'runtime' : 'ff'},
36 {'runtime' : 'chrome'}, 36 {'runtime' : 'chrome'},
(...skipping 22 matching lines...) Expand all
59 host_checked = False 59 host_checked = False
60 minified = False 60 minified = False
61 shard_index = None 61 shard_index = None
62 total_shards = None 62 total_shards = None
63 test_set = None 63 test_set = None
64 csp = None 64 csp = None
65 arch = None 65 arch = None
66 dart2js_full = False 66 dart2js_full = False
67 batch = True 67 batch = True
68 builder_tag = None 68 builder_tag = None
69 cps_ir = None
69 70
70 dart2js_pattern = re.match(DART2JS_BUILDER, builder_name) 71 dart2js_pattern = re.match(DART2JS_BUILDER, builder_name)
71 dart2js_full_pattern = re.match(DART2JS_FULL_BUILDER, builder_name) 72 dart2js_full_pattern = re.match(DART2JS_FULL_BUILDER, builder_name)
72 web_pattern = re.match(WEB_BUILDER, builder_name) 73 web_pattern = re.match(WEB_BUILDER, builder_name)
73 dartium_pattern = re.match(DARTIUM_BUILDER, builder_name) 74 dartium_pattern = re.match(DARTIUM_BUILDER, builder_name)
74 75
75 if web_pattern: 76 if web_pattern:
76 compiler = 'dart2js' 77 compiler = 'dart2js'
77 runtime = web_pattern.group(1) 78 runtime = web_pattern.group(1)
78 system = web_pattern.group(2) 79 system = web_pattern.group(2)
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 if dart2js_pattern.group(6) == 'checked': 120 if dart2js_pattern.group(6) == 'checked':
120 checked = True 121 checked = True
121 if dart2js_pattern.group(6) == 'host-checked': 122 if dart2js_pattern.group(6) == 'host-checked':
122 host_checked = True 123 host_checked = True
123 if dart2js_pattern.group(8) == 'host-checked': 124 if dart2js_pattern.group(8) == 'host-checked':
124 host_checked = True 125 host_checked = True
125 if dart2js_pattern.group(10) == 'minified': 126 if dart2js_pattern.group(10) == 'minified':
126 minified = True 127 minified = True
127 if dart2js_pattern.group(12) == 'x64': 128 if dart2js_pattern.group(12) == 'x64':
128 arch = 'x64' 129 arch = 'x64'
129 shard_index = dart2js_pattern.group(13) 130 if dart2js_pattern.group(14) == 'cps':
130 total_shards = dart2js_pattern.group(14) 131 cps_ir = True
132 shard_index = dart2js_pattern.group(15)
133 total_shards = dart2js_pattern.group(16)
131 elif dartium_pattern: 134 elif dartium_pattern:
132 compiler = 'none' 135 compiler = 'none'
133 runtime = 'dartium' 136 runtime = 'dartium'
134 mode = 'release' 137 mode = 'release'
135 system = dartium_pattern.group(1) 138 system = dartium_pattern.group(1)
136 else : 139 else :
137 return None 140 return None
138 141
139 # We have both win7 and win8 bots, functionality is the same. 142 # We have both win7 and win8 bots, functionality is the same.
140 if system.startswith('win'): 143 if system.startswith('win'):
141 system = 'windows' 144 system = 'windows'
142 145
143 # We have both 10.8 and 10.7 bots, functionality is the same. 146 # We have both 10.8 and 10.7 bots, functionality is the same.
144 if system == 'mac10.7' or system == 'mac10.8' or system == 'mac10.9': 147 if system == 'mac10.7' or system == 'mac10.8' or system == 'mac10.9':
145 builder_tag = system.replace('.', '_') 148 builder_tag = system.replace('.', '_')
146 system = 'mac' 149 system = 'mac'
147 150
148 if (system == 'windows' and platform.system() != 'Windows') or ( 151 if (system == 'windows' and platform.system() != 'Windows') or (
149 system == 'mac' and platform.system() != 'Darwin') or ( 152 system == 'mac' and platform.system() != 'Darwin') or (
150 system == 'linux' and platform.system() != 'Linux'): 153 system == 'linux' and platform.system() != 'Linux'):
151 print ('Error: You cannot emulate a buildbot with a platform different ' 154 print ('Error: You cannot emulate a buildbot with a platform different '
152 'from your own.') 155 'from your own.')
153 return None 156 return None
154 return bot.BuildInfo(compiler, runtime, mode, system, checked, host_checked, 157 return bot.BuildInfo(compiler, runtime, mode, system, checked, host_checked,
155 minified, shard_index, total_shards, is_buildbot, 158 minified, shard_index, total_shards, is_buildbot,
156 test_set, csp, arch, dart2js_full, batch=batch, 159 test_set, csp, arch, dart2js_full, batch=batch,
157 builder_tag=builder_tag) 160 builder_tag=builder_tag, cps_ir=cps_ir)
158 161
159 162
160 def NeedsXterm(compiler, runtime): 163 def NeedsXterm(compiler, runtime):
161 return runtime in ['ie9', 'ie10', 'ie11', 'chrome', 'safari', 'opera', 164 return runtime in ['ie9', 'ie10', 'ie11', 'chrome', 'safari', 'opera',
162 'ff', 'drt', 'dartium'] 165 'ff', 'drt', 'dartium']
163 166
164 167
165 def TestStepName(name, runtime, flags): 168 def TestStepName(name, runtime, flags):
166 # Filter out flags with '=' as this breaks the /stats feature of the 169 # Filter out flags with '=' as this breaks the /stats feature of the
167 # build bot. 170 # build bot.
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 test_flags = [] 355 test_flags = []
353 if build_info.shard_index: 356 if build_info.shard_index:
354 test_flags = ['--shards=%s' % build_info.total_shards, 357 test_flags = ['--shards=%s' % build_info.total_shards,
355 '--shard=%s' % build_info.shard_index] 358 '--shard=%s' % build_info.shard_index]
356 if build_info.checked: test_flags += ['--checked'] 359 if build_info.checked: test_flags += ['--checked']
357 if build_info.minified: test_flags += ['--minified'] 360 if build_info.minified: test_flags += ['--minified']
358 if build_info.host_checked: test_flags += ['--host-checked'] 361 if build_info.host_checked: test_flags += ['--host-checked']
359 if build_info.batch: test_flags += ['--dart2js-batch'] 362 if build_info.batch: test_flags += ['--dart2js-batch']
360 if build_info.builder_tag: test_flags += ['--builder-tag=' + 363 if build_info.builder_tag: test_flags += ['--builder-tag=' +
361 build_info.builder_tag] 364 build_info.builder_tag]
365 if build_info.cps_ir: test_flags += ['--cps-ir']
362 366
363 if build_info.dart2js_full: 367 if build_info.dart2js_full:
364 compiler = build_info.compiler 368 compiler = build_info.compiler
365 assert compiler == 'dart2js' 369 assert compiler == 'dart2js'
366 system = build_info.system 370 system = build_info.system
367 arch = build_info.arch 371 arch = build_info.arch
368 mode = build_info.mode 372 mode = build_info.mode
369 is_buildbot = build_info.is_buildbot 373 is_buildbot = build_info.is_buildbot
370 374
371 config = build_info.builder_tag if system == 'windows' else system 375 config = build_info.builder_tag if system == 'windows' else system
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 if build_info.mode == 'debug': 412 if build_info.mode == 'debug':
409 target = 'dart2js_bot_debug' 413 target = 'dart2js_bot_debug'
410 args = [sys.executable, './tools/build.py', '--mode=' + build_info.mode, 414 args = [sys.executable, './tools/build.py', '--mode=' + build_info.mode,
411 '--arch=' + build_info.arch, target] 415 '--arch=' + build_info.arch, target]
412 print 'Build SDK and d8: %s' % (' '.join(args)) 416 print 'Build SDK and d8: %s' % (' '.join(args))
413 bot.RunProcess(args) 417 bot.RunProcess(args)
414 418
415 419
416 if __name__ == '__main__': 420 if __name__ == '__main__':
417 bot.RunBot(GetBuildInfo, RunCompilerTests, build_step=BuildCompiler) 421 bot.RunBot(GetBuildInfo, RunCompilerTests, build_step=BuildCompiler)
OLDNEW
« no previous file with comments | « tools/bots/bot.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698