Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: client/tools/buildbot_annotated_steps.py

Issue 11264019: Set up Android build config. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/bots/android.py » ('j') | tools/bots/android.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 # for details. All rights reserved. Use of this source code is governed by a 2 # for details. All rights reserved. Use of this source code is governed by a
3 # BSD-style license that can be found in the LICENSE file. 3 # BSD-style license that can be found in the LICENSE file.
4 4
5 #!/usr/bin/python 5 #!/usr/bin/python
6 6
7 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 7 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
8 # Use of this source code is governed by a BSD-style license that can be 8 # Use of this source code is governed by a BSD-style license that can be
9 # found in the LICENSE file. 9 # found in the LICENSE file.
10 10
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 '--name=' + name, '--out=' + outdir] 113 '--name=' + name, '--out=' + outdir]
114 local_env = os.environ 114 local_env = os.environ
115 #if 'linux' in name: 115 #if 'linux' in name:
116 # javahome = os.path.join(os.path.expanduser('~'), 'jdk1.6.0_25') 116 # javahome = os.path.join(os.path.expanduser('~'), 'jdk1.6.0_25')
117 # local_env['JAVA_HOME'] = javahome 117 # local_env['JAVA_HOME'] = javahome
118 # local_env['PATH'] = (os.path.join(javahome, 'bin') + 118 # local_env['PATH'] = (os.path.join(javahome, 'bin') +
119 # os.pathsep + local_env['PATH']) 119 # os.pathsep + local_env['PATH'])
120 120
121 return subprocess.call(cmds, env=local_env) 121 return subprocess.call(cmds, env=local_env)
122 122
123 def ProcessCompiler(name): 123 def ProcessBot(name, target):
124 ''' 124 '''
125 build and test the compiler 125 Build and test the named bot target (compiler, android, pub). We look for
126 the supporting script in tools/bots/ to run the tests and build.
126 ''' 127 '''
127 print 'ProcessCompiler' 128 print 'Process%s' % target.capitalize()
128 has_shell=False
129 if 'windows' in name:
130 # In Windows we need to run in the shell, so that we have all the
131 # environment variables available.
132 has_shell=True
133 return subprocess.call([sys.executable,
134 os.path.join('tools', 'bots', 'compiler.py')],
135 env=os.environ, shell=has_shell)
136
137 def ProcessPub(name):
138 '''
139 Build and test pub and the pub packages in the main Dart repository.
140 '''
141 print 'ProcessPub'
142 has_shell=False 129 has_shell=False
143 if '-win' in name: 130 if '-win' in name:
144 # In Windows we need to run in the shell, so that we have all the 131 # In Windows we need to run in the shell, so that we have all the
145 # environment variables available. 132 # environment variables available.
146 has_shell=True 133 has_shell=True
147 return subprocess.call([sys.executable, 134 return subprocess.call([sys.executable,
148 os.path.join('tools', 'bots', 'pub.py')], 135 os.path.join('tools', 'bots', target + '.py')],
149 env=os.environ, shell=has_shell) 136 env=os.environ, shell=has_shell)
150 137
151 def FixJavaHome(): 138 def FixJavaHome():
152 buildbot_javahome = os.getenv('BUILDBOT_JAVA_HOME') 139 buildbot_javahome = os.getenv('BUILDBOT_JAVA_HOME')
153 if buildbot_javahome: 140 if buildbot_javahome:
154 current_pwd = os.getenv('PWD') 141 current_pwd = os.getenv('PWD')
155 java_home = os.path.join(current_pwd, buildbot_javahome) 142 java_home = os.path.join(current_pwd, buildbot_javahome)
156 os.environ['JAVA_HOME'] = java_home 143 os.environ['JAVA_HOME'] = java_home
157 print 'Setting java home to' 144 print 'Setting java home to'
158 print java_home 145 print java_home
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 return status 203 return status
217 204
218 205
219 #TODO(sigmund): remove this indirection once we update our bots 206 #TODO(sigmund): remove this indirection once we update our bots
220 (name, version) = GetBuildInfo() 207 (name, version) = GetBuildInfo()
221 if name.startswith('dart-editor'): 208 if name.startswith('dart-editor'):
222 # TODO (danrubel) Fix dart-editor builds so that we can call FixJavaHome() b efore the build 209 # TODO (danrubel) Fix dart-editor builds so that we can call FixJavaHome() b efore the build
223 FixJavaHome() 210 FixJavaHome()
224 status = ProcessTools('release', name, version) 211 status = ProcessTools('release', name, version)
225 elif name.startswith('pub-'): 212 elif name.startswith('pub-'):
226 status = ProcessPub(name) 213 status = ProcessBot(name, 'pub')
214 elif name.startswith('vm-android'):
215 status = ProcessBot(name, 'android')
227 else: 216 else:
228 # The buildbot will set a BUILDBOT_JAVA_HOME relative to the dart 217 # The buildbot will set a BUILDBOT_JAVA_HOME relative to the dart
229 # root directory, set JAVA_HOME based on that. 218 # root directory, set JAVA_HOME based on that.
230 FixJavaHome() 219 FixJavaHome()
231 status = ProcessCompiler(name) 220 status = ProcessBot(name, 'compiler')
232 221
233 if status: 222 if status:
234 print '@@@STEP_FAILURE@@@' 223 print '@@@STEP_FAILURE@@@'
235 224
236 return status 225 return status
237 226
238 227
239 if __name__ == '__main__': 228 if __name__ == '__main__':
240 sys.exit(main()) 229 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | tools/bots/android.py » ('j') | tools/bots/android.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698