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

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

Issue 11150023: Change the editor build to use the latest changed svn revision and not the global svn revision. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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 | no next file » | no next file with comments »
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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 build and test the tools 88 build and test the tools
89 89
90 args: 90 args:
91 srcpath - the location of the source code to build 91 srcpath - the location of the source code to build
92 mode - the mode release or debug 92 mode - the mode release or debug
93 version - the svn version of the currently checked out code 93 version - the svn version of the currently checked out code
94 ''' 94 '''
95 print 'ProcessTools' 95 print 'ProcessTools'
96 96
97 toolsBuildScript = os.path.join('.', 'editor', 'build', 'build.py') 97 toolsBuildScript = os.path.join('.', 'editor', 'build', 'build.py')
98
99 # get the latest changed revision from the current repository sub-tree
danrubel 2012/10/15 20:49:35 Should this be moved to GetBuildInfo? And perhaps
devoncarew 2012/10/15 20:55:28 I added a TODO. This probably should be in GetBuil
100 version = GetLatestChangedRevision()
98 101
99 #TODO: debug statements to be removed in the future. 102 #TODO: debug statements to be removed in the future.
100 print "mode = " + mode 103 print "mode = " + mode
101 print "name = " + name 104 print "name = " + name
102 print "version = " + version 105 print "version = " + version
103 print "toolsBuildScript = " + os.path.abspath(toolsBuildScript) 106 print "toolsBuildScript = " + os.path.abspath(toolsBuildScript)
104 107
105 utils = GetUtils() 108 utils = GetUtils()
106 outdir = GetOutDir(utils, mode) 109 outdir = GetOutDir(utils, mode)
107 cmds = [sys.executable, toolsBuildScript, 110 cmds = [sys.executable, toolsBuildScript,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 - mode: either 'debug' or 'release' 148 - mode: either 'debug' or 'release'
146 """ 149 """
147 cmd = [sys.executable, 150 cmd = [sys.executable,
148 './tools/clean_output_directory.py'] 151 './tools/clean_output_directory.py']
149 print 'Clobbering %s' % (' '.join(cmd)) 152 print 'Clobbering %s' % (' '.join(cmd))
150 return subprocess.call(cmd) 153 return subprocess.call(cmd)
151 154
152 def GetShouldClobber(): 155 def GetShouldClobber():
153 return os.environ.get(BUILDER_CLOBBER) == "1" 156 return os.environ.get(BUILDER_CLOBBER) == "1"
154 157
158 def RunDart(scriptPath):
159 if sys.platform == 'darwin':
160 pipe = subprocess.Popen(
161 ['./tools/testing/bin/macos/dart', scriptPath],
162 stdout=subprocess.PIPE, stderr=subprocess.PIPE)
163 elif os.name == 'posix':
164 pipe = subprocess.Popen(
165 ['./tools/testing/bin/linux/dart', scriptPath],
166 stdout=subprocess.PIPE, stderr=subprocess.PIPE)
167 else:
168 pipe = subprocess.Popen(
169 ['tools\\testing\\bin\\windows\\dart.exe', scriptPath],
170 stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
171
172 output = pipe.communicate()
173 return output[0]
174
175 def GetLatestChangedRevision():
176 # 0.1.2.0_r13661
177 # 0.1.2.0_r13661_username
178 fullVersion = RunDart("tools/version.dart")
179
180 m = re.search('._r(\d+)', fullVersion)
181 svnRev = m.group(1)
182
183 return svnRev
184
155 def main(): 185 def main():
156 print 'main' 186 print 'main'
dgrove 2012/10/15 21:02:12 is this leftover debugging?
devoncarew 2012/10/15 21:03:44 It was in there already - doesn't seem to add a lo
187
157 if len(sys.argv) == 0: 188 if len(sys.argv) == 0:
158 print 'Script pathname not known, giving up.' 189 print 'Script pathname not known, giving up.'
159 return 1 190 return 1
160 191
161 scriptdir = os.path.dirname(sys.argv[0]) 192 scriptdir = os.path.dirname(sys.argv[0])
162 # Get at the top-level directory. This script is in client/tools 193 # Get at the top-level directory. This script is in client/tools
163 os.chdir(os.path.abspath(os.path.join(scriptdir, os.pardir, os.pardir))) 194 os.chdir(os.path.abspath(os.path.join(scriptdir, os.pardir, os.pardir)))
164 195
165 if GetShouldClobber(): 196 if GetShouldClobber():
166 print '@@@BUILD_STEP Clobber@@@' 197 print '@@@BUILD_STEP Clobber@@@'
(...skipping 16 matching lines...) Expand all
183 status = ProcessCompiler(name) 214 status = ProcessCompiler(name)
184 215
185 if status: 216 if status:
186 print '@@@STEP_FAILURE@@@' 217 print '@@@STEP_FAILURE@@@'
187 218
188 return status 219 return status
189 220
190 221
191 if __name__ == '__main__': 222 if __name__ == '__main__':
192 sys.exit(main()) 223 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698