| """Recipe to validate libassistant sdk code on the given patch.""" |
| from slave import base_recipe |
| from slave.step import libassistant_sdk_step as sdk_step |
| |
| # pylint: disable=line-too-long |
| SAMPLE_MANIFEST_STRING = """ |
| <?xml version="1.0" encoding="UTF-8"?> |
| <manifest> |
| <remote fetch="https://libassistant-internal.googlesource.com/" name="libassistant" review="https://libassistant-internal-review.googlesource.com/"/> |
| |
| <default revision="master"/> |
| |
| <project name="standalone/src" path="src" remote="libassistant"/> |
| <project name="standalone/deps" path="src/deps" remote="libassistant"/> |
| <project name="libassistant/contrib" path="src/libassistant/contrib" remote="libassistant"/> |
| <project name="libassistant/shared" path="src/libassistant/shared" remote="libassistant"/> |
| <project name="libassistant/internal" path="src/libassistant/internal" remote="libassistant"/> |
| <project name="libassistant/internal/third_party" path="src/libassistant/internal/third_party" remote="libassistant"/> |
| </manifest> |
| """ |
| # pylint: enable=line-too-long |
| |
| DEFAULT_PROPERTIES = {'gclient_root': 'src'} |
| |
| |
| def GetValidBuildNames(): |
| return ['validate_libassistant_sdk'] |
| |
| |
| def CreateRecipe(build_name: str, **kwargs): |
| del build_name |
| return LibassistantSdkRecipe(**kwargs) |
| |
| |
| class LibassistantSdkRecipe(base_recipe.BaseRecipe): |
| """Recipe to validate libassistant sdk.""" |
| |
| def __init__(self, **kwargs): |
| base_recipe.BaseRecipe.__init__(self, **kwargs) |
| # we don't want to run this recipe in CB |
| assert self.build_system == 'cq' |
| |
| self._step_kwargs['properties'] = dict( |
| list(DEFAULT_PROPERTIES.items()) + |
| list(self._step_kwargs.get('properties', {}).items()) |
| ) |
| |
| def get_steps(self): |
| return [sdk_step.SdkValidationStep(**self._step_kwargs)] |
| |