| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 """A continuous builder which runs recipe tests.""" | 4 """A continuous builder which runs recipe tests.""" |
| 5 | 5 |
| 6 from recipe_engine.recipe_api import Property | 6 from recipe_engine.recipe_api import Property |
| 7 | 7 |
| 8 DEPS = [ | 8 DEPS = [ |
| 9 'depot_tools/bot_update', | 9 'depot_tools/bot_update', |
| 10 'depot_tools/gclient', | 10 'depot_tools/gclient', |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 def RunSteps(api, project_under_test): | 24 def RunSteps(api, project_under_test): |
| 25 root_dir = api.path['slave_build'] | 25 root_dir = api.path['slave_build'] |
| 26 cache_dir = root_dir.join('_cache_dir') | 26 cache_dir = root_dir.join('_cache_dir') |
| 27 | 27 |
| 28 c = api.gclient.make_config(CACHE_DIR=cache_dir) | 28 c = api.gclient.make_config(CACHE_DIR=cache_dir) |
| 29 soln = c.solutions.add() | 29 soln = c.solutions.add() |
| 30 soln.name = project_under_test | 30 soln.name = project_under_test |
| 31 soln.url = api.luci_config.get_project_metadata( | 31 soln.url = api.luci_config.get_project_metadata( |
| 32 project_under_test)['repo_url'] | 32 project_under_test)['repo_url'] |
| 33 soln.revision = 'HEAD' |
| 33 | 34 |
| 34 api.bot_update.ensure_checkout( | 35 api.bot_update.ensure_checkout( |
| 35 force=True, gclient_config=c, | 36 force=True, gclient_config=c, |
| 36 cwd=root_dir) | 37 cwd=root_dir) |
| 37 | 38 |
| 38 # TODO(martiniss): allow recipes.cfg patches to take affect | 39 # TODO(martiniss): allow recipes.cfg patches to take affect |
| 39 # This requires getting the refs.cfg from luci_config, reading the local | 40 # This requires getting the refs.cfg from luci_config, reading the local |
| 40 # patched version, etc. | 41 # patched version, etc. |
| 41 result = api.luci_config.get_project_config(project_under_test, 'recipes.cfg') | 42 result = api.luci_config.get_project_config(project_under_test, 'recipes.cfg') |
| 42 recipes_cfg = api.luci_config.parse_textproto(result['content'].split('\n')) | 43 recipes_cfg = api.luci_config.parse_textproto(result['content'].split('\n')) |
| (...skipping 12 matching lines...) Expand all Loading... |
| 55 mastername='chromium.tools.build', | 56 mastername='chromium.tools.build', |
| 56 buildername='recipe simulation tester', | 57 buildername='recipe simulation tester', |
| 57 revision='deadbeaf', | 58 revision='deadbeaf', |
| 58 project_under_test='build', | 59 project_under_test='build', |
| 59 ) + | 60 ) + |
| 60 api.luci_config.get_projects(('build',)) + | 61 api.luci_config.get_projects(('build',)) + |
| 61 api.luci_config.get_project_config( | 62 api.luci_config.get_project_config( |
| 62 'build', 'recipes.cfg', | 63 'build', 'recipes.cfg', |
| 63 'recipes_path: "foobar"') | 64 'recipes_path: "foobar"') |
| 64 ) | 65 ) |
| OLD | NEW |