OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2016 The Chromium Authors. All rights reserved. | 2 # Copyright 2016 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 import argparse | 6 import argparse |
7 import copy | 7 import copy |
8 import json | 8 import json |
9 import logging | 9 import logging |
10 import os | 10 import os |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 ] | 175 ] |
176 if args.use_gitiles: | 176 if args.use_gitiles: |
177 recipe_cmd.append('--use-gitiles') | 177 recipe_cmd.append('--use-gitiles') |
178 recipe_cmd.extend([ | 178 recipe_cmd.extend([ |
179 '--', | 179 '--', |
180 '--verbose', | 180 '--verbose', |
181 'run', | 181 'run', |
182 '--properties-file', properties_file, | 182 '--properties-file', properties_file, |
183 '--workdir', os.path.join(tempdir, 'w'), | 183 '--workdir', os.path.join(tempdir, 'w'), |
184 '--output-result-json', recipe_result_path, | 184 '--output-result-json', recipe_result_path, |
185 args.recipe, | 185 properties.get('recipe') or args.recipe, |
186 ]) | 186 ]) |
187 # If we bootstrap through logdog, the recipe command line gets written | 187 # If we bootstrap through logdog, the recipe command line gets written |
188 # to a temporary file and does not appear in the log. | 188 # to a temporary file and does not appear in the log. |
189 LOGGER.info('Recipe command line: %r', recipe_cmd) | 189 LOGGER.info('Recipe command line: %r', recipe_cmd) |
190 recipe_return_code = None | 190 recipe_return_code = None |
191 try: | 191 try: |
192 bs = logdog_bootstrap.bootstrap(rt, args, basedir, tempdir, properties, | 192 bs = logdog_bootstrap.bootstrap(rt, args, basedir, tempdir, properties, |
193 recipe_cmd) | 193 recipe_cmd) |
194 | 194 |
195 LOGGER.info('Bootstrapping through LogDog: %s', bs.cmd) | 195 LOGGER.info('Bootstrapping through LogDog: %s', bs.cmd) |
(...skipping 25 matching lines...) Expand all Loading... |
221 # Re-execute with the updated remote_run.py. | 221 # Re-execute with the updated remote_run.py. |
222 return _call([sys.executable] + argv) | 222 return _call([sys.executable] + argv) |
223 | 223 |
224 stream = annotator.StructuredAnnotationStream() | 224 stream = annotator.StructuredAnnotationStream() |
225 with stream.step('remote_run_result'): | 225 with stream.step('remote_run_result'): |
226 return main(argv) | 226 return main(argv) |
227 | 227 |
228 | 228 |
229 if __name__ == '__main__': | 229 if __name__ == '__main__': |
230 sys.exit(shell_main(sys.argv)) | 230 sys.exit(shell_main(sys.argv)) |
OLD | NEW |