| 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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 Args: | 298 Args: |
| 299 - mode: either 'debug' or 'release' | 299 - mode: either 'debug' or 'release' |
| 300 """ | 300 """ |
| 301 cmd = [sys.executable, | 301 cmd = [sys.executable, |
| 302 './tools/clean_output_directory.py', | 302 './tools/clean_output_directory.py', |
| 303 '--mode=' + mode] | 303 '--mode=' + mode] |
| 304 print 'Clobbering %s' % (' '.join(cmd)) | 304 print 'Clobbering %s' % (' '.join(cmd)) |
| 305 return subprocess.call(cmd, env=NO_COLOR_ENV) | 305 return subprocess.call(cmd, env=NO_COLOR_ENV) |
| 306 | 306 |
| 307 def GetShouldClobber(): | 307 def GetShouldClobber(): |
| 308 if os.environ.get(BUILDER_CLOBBER) == "1": | 308 return os.environ.get(BUILDER_CLOBBER) == "1" |
| 309 return True | |
| 310 else: | |
| 311 return False | |
| 312 | 309 |
| 313 def main(): | 310 def main(): |
| 314 if len(sys.argv) == 0: | 311 if len(sys.argv) == 0: |
| 315 print 'Script pathname not known, giving up.' | 312 print 'Script pathname not known, giving up.' |
| 316 return 1 | 313 return 1 |
| 317 | 314 |
| 318 (compiler, runtime, mode, system, option, shard_index, total_shards, | 315 (compiler, runtime, mode, system, option, shard_index, total_shards, |
| 319 is_buildbot) = GetBuildInfo() | 316 is_buildbot) = GetBuildInfo() |
| 320 shard_description = "" | 317 shard_description = "" |
| 321 if shard_index: | 318 if shard_index: |
| (...skipping 28 matching lines...) Expand all Loading... |
| 350 if status == 0 and option != 'checked' and runtime == 'd8': | 347 if status == 0 and option != 'checked' and runtime == 'd8': |
| 351 status = TestCompiler(runtime, mode, system, option, | 348 status = TestCompiler(runtime, mode, system, option, |
| 352 test_flags + ['--checked'], is_buildbot) | 349 test_flags + ['--checked'], is_buildbot) |
| 353 | 350 |
| 354 if runtime != 'd8': CleanUpTemporaryFiles(system, runtime) | 351 if runtime != 'd8': CleanUpTemporaryFiles(system, runtime) |
| 355 if status != 0: print '@@@STEP_FAILURE@@@' | 352 if status != 0: print '@@@STEP_FAILURE@@@' |
| 356 return status | 353 return status |
| 357 | 354 |
| 358 if __name__ == '__main__': | 355 if __name__ == '__main__': |
| 359 sys.exit(main()) | 356 sys.exit(main()) |
| OLD | NEW |