| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """Entry point for fully-annotated builds. | 6 """Entry point for fully-annotated builds. |
| 7 | 7 |
| 8 This script is part of the effort to move all builds to annotator-based | 8 This script is part of the effort to move all builds to annotator-based |
| 9 systems. Any builder configured to use the AnnotatorFactory.BaseFactory() | 9 systems. Any builder configured to use the AnnotatorFactory.BaseFactory() |
| 10 found in scripts/master/factory/annotator_factory.py executes a single | 10 found in scripts/master/factory/annotator_factory.py executes a single |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 build_properties_str = json.dumps(opts.build_properties) | 191 build_properties_str = json.dumps(opts.build_properties) |
| 192 property_placeholder_lst = [ | 192 property_placeholder_lst = [ |
| 193 '--factory-properties', factory_properties_str, | 193 '--factory-properties', factory_properties_str, |
| 194 '--build-properties', build_properties_str] | 194 '--build-properties', build_properties_str] |
| 195 for step in steps: | 195 for step in steps: |
| 196 new_cmd = [] | 196 new_cmd = [] |
| 197 for item in expand_root_placeholder(root, step['cmd']): | 197 for item in expand_root_placeholder(root, step['cmd']): |
| 198 if item == recipe_util.PropertyPlaceholder: | 198 if item == recipe_util.PropertyPlaceholder: |
| 199 new_cmd.extend(property_placeholder_lst) | 199 new_cmd.extend(property_placeholder_lst) |
| 200 else: | 200 else: |
| 201 new_cmd.append(item) | 201 new_cmd.append(str(item)) |
| 202 step['cmd'] = new_cmd | 202 step['cmd'] = new_cmd |
| 203 if 'cwd' in step: | 203 if 'cwd' in step: |
| 204 [new_cwd] = expand_root_placeholder(root, [step['cwd']]) | 204 [new_cwd] = expand_root_placeholder(root, [step['cwd']]) |
| 205 step['cwd'] = new_cwd | 205 step['cwd'] = new_cwd |
| 206 annotator_path = os.path.join( | 206 annotator_path = os.path.join( |
| 207 os.path.dirname(SCRIPT_PATH), 'common', 'annotator.py') | 207 os.path.dirname(SCRIPT_PATH), 'common', 'annotator.py') |
| 208 tmpfile, tmpname = tempfile.mkstemp() | 208 tmpfile, tmpname = tempfile.mkstemp() |
| 209 try: | 209 try: |
| 210 cmd = [sys.executable, annotator_path, tmpname] | 210 cmd = [sys.executable, annotator_path, tmpname] |
| 211 step_doc = json.dumps(steps) | 211 step_doc = json.dumps(steps) |
| (...skipping 29 matching lines...) Expand all Loading... |
| 241 s.step_text('gclient sync failed!') | 241 s.step_text('gclient sync failed!') |
| 242 s.step_warnings() | 242 s.step_warnings() |
| 243 os.environ['RUN_SLAVE_UPDATED_SCRIPTS'] = '1' | 243 os.environ['RUN_SLAVE_UPDATED_SCRIPTS'] = '1' |
| 244 return True | 244 return True |
| 245 | 245 |
| 246 | 246 |
| 247 if __name__ == '__main__': | 247 if __name__ == '__main__': |
| 248 if UpdateScripts(): | 248 if UpdateScripts(): |
| 249 os.execv(sys.executable, [sys.executable] + sys.argv) | 249 os.execv(sys.executable, [sys.executable] + sys.argv) |
| 250 sys.exit(main()) | 250 sys.exit(main()) |
| OLD | NEW |