OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 | 2 |
3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 """Dart frog buildbot steps | 7 """Dart frog buildbot steps |
8 | 8 |
9 Runs tests for the frog or dart2js compiler. | 9 Runs tests for the frog or dart2js compiler. |
10 """ | 10 """ |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 cmd = [] | 118 cmd = [] |
119 | 119 |
120 user_test = os.environ.get('USER_TEST', 'no') | 120 user_test = os.environ.get('USER_TEST', 'no') |
121 | 121 |
122 cmd.extend([sys.executable, | 122 cmd.extend([sys.executable, |
123 os.path.join(os.curdir, 'tools', 'test.py'), | 123 os.path.join(os.curdir, 'tools', 'test.py'), |
124 '--mode=' + mode, | 124 '--mode=' + mode, |
125 '--compiler=' + compiler, | 125 '--compiler=' + compiler, |
126 '--runtime=' + runtime, | 126 '--runtime=' + runtime, |
127 '--time', | 127 '--time', |
| 128 '--use-sdk', |
128 '--report']) | 129 '--report']) |
129 | 130 |
130 if user_test == 'yes': | 131 if user_test == 'yes': |
131 cmd.append('--progress=color') | 132 cmd.append('--progress=color') |
132 else: | 133 else: |
133 cmd.extend(['--progress=buildbot', '-v']) | 134 cmd.extend(['--progress=buildbot', '-v']) |
134 | 135 |
135 if flags: | 136 if flags: |
136 cmd.extend(flags) | 137 cmd.extend(flags) |
137 cmd.extend(targets) | 138 cmd.extend(targets) |
(...skipping 21 matching lines...) Expand all Loading... |
159 for arch in ['ia32', 'x64']: | 160 for arch in ['ia32', 'x64']: |
160 outdir = build + arch | 161 outdir = build + arch |
161 shutil.rmtree(outdir, ignore_errors=True) | 162 shutil.rmtree(outdir, ignore_errors=True) |
162 shutil.rmtree('frog/%s' % outdir, ignore_errors=True) | 163 shutil.rmtree('frog/%s' % outdir, ignore_errors=True) |
163 shutil.rmtree('runtime/%s' % outdir, ignore_errors=True) | 164 shutil.rmtree('runtime/%s' % outdir, ignore_errors=True) |
164 | 165 |
165 os.chdir(DART_PATH) | 166 os.chdir(DART_PATH) |
166 | 167 |
167 print '@@@BUILD_STEP build frog@@@' | 168 print '@@@BUILD_STEP build frog@@@' |
168 | 169 |
169 args = [sys.executable, './tools/build.py', '--mode=' + mode, 'dart2js'] | 170 args = [sys.executable, './tools/build.py', '--mode=' + mode, 'create_sdk'] |
170 print 'running %s' % (' '.join(args)) | 171 print 'running %s' % (' '.join(args)) |
171 return subprocess.call(args, env=NO_COLOR_ENV) | 172 return subprocess.call(args, env=NO_COLOR_ENV) |
172 | 173 |
173 | 174 |
174 def TestFrog(compiler, runtime, mode, system, option, flags, bot_number=None): | 175 def TestFrog(compiler, runtime, mode, system, option, flags, bot_number=None): |
175 """ test frog. | 176 """ test frog. |
176 Args: | 177 Args: |
177 - compiler: either 'dart2js' or 'frog' | 178 - compiler: either 'dart2js' or 'frog' |
178 - runtime: either 'd8', or one of the browsers, see GetBuildInfo | 179 - runtime: either 'd8', or one of the browsers, see GetBuildInfo |
179 - mode: either 'debug' or 'release' | 180 - mode: either 'debug' or 'release' |
(...skipping 28 matching lines...) Expand all Loading... |
208 else: | 209 else: |
209 tests = ['dom', 'html', 'json', 'benchmark_smoke', | 210 tests = ['dom', 'html', 'json', 'benchmark_smoke', |
210 'isolate', 'frog', 'css', 'corelib', 'language', | 211 'isolate', 'frog', 'css', 'corelib', 'language', |
211 'frog_native', 'peg'] | 212 'frog_native', 'peg'] |
212 | 213 |
213 # TODO(efortuna): Move Mac back to DumpRenderTree when we have a more stable | 214 # TODO(efortuna): Move Mac back to DumpRenderTree when we have a more stable |
214 # solution for DRT. Right now DRT is flakier than regular Chrome for the | 215 # solution for DRT. Right now DRT is flakier than regular Chrome for the |
215 # isolate tests, so we're switching to use Chrome in the short term. | 216 # isolate tests, so we're switching to use Chrome in the short term. |
216 if runtime == 'chrome' and system == 'linux': | 217 if runtime == 'chrome' and system == 'linux': |
217 TestStep('browser', mode, system, 'frog', 'drt', tests, flags) | 218 TestStep('browser', mode, system, 'frog', 'drt', tests, flags) |
218 TestStep('browser_dart2js', mode, system, 'dart2js', 'drt', [], flags) | 219 |
219 TestStep('browser_dart2js_extra', mode, system, 'dart2js', 'drt', | 220 # TODO(ngeoffray): Enable checked mode once dart2js supports type |
220 ['leg_only', 'frog_native'], flags) | 221 # variables. |
| 222 if not ('--checked' in flags): |
| 223 TestStep('browser_dart2js', mode, system, 'dart2js', 'drt', [], flags) |
| 224 TestStep('browser_dart2js_extra', mode, system, 'dart2js', 'drt', |
| 225 ['leg_only', 'frog_native'], flags) |
| 226 |
221 else: | 227 else: |
222 additional_flags = [] | 228 additional_flags = [] |
223 if system.startswith('win') and runtime == 'ie': | 229 if system.startswith('win') and runtime == 'ie': |
224 # There should not be more than one InternetExplorerDriver instance | 230 # There should not be more than one InternetExplorerDriver instance |
225 # running at a time. For details, see | 231 # running at a time. For details, see |
226 # http://code.google.com/p/selenium/wiki/InternetExplorerDriver. | 232 # http://code.google.com/p/selenium/wiki/InternetExplorerDriver. |
227 additional_flags += ['-j1'] | 233 additional_flags += ['-j1'] |
228 # The IE bots are slow lately. Split up the tests they do. | 234 # The IE bots are slow lately. Split up the tests they do. |
229 if bot_number == '2': | 235 if bot_number == '2': |
230 tests = ['corelib', 'language'] | 236 tests = ['language'] |
231 else: | 237 else: |
232 tests = ['dom', 'html', 'json', 'benchmark_smoke', | 238 tests = ['dom', 'html', 'json', 'benchmark_smoke', |
233 'isolate', 'frog', 'css', 'frog_native', 'peg'] | 239 'isolate', 'frog', 'css', 'frog_native', 'peg', 'corelib'] |
234 TestStep(runtime, mode, system, compiler, runtime, tests, | 240 TestStep(runtime, mode, system, compiler, runtime, tests, |
235 flags + additional_flags) | 241 flags + additional_flags) |
236 | 242 |
237 return 0 | 243 return 0 |
238 | 244 |
239 def _DeleteFirefoxProfiles(directory): | 245 def _DeleteFirefoxProfiles(directory): |
240 """Find all the firefox profiles in a particular directory and delete them.""" | 246 """Find all the firefox profiles in a particular directory and delete them.""" |
241 for f in os.listdir(directory): | 247 for f in os.listdir(directory): |
242 item = os.path.join(directory, f) | 248 item = os.path.join(directory, f) |
243 if os.path.isdir(item) and f.startswith('tmp'): | 249 if os.path.isdir(item) and f.startswith('tmp'): |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 print '@@@STEP_FAILURE@@@' | 319 print '@@@STEP_FAILURE@@@' |
314 | 320 |
315 if compiler == 'frog' and runtime in ['ff', 'chrome', 'safari', 'opera', | 321 if compiler == 'frog' and runtime in ['ff', 'chrome', 'safari', 'opera', |
316 'ie', 'drt']: | 322 'ie', 'drt']: |
317 CleanUpTemporaryFiles(system, runtime) | 323 CleanUpTemporaryFiles(system, runtime) |
318 return status | 324 return status |
319 | 325 |
320 | 326 |
321 if __name__ == '__main__': | 327 if __name__ == '__main__': |
322 sys.exit(main()) | 328 sys.exit(main()) |
OLD | NEW |