| # Copyright 2020 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| from PB.go.chromium.org.luci.cv.api.config.v2 import config as cv_config_pb2 |
| from PB.recipe_modules.fuchsia.validate_lucicfg.options import Options |
| from recipe_engine import recipe_test_api |
| |
| from RECIPE_MODULES.fuchsia.validate_lucicfg import ( |
| NEW_BUILDERS_IN_CQ_MSG, |
| CQ_BUILDERS_DELETED_MSG, |
| ) |
| |
| |
| class ValidateLucicfgTestApi(recipe_test_api.RecipeTestApi): |
| NEW_BUILDERS_IN_CQ_MSG = NEW_BUILDERS_IN_CQ_MSG |
| CQ_BUILDERS_DELETED_MSG = CQ_BUILDERS_DELETED_MSG |
| |
| def cq_config(self, builders, includable_only=False): |
| return cv_config_pb2.Config( |
| config_groups=[ |
| dict( |
| verifiers=dict( |
| tryjob=dict( |
| builders=[ |
| dict(name=builder_name, includable_only=includable_only) |
| for builder_name in builders |
| ] |
| ) |
| ) |
| ) |
| ] |
| ) |
| |
| def options(self, **kwargs): |
| return Options( |
| starlark_paths=["main.star", "dev.star"], |
| generated_dir="generated", |
| **kwargs, |
| ) |