| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 | 98 |
| 99 | 99 |
| 100 def NeedsXterm(compiler, runtime): | 100 def NeedsXterm(compiler, runtime): |
| 101 return runtime in ['ie', 'chrome', 'safari', 'opera', 'ff', 'drt'] | 101 return runtime in ['ie', 'chrome', 'safari', 'opera', 'ff', 'drt'] |
| 102 | 102 |
| 103 | 103 |
| 104 def TestStepName(name, flags): | 104 def TestStepName(name, flags): |
| 105 # Filter out flags with '=' as this breaks the /stats feature of the | 105 # Filter out flags with '=' as this breaks the /stats feature of the |
| 106 # build bot. | 106 # build bot. |
| 107 flags = [x for x in flags if not '=' in x] | 107 flags = [x for x in flags if not '=' in x] |
| 108 return '%s tests %s' % (name, ' '.join(flags)) | 108 return ('%s tests %s' % (name, ' '.join(flags))).strip() |
| 109 | 109 |
| 110 | 110 |
| 111 def TestStep(name, mode, system, compiler, runtime, targets, flags): | 111 def TestStep(name, mode, system, compiler, runtime, targets, flags): |
| 112 print '@@@BUILD_STEP %s@@@' % TestStepName(name, flags) | 112 step_name = TestStepName(name, flags) |
| 113 print '@@@BUILD_STEP %s@@@' % step_name |
| 113 sys.stdout.flush() | 114 sys.stdout.flush() |
| 114 if NeedsXterm(compiler, runtime) and system == 'linux': | 115 if NeedsXterm(compiler, runtime) and system == 'linux': |
| 115 cmd = ['xvfb-run', '-a'] | 116 cmd = ['xvfb-run', '-a'] |
| 116 else: | 117 else: |
| 117 cmd = [] | 118 cmd = [] |
| 118 | 119 |
| 119 user_test = os.environ.get('USER_TEST', 'no') | 120 user_test = os.environ.get('USER_TEST', 'no') |
| 120 | 121 |
| 121 cmd.extend([sys.executable, | 122 cmd.extend([sys.executable, |
| 122 os.path.join(os.curdir, 'tools', 'test.py'), | 123 os.path.join(os.curdir, 'tools', 'test.py'), |
| 124 '--step_name=' + step_name, |
| 123 '--mode=' + mode, | 125 '--mode=' + mode, |
| 124 '--compiler=' + compiler, | 126 '--compiler=' + compiler, |
| 125 '--runtime=' + runtime, | 127 '--runtime=' + runtime, |
| 126 '--time', | 128 '--time', |
| 127 '--use-sdk', | 129 '--use-sdk', |
| 128 '--report']) | 130 '--report']) |
| 129 | 131 |
| 130 if user_test == 'yes': | 132 if user_test == 'yes': |
| 131 cmd.append('--progress=color') | 133 cmd.append('--progress=color') |
| 132 else: | 134 else: |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 and runtime != 'safari'): | 356 and runtime != 'safari'): |
| 355 status = TestCompiler(runtime, mode, system, option, | 357 status = TestCompiler(runtime, mode, system, option, |
| 356 test_flags + ['--checked'], is_buildbot) | 358 test_flags + ['--checked'], is_buildbot) |
| 357 | 359 |
| 358 if runtime != 'd8': CleanUpTemporaryFiles(system, runtime) | 360 if runtime != 'd8': CleanUpTemporaryFiles(system, runtime) |
| 359 if status != 0: print '@@@STEP_FAILURE@@@' | 361 if status != 0: print '@@@STEP_FAILURE@@@' |
| 360 return status | 362 return status |
| 361 | 363 |
| 362 if __name__ == '__main__': | 364 if __name__ == '__main__': |
| 363 sys.exit(main()) | 365 sys.exit(main()) |
| OLD | NEW |