| 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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 """ | 335 """ |
| 336 cmd = [sys.executable, | 336 cmd = [sys.executable, |
| 337 './tools/clean_output_directory.py', | 337 './tools/clean_output_directory.py', |
| 338 '--mode=' + mode] | 338 '--mode=' + mode] |
| 339 print 'Clobbering %s' % (' '.join(cmd)) | 339 print 'Clobbering %s' % (' '.join(cmd)) |
| 340 return subprocess.call(cmd, env=NO_COLOR_ENV) | 340 return subprocess.call(cmd, env=NO_COLOR_ENV) |
| 341 | 341 |
| 342 def GetShouldClobber(): | 342 def GetShouldClobber(): |
| 343 return os.environ.get(BUILDER_CLOBBER) == "1" | 343 return os.environ.get(BUILDER_CLOBBER) == "1" |
| 344 | 344 |
| 345 def GetHasHardCodedCheckedMode(build_info): |
| 346 # TODO(ricow): We currently run checked mode tests on chrome on linux and |
| 347 # on the slow (all) IE windows bots. This is a hack and we should use the |
| 348 # normal sharding and checked splitting functionality when we get more |
| 349 # vms for testing this. |
| 350 if (build_info.system == 'linux' and build_info.runtime == 'chrome'): |
| 351 return True |
| 352 if (build_info.system == 'win7' and build_info.runtime == 'ie' and |
| 353 build_info.test_set == 'all'): |
| 354 return True |
| 355 return False |
| 356 |
| 345 def main(): | 357 def main(): |
| 346 if len(sys.argv) == 0: | 358 if len(sys.argv) == 0: |
| 347 print 'Script pathname not known, giving up.' | 359 print 'Script pathname not known, giving up.' |
| 348 return 1 | 360 return 1 |
| 349 | 361 |
| 350 build_info = GetBuildInfo() | 362 build_info = GetBuildInfo() |
| 351 | 363 |
| 352 # Print out the buildinfo for easy debugging. | 364 # Print out the buildinfo for easy debugging. |
| 353 build_info.PrintBuildInfo() | 365 build_info.PrintBuildInfo() |
| 354 | 366 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 374 '--shard=%s' % build_info.shard_index] | 386 '--shard=%s' % build_info.shard_index] |
| 375 | 387 |
| 376 if build_info.checked: test_flags += ['--checked'] | 388 if build_info.checked: test_flags += ['--checked'] |
| 377 | 389 |
| 378 if build_info.host_checked: test_flags += ['--host-checked'] | 390 if build_info.host_checked: test_flags += ['--host-checked'] |
| 379 | 391 |
| 380 status = TestCompiler(build_info.runtime, build_info.mode, | 392 status = TestCompiler(build_info.runtime, build_info.mode, |
| 381 build_info.system, test_flags, | 393 build_info.system, test_flags, |
| 382 build_info.is_buildbot, build_info.test_set) | 394 build_info.is_buildbot, build_info.test_set) |
| 383 | 395 |
| 384 # TODO(ricow): We currently have only one browser runtime that runs checked | 396 # See comment in GetHasHardCodedCheckedMode, this is a hack. |
| 385 # mode test where this is not reflected by the name, namely dart2js on chrome | 397 if (status == 0 and GetHasHardCodedCheckedMode(build_info)): |
| 386 # linux. We should eliminate this (by splitting this onto two builders - | |
| 387 # potentially on the same vm). | |
| 388 # When this is fixed we should simply pass build_info to TestCompiler. | |
| 389 if (status == 0 and build_info.system == 'linux' and | |
| 390 build_info.runtime == 'chrome'): | |
| 391 status = TestCompiler(build_info.runtime, build_info.mode, | 398 status = TestCompiler(build_info.runtime, build_info.mode, |
| 392 build_info.system, | 399 build_info.system, |
| 393 test_flags + ['--checked'], | 400 test_flags + ['--checked'], |
| 394 build_info.is_buildbot, | 401 build_info.is_buildbot, |
| 395 build_info.test_set) | 402 build_info.test_set) |
| 396 | 403 |
| 397 if build_info.runtime != 'd8': CleanUpTemporaryFiles(build_info.system, | 404 if build_info.runtime != 'd8': CleanUpTemporaryFiles(build_info.system, |
| 398 build_info.runtime) | 405 build_info.runtime) |
| 399 if status != 0: print '@@@STEP_FAILURE@@@' | 406 if status != 0: print '@@@STEP_FAILURE@@@' |
| 400 return status | 407 return status |
| 401 | 408 |
| 402 if __name__ == '__main__': | 409 if __name__ == '__main__': |
| 403 sys.exit(main()) | 410 sys.exit(main()) |
| OLD | NEW |