| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 LOGGER.info('Using properties: %r', properties) | 114 LOGGER.info('Using properties: %r', properties) |
| 115 properties_file = os.path.join(tempdir, 'remote_run_properties.json') | 115 properties_file = os.path.join(tempdir, 'remote_run_properties.json') |
| 116 with open(properties_file, 'w') as f: | 116 with open(properties_file, 'w') as f: |
| 117 json.dump(properties, f) | 117 json.dump(properties, f) |
| 118 | 118 |
| 119 monitoring_utils.write_build_monitoring_event(build_data_dir, properties) | 119 monitoring_utils.write_build_monitoring_event(build_data_dir, properties) |
| 120 | 120 |
| 121 recipe_cmd = [ | 121 recipe_cmd = [ |
| 122 sys.executable, | 122 sys.executable, |
| 123 os.path.join(cipd_path, 'recipes.py'), | 123 os.path.join(cipd_path, 'recipes.py'), |
| 124 '--verbose', |
| 124 'remote_run', | 125 'remote_run', |
| 125 '--repository', args.repository, | 126 '--repository', args.repository, |
| 126 '--revision', args.revision, | 127 '--revision', args.revision, |
| 127 '--workdir', os.path.join(tempdir, 'rw'), | 128 '--workdir', os.path.join(tempdir, 'rw'), |
| 128 '--', | 129 '--', |
| 129 '--properties-file', properties_file, | 130 '--properties-file', properties_file, |
| 130 '--workdir', os.path.join(tempdir, 'w'), | 131 '--workdir', os.path.join(tempdir, 'w'), |
| 131 args.recipe, | 132 args.recipe, |
| 132 ] | 133 ] |
| 133 # If we bootstrap through logdog, the recipe command line gets written | 134 # If we bootstrap through logdog, the recipe command line gets written |
| (...skipping 26 matching lines...) Expand all Loading... |
| 160 | 161 |
| 161 if update_scripts.update_scripts(): | 162 if update_scripts.update_scripts(): |
| 162 # Re-execute with the updated remote_run.py. | 163 # Re-execute with the updated remote_run.py. |
| 163 return _call([sys.executable] + argv) | 164 return _call([sys.executable] + argv) |
| 164 | 165 |
| 165 return main(argv) | 166 return main(argv) |
| 166 | 167 |
| 167 | 168 |
| 168 if __name__ == '__main__': | 169 if __name__ == '__main__': |
| 169 sys.exit(shell_main(sys.argv)) | 170 sys.exit(shell_main(sys.argv)) |
| OLD | NEW |