| OLD | NEW |
| 1 #!/usr/bin/python -u | 1 #!/usr/bin/python -u |
| 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 """This allows easy execution of a recipe (scripts/slave/recipes, etc.) | 6 """This allows easy execution of a recipe (scripts/slave/recipes, etc.) |
| 7 without buildbot. | 7 without buildbot. |
| 8 | 8 |
| 9 This is currently useful for testing recipes locally while developing them. | 9 This is currently useful for testing recipes locally while developing them. |
| 10 | 10 |
| 11 Example: | 11 Example: |
| 12 ./run_recipe.py run_presubmit repo_name=tools_build -- issue=12345 \ | 12 ./run_recipe.py run_presubmit repo_name=tools_build -- issue=12345 \ |
| 13 patchset=1 description="this is a cool description" \ | 13 patchset=1 description="this is a cool description" \ |
| 14 blamelist=['dude@chromium.org'] \ | 14 blamelist=['dude@chromium.org'] \ |
| 15 rietveld=https://chromiumcodereview.appspot.com | 15 rietveld=https://codereview.chromium.org |
| 16 | 16 |
| 17 This would execute the run_presubmit recipe, passing | 17 This would execute the run_presubmit recipe, passing |
| 18 {'repo_name':'tools_build'} as factory_properties, and {'issue':'12345' ...} | 18 {'repo_name':'tools_build'} as factory_properties, and {'issue':'12345' ...} |
| 19 as build_properties. | 19 as build_properties. |
| 20 | 20 |
| 21 See scripts/slave/annotated_run.py for more information about recipes. | 21 See scripts/slave/annotated_run.py for more information about recipes. |
| 22 """ | 22 """ |
| 23 | 23 |
| 24 import json | 24 import json |
| 25 import os | 25 import os |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 ['python', '-u', RUNIT, 'python', '-u', ANNOTATED_RUN, | 98 ['python', '-u', RUNIT, 'python', '-u', ANNOTATED_RUN, |
| 99 '--keep-stdin', # so that pdb works for local execution | 99 '--keep-stdin', # so that pdb works for local execution |
| 100 '--factory-properties', json.dumps(fp), | 100 '--factory-properties', json.dumps(fp), |
| 101 '--build-properties', json.dumps(bp)], | 101 '--build-properties', json.dumps(bp)], |
| 102 cwd=SLAVE_DIR, | 102 cwd=SLAVE_DIR, |
| 103 env=env) | 103 env=env) |
| 104 | 104 |
| 105 | 105 |
| 106 if __name__ == '__main__': | 106 if __name__ == '__main__': |
| 107 sys.exit(main(sys.argv)) | 107 sys.exit(main(sys.argv)) |
| OLD | NEW |