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

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

Issue 12450026: Added tools/bots/editor.py to build the editor (using gyp/build.py) and run editor tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 months 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/bot.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python
1 # 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
2 # 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
3 # BSD-style license that can be found in the LICENSE file. 4 # BSD-style license that can be found in the LICENSE file.
4 5
5 #!/usr/bin/python
6
7 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 6 # 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 7 # Use of this source code is governed by a BSD-style license that can be
9 # found in the LICENSE file. 8 # found in the LICENSE file.
10 9
11 """Dart client buildbot steps 10 """Dart client buildbot steps
12 11
13 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
14 chromium and headless dartium. 13 chromium and headless dartium.
15 """ 14 """
16 15
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 version - the svn version of the currently checked out code 92 version - the svn version of the currently checked out code
94 ''' 93 '''
95 print 'ProcessTools' 94 print 'ProcessTools'
96 95
97 toolsBuildScript = os.path.join('.', 'editor', 'build', 'build.py') 96 toolsBuildScript = os.path.join('.', 'editor', 'build', 'build.py')
98 97
99 # TODO(devoncarew): should we move this into GetBuildInfo()? 98 # TODO(devoncarew): should we move this into GetBuildInfo()?
100 # get the latest changed revision from the current repository sub-tree 99 # get the latest changed revision from the current repository sub-tree
101 version = GetLatestChangedRevision() 100 version = GetLatestChangedRevision()
102 101
103 #TODO: debug statements to be removed in the future.
104 print "mode = " + mode
105 print "name = " + name
106 print "version = " + version
107 print "toolsBuildScript = " + os.path.abspath(toolsBuildScript)
108
109 utils = GetUtils() 102 utils = GetUtils()
110 outdir = GetOutDir(utils, mode) 103 outdir = GetOutDir(utils, mode)
111 cmds = [sys.executable, toolsBuildScript, 104 cmds = [sys.executable, toolsBuildScript,
112 '--mode=' + mode, '--revision=' + version, 105 '--mode=' + mode, '--revision=' + version,
113 '--name=' + name, '--out=' + outdir] 106 '--name=' + name, '--out=' + outdir]
114 local_env = os.environ 107 local_env = os.environ
115 #if 'linux' in name: 108 #if 'linux' in name:
116 # javahome = os.path.join(os.path.expanduser('~'), 'jdk1.6.0_25') 109 # javahome = os.path.join(os.path.expanduser('~'), 'jdk1.6.0_25')
117 # local_env['JAVA_HOME'] = javahome 110 # local_env['JAVA_HOME'] = javahome
118 # local_env['PATH'] = (os.path.join(javahome, 'bin') + 111 # local_env['PATH'] = (os.path.join(javahome, 'bin') +
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 # 0.1.2.0_r13661 170 # 0.1.2.0_r13661
178 # 0.1.2.0_r13661_username 171 # 0.1.2.0_r13661_username
179 fullVersion = RunDart("tools/version.dart") 172 fullVersion = RunDart("tools/version.dart")
180 173
181 m = re.search('._r(\d+)', fullVersion) 174 m = re.search('._r(\d+)', fullVersion)
182 svnRev = m.group(1) 175 svnRev = m.group(1)
183 176
184 return svnRev 177 return svnRev
185 178
186 def main(): 179 def main():
187 print 'main'
188
189 if len(sys.argv) == 0: 180 if len(sys.argv) == 0:
190 print 'Script pathname not known, giving up.' 181 print 'Script pathname not known, giving up.'
191 return 1 182 return 1
192 183
193 scriptdir = os.path.dirname(sys.argv[0]) 184 scriptdir = os.path.dirname(sys.argv[0])
194 # Get at the top-level directory. This script is in client/tools 185 # Get at the top-level directory. This script is in client/tools
195 os.chdir(os.path.abspath(os.path.join(scriptdir, os.pardir, os.pardir))) 186 os.chdir(os.path.abspath(os.path.join(scriptdir, os.pardir, os.pardir)))
196 187
197 if GetShouldClobber(): 188 if GetShouldClobber():
198 print '@@@BUILD_STEP Clobber@@@' 189 print '@@@BUILD_STEP Clobber@@@'
199 status = ClobberBuilder() 190 status = ClobberBuilder()
200 if status != 0: 191 if status != 0:
201 print '@@@STEP_FAILURE@@@' 192 print '@@@STEP_FAILURE@@@'
202 return status 193 return status
203 194
204 195
205 #TODO(sigmund): remove this indirection once we update our bots 196 #TODO(sigmund): remove this indirection once we update our bots
206 (name, version) = GetBuildInfo() 197 (name, version) = GetBuildInfo()
207 # The buildbot will set a BUILDBOT_JAVA_HOME relative to the dart 198 # The buildbot will set a BUILDBOT_JAVA_HOME relative to the dart
208 # root directory, set JAVA_HOME based on that. 199 # root directory, set JAVA_HOME based on that.
209 FixJavaHome() 200 FixJavaHome()
210 if name.startswith('dart-editor'): 201 if name.startswith('dart-editor'):
211 status = ProcessTools('release', name, version) 202 # TODO(kustermann,ricow): This is a temporary hack until we can safely
203 # enable it on main waterfall. We need to remove this eventually
204 is_fyi = False
205 if name.startswith('dart-editor-fyi'):
206 match = re.search('dart-editor-fyi(.*)', name)
207 name = 'dart-editor' + match.group(1)
208 is_fyi = True
209 # Run the old annotated steps script first.
210 status = ProcessTools('release', name, version) or status
211 # In case we're an FYI builder, run 'tools/bots/editor.py' as well
212 if is_fyi:
213 status = ProcessBot(name, 'editor')
212 elif name.startswith('pub-'): 214 elif name.startswith('pub-'):
213 status = ProcessBot(name, 'pub') 215 status = ProcessBot(name, 'pub')
214 elif name.startswith('vm-android'): 216 elif name.startswith('vm-android'):
215 status = ProcessBot(name, 'android') 217 status = ProcessBot(name, 'android')
216 else: 218 else:
217 status = ProcessBot(name, 'compiler') 219 status = ProcessBot(name, 'compiler')
218 220
219 if status: 221 if status:
220 print '@@@STEP_FAILURE@@@' 222 print '@@@STEP_FAILURE@@@'
221 223
222 return status 224 return status
223 225
224 226
225 if __name__ == '__main__': 227 if __name__ == '__main__':
226 sys.exit(main()) 228 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | tools/bots/bot.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698