| Index: scripts/slave/recipes/infra/recipe_autoroller_public.py
|
| diff --git a/scripts/slave/recipes/infra/recipe_autoroller_public.py b/scripts/slave/recipes/infra/recipe_autoroller_public.py
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..39ce80a50d5239ad649b8545954fbc1094c9ecdf
|
| --- /dev/null
|
| +++ b/scripts/slave/recipes/infra/recipe_autoroller_public.py
|
| @@ -0,0 +1,56 @@
|
| +# Copyright 2016 The Chromium Authors. All rights reserved.
|
| +# Use of this source code is governed by a BSD-style license that can be
|
| +# found in the LICENSE file.
|
| +
|
| +"""Rolls recipes.cfg dependencies for public projects."""
|
| +
|
| +DEPS = [
|
| + 'recipe_autoroller',
|
| + 'recipe_engine/properties',
|
| +]
|
| +
|
| +from recipe_engine import recipe_api
|
| +
|
| +
|
| +# Toposorted for best results.
|
| +# TODO(phajdan.jr): get the list of public projects from luci-config.
|
| +PROJECTS = [
|
| + 'depot_tools',
|
| + 'build',
|
| +]
|
| +
|
| +
|
| +PROPERTIES = {
|
| + 'projects': recipe_api.Property(default=PROJECTS),
|
| +}
|
| +
|
| +
|
| +def RunSteps(api, projects):
|
| + api.recipe_autoroller.prepare_checkout()
|
| + api.recipe_autoroller.roll_projects(projects)
|
| +
|
| +
|
| +def GenTests(api):
|
| + yield (
|
| + api.test('basic') +
|
| + api.properties(projects=['build']) +
|
| + api.recipe_autoroller.roll_data('build')
|
| + )
|
| +
|
| + yield (
|
| + api.test('nontrivial') +
|
| + api.properties(projects=['build']) +
|
| + api.recipe_autoroller.roll_data('build', trivial=False)
|
| + )
|
| +
|
| + yield (
|
| + api.test('empty') +
|
| + api.properties(projects=['build']) +
|
| + api.recipe_autoroller.roll_data('build', empty=True)
|
| + )
|
| +
|
| + yield (
|
| + api.test('failure') +
|
| + api.properties(projects=['build']) +
|
| + api.recipe_autoroller.roll_data('build', success=False)
|
| + )
|
|
|