blob: 5c5a368df1f2dd0da49086d0da709a5aa4f775e5 [file] [log] [blame]
# Copyright 2021 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.
"""A helper recipe for integration-testing the recipe_bootstrap tool.
Expected to be invoked locally as a luciexe sub-build by the parent.py
recipe. See parent.py for details.
"""
from PB.recipes.fuchsia.recipe_bootstrap_test.child import InputProperties
DEPS = [
"fuchsia/status_check",
"recipe_engine/properties",
"recipe_engine/python",
"recipe_engine/step",
]
PROPERTIES = InputProperties
def RunSteps(api, props):
if not props.recipe_bootstrap_enabled:
api.python.failing_step(
"checks failed",
"recipe_bootstrap didn't forward the expected properties",
)
step = api.step("recipe_bootstrap passed all checks", None)
# The parent recipe will check that this property is set.
step.presentation.properties["output_property"] = "arbitrary-value"
def GenTests(api):
yield (
api.status_check.test("basic") + api.properties(recipe_bootstrap_enabled=True)
)
yield api.status_check.test("properties_missing", status="failure")