OLD | NEW |
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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 '--name=' + name, '--out=' + outdir] | 108 '--name=' + name, '--out=' + outdir] |
109 local_env = os.environ | 109 local_env = os.environ |
110 if 'linux' in name: | 110 if 'linux' in name: |
111 javahome = os.path.join(os.path.expanduser('~'), 'jdk1.6.0_25') | 111 javahome = os.path.join(os.path.expanduser('~'), 'jdk1.6.0_25') |
112 local_env['JAVA_HOME'] = javahome | 112 local_env['JAVA_HOME'] = javahome |
113 local_env['PATH'] = (os.path.join(javahome, 'bin') + | 113 local_env['PATH'] = (os.path.join(javahome, 'bin') + |
114 os.pathsep + local_env['PATH']) | 114 os.pathsep + local_env['PATH']) |
115 | 115 |
116 return subprocess.call(cmds, env=local_env) | 116 return subprocess.call(cmds, env=local_env) |
117 | 117 |
118 def ProcessFrog(name): | 118 def ProcessCompiler(name): |
119 ''' | 119 ''' |
120 build and test experimental frog build | 120 build and test the compiler |
121 ''' | 121 ''' |
122 print 'ProcessFrog' | 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('frog', 'scripts', 'buildbot_annotated_steps.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 main(): | 132 def main(): |
133 print 'main' | 133 print 'main' |
134 if len(sys.argv) == 0: | 134 if len(sys.argv) == 0: |
135 print 'Script pathname not known, giving up.' | 135 print 'Script pathname not known, giving up.' |
136 return 1 | 136 return 1 |
137 | 137 |
138 scriptdir = os.path.dirname(sys.argv[0]) | 138 scriptdir = os.path.dirname(sys.argv[0]) |
139 # Get at the top-level directory. This script is in client/tools | 139 # 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))) | 140 os.chdir(os.path.abspath(os.path.join(scriptdir, os.pardir, os.pardir))) |
141 | 141 |
142 #TODO(sigmund): remove this indirection once we update our bots | 142 #TODO(sigmund): remove this indirection once we update our bots |
143 (name, version) = GetBuildInfo() | 143 (name, version) = GetBuildInfo() |
144 if name.startswith('dart-editor'): | 144 if name.startswith('dart-editor'): |
145 status = ProcessTools('release', name, version) | 145 status = ProcessTools('release', name, version) |
146 else: | 146 else: |
147 status = ProcessFrog(name) | 147 status = ProcessCompiler(name) |
148 | 148 |
149 if status: | 149 if status: |
150 print '@@@STEP_FAILURE@@@' | 150 print '@@@STEP_FAILURE@@@' |
151 | 151 |
152 return status | 152 return status |
153 | 153 |
154 | 154 |
155 if __name__ == '__main__': | 155 if __name__ == '__main__': |
156 sys.exit(main()) | 156 sys.exit(main()) |
OLD | NEW |