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

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

Issue 16087002: Don't special case chrome to drt on linux. Instead I will change the name of the bot to dart2js-drt… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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 | « no previous file | 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 subprocess 18 import subprocess
19 import sys 19 import sys
20 20
21 import bot 21 import bot
22 22
23 DART2JS_BUILDER = ( 23 DART2JS_BUILDER = (
24 r'dart2js-(linux|mac|windows)(-(jsshell))?-(debug|release)(-(checked|host-ch ecked))?(-(host-checked))?(-(minified))?-?(\d*)-?(\d*)') 24 r'dart2js-(linux|mac|windows)(-(jsshell))?-(debug|release)(-(checked|host-ch ecked))?(-(host-checked))?(-(minified))?-?(\d*)-?(\d*)')
25 WEB_BUILDER = ( 25 WEB_BUILDER = (
26 r'dart2js-(ie9|ie10|ff|safari|chrome|chromeOnAndroid|opera)-(win7|win8|mac10 \.8|mac10\.7|linux)(-(all|html))?(-(csp))?(-(\d+)-(\d+))?') 26 r'dart2js-(ie9|ie10|ff|safari|chrome|chromeOnAndroid|opera|drt)-(win7|win8|m ac10\.8|mac10\.7|linux)(-(all|html))?(-(csp))?(-(\d+)-(\d+))?')
27 27
28 28
29 def GetBuildInfo(builder_name, is_buildbot): 29 def GetBuildInfo(builder_name, is_buildbot):
30 """Returns a BuildInfo object for the current buildbot based on the 30 """Returns a BuildInfo object for the current buildbot based on the
31 name of the builder. 31 name of the builder.
32 """ 32 """
33 compiler = None 33 compiler = None
34 runtime = None 34 runtime = None
35 mode = None 35 mode = None
36 system = None 36 system = None
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 step_name = TestStepName(name, flags) 113 step_name = TestStepName(name, flags)
114 with bot.BuildStep(step_name, swallow_error=True): 114 with bot.BuildStep(step_name, swallow_error=True):
115 sys.stdout.flush() 115 sys.stdout.flush()
116 if NeedsXterm(compiler, runtime) and system == 'linux': 116 if NeedsXterm(compiler, runtime) and system == 'linux':
117 cmd = ['xvfb-run', '-a'] 117 cmd = ['xvfb-run', '-a']
118 else: 118 else:
119 cmd = [] 119 cmd = []
120 120
121 user_test = os.environ.get('USER_TEST', 'no') 121 user_test = os.environ.get('USER_TEST', 'no')
122 122
123 # TODO(ricow): temporary hack to run on fyi with --use_browser_controller
124 if os.environ.get('BUILDBOT_SCHEDULER') == "fyi-main" and runtime == 'drt':
125 runtime = 'chrome'
126
127 cmd.extend([sys.executable, 123 cmd.extend([sys.executable,
128 os.path.join(os.curdir, 'tools', 'test.py'), 124 os.path.join(os.curdir, 'tools', 'test.py'),
129 '--step_name=' + step_name, 125 '--step_name=' + step_name,
130 '--mode=' + mode, 126 '--mode=' + mode,
131 '--compiler=' + compiler, 127 '--compiler=' + compiler,
132 '--runtime=' + runtime, 128 '--runtime=' + runtime,
133 '--time', 129 '--time',
134 '--use-sdk', 130 '--use-sdk',
135 '--report', 131 '--report',
136 '--write-debug-log']) 132 '--write-debug-log'])
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 elif system == 'linux': 183 elif system == 'linux':
188 path_dict = {'ff': 'firefox', 'chrome': 'google-chrome'} 184 path_dict = {'ff': 'firefox', 'chrome': 'google-chrome'}
189 else: 185 else:
190 # Windows. 186 # Windows.
191 path_dict = {'ff': os.path.join('C:/', 'Program Files (x86)', 187 path_dict = {'ff': os.path.join('C:/', 'Program Files (x86)',
192 'Mozilla Firefox', 'firefox.exe'), 188 'Mozilla Firefox', 'firefox.exe'),
193 'chrome': os.path.join('C:/', 'Users', 'chrome-bot', 'AppData', 189 'chrome': os.path.join('C:/', 'Users', 'chrome-bot', 'AppData',
194 'Local', 'Google', 'Chrome', 'Application', 'chrome.exe')} 190 'Local', 'Google', 'Chrome', 'Application', 'chrome.exe')}
195 return path_dict[runtime] 191 return path_dict[runtime]
196 192
197 if system == 'linux' and runtime == 'chrome': 193 if (runtime == 'ff' or runtime == 'chrome') and is_buildbot:
198 # TODO(ngeoffray): We should install selenium on the buildbot.
199 runtime = 'drt'
200 elif (runtime == 'ff' or runtime == 'chrome') and is_buildbot:
201 # Print out browser version numbers if we're running on the buildbot (where 194 # Print out browser version numbers if we're running on the buildbot (where
202 # we know the paths to these browser installations). 195 # we know the paths to these browser installations).
203 version_query_string = '"%s" --version' % GetPath(runtime) 196 version_query_string = '"%s" --version' % GetPath(runtime)
204 if runtime == 'ff' and system.startswith('win'): 197 if runtime == 'ff' and system.startswith('win'):
205 version_query_string += '| more' 198 version_query_string += '| more'
206 elif runtime == 'chrome' and system.startswith('win'): 199 elif runtime == 'chrome' and system.startswith('win'):
207 version_query_string = ('''reg query "HKCU\\Software\\Microsoft\\''' + 200 version_query_string = ('''reg query "HKCU\\Software\\Microsoft\\''' +
208 '''Windows\\CurrentVersion\\Uninstall\\Google Chrome" /v Version''') 201 '''Windows\\CurrentVersion\\Uninstall\\Google Chrome" /v Version''')
209 p = subprocess.Popen(version_query_string, 202 p = subprocess.Popen(version_query_string,
210 stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) 203 stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 """ 355 """
363 with bot.BuildStep('Build SDK and d8'): 356 with bot.BuildStep('Build SDK and d8'):
364 args = [sys.executable, './tools/build.py', '--mode=' + build_info.mode, 357 args = [sys.executable, './tools/build.py', '--mode=' + build_info.mode,
365 'dart2js_bot'] 358 'dart2js_bot']
366 print 'Build SDK and d8: %s' % (' '.join(args)) 359 print 'Build SDK and d8: %s' % (' '.join(args))
367 bot.RunProcess(args) 360 bot.RunProcess(args)
368 361
369 362
370 if __name__ == '__main__': 363 if __name__ == '__main__':
371 bot.RunBot(GetBuildInfo, RunCompilerTests, build_step=BuildCompiler) 364 bot.RunBot(GetBuildInfo, RunCompilerTests, build_step=BuildCompiler)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698