| """Recipe for running a CCStudio build on the given device.""" |
| import os |
| |
| from slave import base_recipe |
| from slave.step import ccstudio_step |
| from slave.step import py_env_setup_step |
| |
| |
| |
| def GetValidBuildNames(): |
| """Get all valid build names.""" |
| return ['abbey-eng', 'abbey-user'] |
| |
| |
| def CreateRecipe(build_name: str, **kwargs): |
| """Build a recipe object.""" |
| return CCStudioRecipe(build_name, **kwargs) |
| |
| |
| class CCStudioRecipe(base_recipe.BaseRecipe): |
| """Recipe to run CCStudio 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): |
| requirements_project = 'abbey' |
| requirements_path = os.path.join('build', 'requirements.txt') |
| abbey_python_packages = 'team-abbey/python_packages' |
| return [ |
| py_env_setup_step.PyEnvSetupStep( |
| local_packages_dir=abbey_python_packages, |
| py3=True, |
| requirements_path=requirements_path, |
| requirements_project=requirements_project, |
| **self._step_kwargs), |
| ccstudio_step.CCStudioStep(self._build_name, |
| **self._step_kwargs), |
| ] |
| |