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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 print ('Error: You cannot emulate a buildbot with a platform different ' | 93 print ('Error: You cannot emulate a buildbot with a platform different ' |
94 'from your own.') | 94 'from your own.') |
95 sys.exit(1) | 95 sys.exit(1) |
96 return (compiler, runtime, mode, system, option, shard_index, total_shards, | 96 return (compiler, runtime, mode, system, option, shard_index, total_shards, |
97 is_buildbot) | 97 is_buildbot) |
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 |
| 104 def TestStepName(name, flags): |
| 105 # Filter out flags with '=' as this breaks the /stats feature of the |
| 106 # build bot. |
| 107 flags = [x for x in flags if not '=' in x] |
| 108 return '%s tests %s' % (name, ' '.join(flags)) |
| 109 |
| 110 |
103 def TestStep(name, mode, system, compiler, runtime, targets, flags): | 111 def TestStep(name, mode, system, compiler, runtime, targets, flags): |
104 print '@@@BUILD_STEP %s %s tests: %s %s@@@' % (name, compiler, runtime, | 112 print '@@@BUILD_STEP %s@@@' % TestStepName(name, flags) |
105 ' '.join(flags)) | |
106 sys.stdout.flush() | 113 sys.stdout.flush() |
107 if NeedsXterm(compiler, runtime) and system == 'linux': | 114 if NeedsXterm(compiler, runtime) and system == 'linux': |
108 cmd = ['xvfb-run', '-a'] | 115 cmd = ['xvfb-run', '-a'] |
109 else: | 116 else: |
110 cmd = [] | 117 cmd = [] |
111 | 118 |
112 user_test = os.environ.get('USER_TEST', 'no') | 119 user_test = os.environ.get('USER_TEST', 'no') |
113 | 120 |
114 cmd.extend([sys.executable, | 121 cmd.extend([sys.executable, |
115 os.path.join(os.curdir, 'tools', 'test.py'), | 122 os.path.join(os.curdir, 'tools', 'test.py'), |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 and runtime != 'safari'): | 354 and runtime != 'safari'): |
348 status = TestCompiler(runtime, mode, system, option, | 355 status = TestCompiler(runtime, mode, system, option, |
349 test_flags + ['--checked'], is_buildbot) | 356 test_flags + ['--checked'], is_buildbot) |
350 | 357 |
351 if runtime != 'd8': CleanUpTemporaryFiles(system, runtime) | 358 if runtime != 'd8': CleanUpTemporaryFiles(system, runtime) |
352 if status != 0: print '@@@STEP_FAILURE@@@' | 359 if status != 0: print '@@@STEP_FAILURE@@@' |
353 return status | 360 return status |
354 | 361 |
355 if __name__ == '__main__': | 362 if __name__ == '__main__': |
356 sys.exit(main()) | 363 sys.exit(main()) |
OLD | NEW |