OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 2 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
3 # for details. All rights reserved. Use of this source code is governed by a | 3 # for details. All rights reserved. Use of this source code is governed by a |
4 # BSD-style license that can be found in the LICENSE file. | 4 # BSD-style license that can be found in the LICENSE file. |
5 | 5 |
6 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 6 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
7 # Use of this source code is governed by a BSD-style license that can be | 7 # Use of this source code is governed by a BSD-style license that can be |
8 # found in the LICENSE file. | 8 # found in the LICENSE file. |
9 | 9 |
10 """Dart client buildbot steps | 10 """Dart client buildbot steps |
11 | 11 |
12 Compiles dart client apps with dartc, and run the client tests both in headless | 12 Compiles dart client apps with dartc, and run the client tests both in headless |
13 chromium and headless dartium. | 13 chromium and headless dartium. |
14 """ | 14 """ |
15 | 15 |
16 import imp | 16 import imp |
17 import os | 17 import os |
| 18 import platform |
18 import re | 19 import re |
19 import socket | 20 import socket |
20 import subprocess | 21 import subprocess |
21 import sys | 22 import sys |
22 | 23 |
23 BUILDER_NAME = 'BUILDBOT_BUILDERNAME' | 24 BUILDER_NAME = 'BUILDBOT_BUILDERNAME' |
24 BUILDER_CLOBBER = 'BUILDBOT_CLOBBER' | 25 BUILDER_CLOBBER = 'BUILDBOT_CLOBBER' |
25 REVISION = 'BUILDBOT_REVISION' | 26 REVISION = 'BUILDBOT_REVISION' |
26 | 27 |
27 # latest dartium location | 28 # latest dartium location |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 # environment variables available. | 128 # environment variables available. |
128 has_shell = True | 129 has_shell = True |
129 return subprocess.call([sys.executable, | 130 return subprocess.call([sys.executable, |
130 os.path.join('tools', 'bots', target + '.py')], | 131 os.path.join('tools', 'bots', target + '.py')], |
131 env=environment, shell=has_shell) | 132 env=environment, shell=has_shell) |
132 | 133 |
133 def FixJavaHome(): | 134 def FixJavaHome(): |
134 buildbot_javahome = os.getenv('BUILDBOT_JAVA_HOME') | 135 buildbot_javahome = os.getenv('BUILDBOT_JAVA_HOME') |
135 if buildbot_javahome: | 136 if buildbot_javahome: |
136 current_pwd = os.getenv('PWD') | 137 current_pwd = os.getenv('PWD') |
137 java_home = '/usr/lib/jvm/java-6-sun'#os.path.join(current_pwd, buildbot_jav
ahome) | 138 if platform.system() != 'Windows': |
| 139 java_home = '/usr/lib/jvm/java-6-sun' # Hackety-hack. Please remove! |
| 140 else: |
| 141 java_home = os.path.join(current_pwd, buildbot_javahome) |
138 java_bin = os.path.join(java_home, 'bin') | 142 java_bin = os.path.join(java_home, 'bin') |
139 os.environ['JAVA_HOME'] = java_home | 143 os.environ['JAVA_HOME'] = java_home |
140 os.environ['PATH'] = '%s;%s' % (java_bin, os.environ['PATH']) | 144 os.environ['PATH'] = '%s;%s' % (java_bin, os.environ['PATH']) |
141 | 145 |
142 print 'Setting java home to ', java_home | 146 print 'Setting java home to ', java_home |
143 sys.stdout.flush() | 147 sys.stdout.flush() |
144 | 148 |
145 def ClobberBuilder(): | 149 def ClobberBuilder(): |
146 """ Clobber the builder before we do the build. | 150 """ Clobber the builder before we do the build. |
147 """ | 151 """ |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 status = ProcessBot(name, 'compiler') | 208 status = ProcessBot(name, 'compiler') |
205 | 209 |
206 if status: | 210 if status: |
207 print '@@@STEP_FAILURE@@@' | 211 print '@@@STEP_FAILURE@@@' |
208 | 212 |
209 return status | 213 return status |
210 | 214 |
211 | 215 |
212 if __name__ == '__main__': | 216 if __name__ == '__main__': |
213 sys.exit(main()) | 217 sys.exit(main()) |
OLD | NEW |