OLD | NEW |
(Empty) | |
| 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 |
| 3 # found in the LICENSE file. |
| 4 |
| 5 """Rolls recipes.cfg dependencies for public projects.""" |
| 6 |
| 7 DEPS = [ |
| 8 'recipe_autoroller', |
| 9 'recipe_engine/properties', |
| 10 ] |
| 11 |
| 12 from recipe_engine import recipe_api |
| 13 |
| 14 |
| 15 # Toposorted for best results. |
| 16 # TODO(phajdan.jr): get the list of public projects from luci-config. |
| 17 PROJECTS = [ |
| 18 'depot_tools', |
| 19 'build', |
| 20 ] |
| 21 |
| 22 |
| 23 PROPERTIES = { |
| 24 'projects': recipe_api.Property(default=PROJECTS), |
| 25 } |
| 26 |
| 27 |
| 28 def RunSteps(api, projects): |
| 29 api.recipe_autoroller.prepare_checkout() |
| 30 api.recipe_autoroller.roll_projects(projects) |
| 31 |
| 32 |
| 33 def GenTests(api): |
| 34 yield ( |
| 35 api.test('basic') + |
| 36 api.properties(projects=['build']) + |
| 37 api.recipe_autoroller.roll_data('build') |
| 38 ) |
| 39 |
| 40 yield ( |
| 41 api.test('nontrivial') + |
| 42 api.properties(projects=['build']) + |
| 43 api.recipe_autoroller.roll_data('build', trivial=False) |
| 44 ) |
| 45 |
| 46 yield ( |
| 47 api.test('empty') + |
| 48 api.properties(projects=['build']) + |
| 49 api.recipe_autoroller.roll_data('build', empty=True) |
| 50 ) |
| 51 |
| 52 yield ( |
| 53 api.test('failure') + |
| 54 api.properties(projects=['build']) + |
| 55 api.recipe_autoroller.roll_data('build', success=False) |
| 56 ) |
OLD | NEW |