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): | |
ricow1
2012/09/09 17:55:57
add short comment explaining that having "=" in th
ahe
2012/09/09 18:06:02
Done.
| |
105 flags = [x for x in flags if not '=' in x] | |
106 return '%s tests %s' % (name, ' '.join(flags)) | |
107 | |
108 | |
103 def TestStep(name, mode, system, compiler, runtime, targets, flags): | 109 def TestStep(name, mode, system, compiler, runtime, targets, flags): |
104 print '@@@BUILD_STEP %s %s tests: %s %s@@@' % (name, compiler, runtime, | 110 print '@@@BUILD_STEP %s@@@' % TestStepName(name, flags) |
105 ' '.join(flags)) | |
106 sys.stdout.flush() | 111 sys.stdout.flush() |
107 if NeedsXterm(compiler, runtime) and system == 'linux': | 112 if NeedsXterm(compiler, runtime) and system == 'linux': |
108 cmd = ['xvfb-run', '-a'] | 113 cmd = ['xvfb-run', '-a'] |
109 else: | 114 else: |
110 cmd = [] | 115 cmd = [] |
111 | 116 |
112 user_test = os.environ.get('USER_TEST', 'no') | 117 user_test = os.environ.get('USER_TEST', 'no') |
113 | 118 |
114 cmd.extend([sys.executable, | 119 cmd.extend([sys.executable, |
115 os.path.join(os.curdir, 'tools', 'test.py'), | 120 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'): | 352 and runtime != 'safari'): |
348 status = TestCompiler(runtime, mode, system, option, | 353 status = TestCompiler(runtime, mode, system, option, |
349 test_flags + ['--checked'], is_buildbot) | 354 test_flags + ['--checked'], is_buildbot) |
350 | 355 |
351 if runtime != 'd8': CleanUpTemporaryFiles(system, runtime) | 356 if runtime != 'd8': CleanUpTemporaryFiles(system, runtime) |
352 if status != 0: print '@@@STEP_FAILURE@@@' | 357 if status != 0: print '@@@STEP_FAILURE@@@' |
353 return status | 358 return status |
354 | 359 |
355 if __name__ == '__main__': | 360 if __name__ == '__main__': |
356 sys.exit(main()) | 361 sys.exit(main()) |
OLD | NEW |