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

Unified Diff: infra/bots/recipe_modules/core/api.py

Issue 2215803002: Move builder_spec, [dm|nanobench]_flags, builder_name_schema to recipes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add missing blacklist Created 4 years, 4 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: infra/bots/recipe_modules/core/api.py
diff --git a/infra/bots/recipe_modules/core/api.py b/infra/bots/recipe_modules/core/api.py
index 130ea7056290d039558e692632c8e796131c7594..377026432e9100143f066e98fad1b652801abd4f 100644
--- a/infra/bots/recipe_modules/core/api.py
+++ b/infra/bots/recipe_modules/core/api.py
@@ -14,23 +14,9 @@ import sys
from recipe_engine import recipe_api
from recipe_engine import config_types
-from . import fake_specs
-
class SkiaApi(recipe_api.RecipeApi):
- def get_builder_spec(self, skia_dir, builder_name):
- """Obtain the buildbot spec for the given builder."""
- fake_spec = None
- if self._test_data.enabled:
- fake_spec = fake_specs.FAKE_SPECS[builder_name]
- builder_spec = self.m.run.json_from_file(
- skia_dir.join('tools', 'buildbot_spec.py'),
- skia_dir,
- builder_name,
- fake_spec)
- return builder_spec
-
def setup(self):
"""Prepare the bot to run."""
# Setup dependencies.
@@ -41,18 +27,16 @@ class SkiaApi(recipe_api.RecipeApi):
# Obtain the spec for this builder from the Skia repo. Use it to set more
# properties.
- builder_spec = self.get_builder_spec(self.m.vars.skia_dir,
- self.m.vars.builder_name)
+ builder_spec = self.m.vars.get_builder_spec(self.m.vars.builder_name)
# Continue setting up vars with the builder_spec.
self.m.vars.update_with_builder_spec(builder_spec)
-
if not self.m.path.exists(self.m.vars.tmp_dir):
self.m.run.run_once(self.m.file.makedirs,
- 'tmp_dir',
- self.m.vars.tmp_dir,
- infra_step=True)
+ 'tmp_dir',
+ self.m.vars.tmp_dir,
+ infra_step=True)
self.m.flavor.setup()
« no previous file with comments | « infra/bots/recipe_modules/builder_name_schema/builder_name_schema.py ('k') | infra/bots/recipe_modules/core/fake_specs.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698