| """Recipe for running a Dipper build on the given device.""" |
| import os |
| |
| from slave import base_recipe |
| from slave.step import dipper_step |
| |
| |
| |
| def GetValidBuildNames(): |
| """Gets all valid build names.""" |
| return ['dipper-eng', 'dipper-user'] |
| |
| |
| def CreateRecipe(build_name: str, **kwargs): |
| """Builds a recipe object.""" |
| return DipperRecipe(build_name, **kwargs) |
| |
| |
| class DipperRecipe(base_recipe.BaseRecipe): |
| """Recipe to run Dipper build.""" |
| |
| def __init__(self, build_name, **kwargs): |
| prop = kwargs.get('properties', {}) |
| prop['skip_gclient'] = True |
| if 'properties' not in kwargs: |
| kwargs['properties'] = prop |
| base_recipe.BaseRecipe.__init__(self, **kwargs) |
| self._build_name = build_name |
| |
| def get_steps(self): |
| return [ |
| dipper_step.DipperStep( |
| self._build_name, |
| **self._step_kwargs), |
| ] |