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

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

Issue 10583034: Add setup of JAVA_HOME to the annotated steps script. The buildbot will pass the relative path to t… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Changed to base the setting on BUILDBOT_JAVA_HOME Created 8 years, 6 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 print 'ProcessCompiler' 122 print 'ProcessCompiler'
123 has_shell=False 123 has_shell=False
124 if 'windows' in name: 124 if 'windows' in name:
125 # In Windows we need to run in the shell, so that we have all the 125 # In Windows we need to run in the shell, so that we have all the
126 # environment variables available. 126 # environment variables available.
127 has_shell=True 127 has_shell=True
128 return subprocess.call([sys.executable, 128 return subprocess.call([sys.executable,
129 os.path.join('utils', 'compiler', 'buildbot.py')], 129 os.path.join('utils', 'compiler', 'buildbot.py')],
130 env=os.environ, shell=has_shell) 130 env=os.environ, shell=has_shell)
131 131
132 def FixJavaHome():
133 buildbot_javahome = os.getenv('BUILDBOT_JAVA_HOME')
134 if buildbot_javahome:
135 current_pwd = os.getenv('PWD')
136 java_home = os.path.join(current_pwd, buildbot_javahome)
137 os.environ['JAVA_HOME'] = java_home
138 print 'Setting java home to'
139 print java_home
140
141
132 def main(): 142 def main():
133 print 'main' 143 print 'main'
134 if len(sys.argv) == 0: 144 if len(sys.argv) == 0:
135 print 'Script pathname not known, giving up.' 145 print 'Script pathname not known, giving up.'
136 return 1 146 return 1
137 147
138 scriptdir = os.path.dirname(sys.argv[0]) 148 scriptdir = os.path.dirname(sys.argv[0])
139 # Get at the top-level directory. This script is in client/tools 149 # Get at the top-level directory. This script is in client/tools
140 os.chdir(os.path.abspath(os.path.join(scriptdir, os.pardir, os.pardir))) 150 os.chdir(os.path.abspath(os.path.join(scriptdir, os.pardir, os.pardir)))
141 151
142 #TODO(sigmund): remove this indirection once we update our bots 152 #TODO(sigmund): remove this indirection once we update our bots
143 (name, version) = GetBuildInfo() 153 (name, version) = GetBuildInfo()
154 # The buildbot will set a BUILDBOT_JAVA_HOME relative to the dart
155 # root directory, set JAVA_HOME based on that.
156 FixJavaHome()
144 if name.startswith('dart-editor'): 157 if name.startswith('dart-editor'):
145 status = ProcessTools('release', name, version) 158 status = ProcessTools('release', name, version)
146 else: 159 else:
147 status = ProcessCompiler(name) 160 status = ProcessCompiler(name)
148 161
149 if status: 162 if status:
150 print '@@@STEP_FAILURE@@@' 163 print '@@@STEP_FAILURE@@@'
151 164
152 return status 165 return status
153 166
154 167
155 if __name__ == '__main__': 168 if __name__ == '__main__':
156 sys.exit(main()) 169 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