Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2094)

Unified Diff: scripts/slave/recipes/infra/recipe_autoroller_public.py

Issue 1862383002: build: add recipe code for new autoroller (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: TODO Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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)
+ )

Powered by Google App Engine
This is Rietveld 408576698