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 """Dart2js buildbot steps | 7 """Dart2js buildbot steps |
8 | 8 |
9 Runs tests for the dart2js compiler. | 9 Runs tests for the dart2js compiler. |
10 """ | 10 """ |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
158 - option: 'checked' | 158 - option: 'checked' |
159 - flags: extra flags to pass to test.dart | 159 - flags: extra flags to pass to test.dart |
160 - is_buildbot: true if we are running on a real buildbot instead of | 160 - is_buildbot: true if we are running on a real buildbot instead of |
161 emulating one. | 161 emulating one. |
162 """ | 162 """ |
163 | 163 |
164 # Make sure we are in the dart directory | 164 # Make sure we are in the dart directory |
165 os.chdir(DART_PATH) | 165 os.chdir(DART_PATH) |
166 | 166 |
167 if system.startswith('win') and runtime == 'ie': | 167 if system.startswith('win') and runtime == 'ie': |
168 # TODO(ahe): This pre-dates the shard feature and should be | |
kasperl
2012/09/05 11:54:20
It actually doesn't predate sharding. I changed it
Emily Fortuna
2012/09/05 16:28:53
Yes, Peter, this comment is incorrect. This was do
ahe
2012/09/05 19:24:30
The only part of the comment that is incorrect is
| |
169 # removed. If we want to have a fast and a slow bot, that should | |
170 # be accomplished by having several shards distributed on multiple | |
171 # virtual builders. | |
172 | |
168 # We don't do proper sharding on the IE bots, since the runtime is | 173 # We don't do proper sharding on the IE bots, since the runtime is |
169 # long for both. We have a "fast bot" and a "slow bot" that run specific | 174 # long for both. We have a "fast bot" and a "slow bot" that run specific |
170 # tests instead. | 175 # tests instead. |
171 for i in flags: | 176 for i in flags: |
172 if i.startswith('--shard='): | 177 if i.startswith('--shard='): |
173 bot_num = i.split('=')[1] | 178 bot_num = i.split('=')[1] |
174 # There should not be more than one InternetExplorerDriver instance | 179 # There should not be more than one InternetExplorerDriver instance |
175 # running at a time. For details, see | 180 # running at a time. For details, see |
176 # http://code.google.com/p/selenium/wiki/InternetExplorerDriver. | 181 # http://code.google.com/p/selenium/wiki/InternetExplorerDriver. |
177 flags = (filter(lambda(item): not item.startswith('--shard'), flags) + | 182 flags = (filter(lambda(item): not item.startswith('--shard'), flags) + |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
227 TestStep("dart2js_unit", mode, system, 'none', 'vm', ['dart2js'], flags) | 232 TestStep("dart2js_unit", mode, system, 'none', 'vm', ['dart2js'], flags) |
228 | 233 |
229 if not (system.startswith('win') and runtime == 'ie'): | 234 if not (system.startswith('win') and runtime == 'ie'): |
230 # Run the default set of test suites. | 235 # Run the default set of test suites. |
231 TestStep("dart2js", mode, system, 'dart2js', runtime, [], flags) | 236 TestStep("dart2js", mode, system, 'dart2js', runtime, [], flags) |
232 | 237 |
233 # TODO(kasperl): Consider running peg and css tests too. | 238 # TODO(kasperl): Consider running peg and css tests too. |
234 extras = ['dart2js_extra', 'dart2js_native', 'dart2js_foreign'] | 239 extras = ['dart2js_extra', 'dart2js_native', 'dart2js_foreign'] |
235 TestStep("dart2js_extra", mode, system, 'dart2js', runtime, extras, flags) | 240 TestStep("dart2js_extra", mode, system, 'dart2js', runtime, extras, flags) |
236 else: | 241 else: |
242 # TODO(ahe): See comment above regarding how to use sharding to | |
Emily Fortuna
2012/09/05 16:28:53
Please remove -- this comment is incorrect.
| |
243 # accomplish the same. | |
237 if bot_num == '1': | 244 if bot_num == '1': |
238 TestStep("dart2js", mode, system, 'dart2js', runtime, ['html'], flags) | 245 TestStep("dart2js", mode, system, 'dart2js', runtime, ['html'], flags) |
239 else: | 246 else: |
240 TestStep("dart2js", mode, system, 'dart2js', runtime, ['dartc', | 247 TestStep("dart2js", mode, system, 'dart2js', runtime, ['dartc', |
241 'samples', 'standalone', 'corelib', 'co19', 'language', 'isolate', | 248 'samples', 'standalone', 'corelib', 'co19', 'language', 'isolate', |
242 'vm', 'json', 'benchmark_smoke', 'dartdoc', 'utils', 'pub', 'lib'], | 249 'vm', 'json', 'benchmark_smoke', 'dartdoc', 'utils', 'pub', 'lib'], |
243 flags) | 250 flags) |
244 extras = ['dart2js_extra', 'dart2js_native', 'dart2js_foreign'] | 251 extras = ['dart2js_extra', 'dart2js_native', 'dart2js_foreign'] |
245 TestStep("dart2js_extra", mode, system, 'dart2js', runtime, extras, | 252 TestStep("dart2js_extra", mode, system, 'dart2js', runtime, extras, |
246 flags) | 253 flags) |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
325 return status | 332 return status |
326 | 333 |
327 test_flags = [] | 334 test_flags = [] |
328 if shard_index: | 335 if shard_index: |
329 test_flags = ['--shards=%s' % total_shards, '--shard=%s' % shard_index] | 336 test_flags = ['--shards=%s' % total_shards, '--shard=%s' % shard_index] |
330 | 337 |
331 # First we run all the regular tests. | 338 # First we run all the regular tests. |
332 status = TestCompiler(runtime, mode, system, option, test_flags, | 339 status = TestCompiler(runtime, mode, system, option, test_flags, |
333 is_buildbot) | 340 is_buildbot) |
334 | 341 |
335 # We only run checked mode tests when the host is not in checked mode. | 342 if status == 0: |
336 if status == 0 and option != 'checked' and runtime == 'd8': | |
337 status = TestCompiler(runtime, mode, system, option, | 343 status = TestCompiler(runtime, mode, system, option, |
338 test_flags + ['--checked'], is_buildbot) | 344 test_flags + ['--checked'], is_buildbot) |
339 | 345 |
340 if runtime != 'd8': CleanUpTemporaryFiles(system, runtime) | 346 if runtime != 'd8': CleanUpTemporaryFiles(system, runtime) |
341 if status != 0: print '@@@STEP_FAILURE@@@' | 347 if status != 0: print '@@@STEP_FAILURE@@@' |
342 return status | 348 return status |
343 | 349 |
344 if __name__ == '__main__': | 350 if __name__ == '__main__': |
345 sys.exit(main()) | 351 sys.exit(main()) |
OLD | NEW |