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

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

Issue 10829351: Fix dart editor buildbot scripts to support clobbering. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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/clean_output_directory.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 # 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 131
132 def FixJavaHome(): 132 def FixJavaHome():
133 buildbot_javahome = os.getenv('BUILDBOT_JAVA_HOME') 133 buildbot_javahome = os.getenv('BUILDBOT_JAVA_HOME')
134 if buildbot_javahome: 134 if buildbot_javahome:
135 current_pwd = os.getenv('PWD') 135 current_pwd = os.getenv('PWD')
136 java_home = os.path.join(current_pwd, buildbot_javahome) 136 java_home = os.path.join(current_pwd, buildbot_javahome)
137 os.environ['JAVA_HOME'] = java_home 137 os.environ['JAVA_HOME'] = java_home
138 print 'Setting java home to' 138 print 'Setting java home to'
139 print java_home 139 print java_home
140 140
141 def ClobberBuilder():
142 """ Clobber the builder before we do the build.
143 Args:
144 - mode: either 'debug' or 'release'
145 """
146 cmd = [sys.executable,
147 './tools/clean_output_directory.py']
148 print 'Clobbering %s' % (' '.join(cmd))
149 return subprocess.call(cmd, env=NO_COLOR_ENV)
150
151 def GetShouldClobber():
152 return os.environ.get(BUILDER_CLOBBER) == "1"
141 153
142 def main(): 154 def main():
143 print 'main' 155 print 'main'
144 if len(sys.argv) == 0: 156 if len(sys.argv) == 0:
145 print 'Script pathname not known, giving up.' 157 print 'Script pathname not known, giving up.'
146 return 1 158 return 1
147 159
148 scriptdir = os.path.dirname(sys.argv[0]) 160 scriptdir = os.path.dirname(sys.argv[0])
149 # Get at the top-level directory. This script is in client/tools 161 # Get at the top-level directory. This script is in client/tools
150 os.chdir(os.path.abspath(os.path.join(scriptdir, os.pardir, os.pardir))) 162 os.chdir(os.path.abspath(os.path.join(scriptdir, os.pardir, os.pardir)))
151 163
164 if GetShouldClobber():
165 print '@@@BUILD_STEP Clobber@@@'
166 status = ClobberBuilder()
167 if status != 0:
168 print '@@@STEP_FAILURE@@@'
169 return status
170
171
152 #TODO(sigmund): remove this indirection once we update our bots 172 #TODO(sigmund): remove this indirection once we update our bots
153 (name, version) = GetBuildInfo() 173 (name, version) = GetBuildInfo()
154 if name.startswith('dart-editor'): 174 if name.startswith('dart-editor'):
155 # TODO (danrubel) Fix dart-editor builds so that we can call FixJavaHome() b efore the build 175 # TODO (danrubel) Fix dart-editor builds so that we can call FixJavaHome() b efore the build
156 status = ProcessTools('release', name, version) 176 status = ProcessTools('release', name, version)
157 else: 177 else:
158 # The buildbot will set a BUILDBOT_JAVA_HOME relative to the dart 178 # The buildbot will set a BUILDBOT_JAVA_HOME relative to the dart
159 # root directory, set JAVA_HOME based on that. 179 # root directory, set JAVA_HOME based on that.
160 FixJavaHome() 180 FixJavaHome()
161 status = ProcessCompiler(name) 181 status = ProcessCompiler(name)
162 182
163 if status: 183 if status:
164 print '@@@STEP_FAILURE@@@' 184 print '@@@STEP_FAILURE@@@'
165 185
166 return status 186 return status
167 187
168 188
169 if __name__ == '__main__': 189 if __name__ == '__main__':
170 sys.exit(main()) 190 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | tools/clean_output_directory.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698