crosvm/infra/recipes/health_check.py
Dennis Kempin de651d0357 infra: Small process improvements
- Use vpython to call crovm tooling (This provides a predictable python
  environment and allow us to use argh).
- Add build_context() to provide a simple API that readies source and
  container.
- Nest preparation steps to reduce noise on builder page.

BUG=b:233913643
TEST=recipes.py test run

Change-Id: I6800e55f7311b32c6ef61918d13795af1fb3b588
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3674217
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Anton Romanov <romanton@google.com>
2022-05-27 20:59:12 +00:00

32 lines
833 B
Python

# Copyright 2022 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import re
from recipe_engine.post_process import Filter
PYTHON_VERSION_COMPATIBILITY = "PY3"
DEPS = [
"crosvm",
"recipe_engine/buildbucket",
"recipe_engine/context",
"recipe_engine/properties",
"recipe_engine/step",
]
def RunSteps(api):
with api.crosvm.build_context():
for check in ("python", "misc", "fmt", "clippy"):
api.crosvm.step_in_container("Checking %s" % check, ["./tools/health-check", check])
def GenTests(api):
yield (
api.test(
"basic",
api.buildbucket.ci_build(project="crosvm/crosvm"),
)
+ api.post_process(Filter().include_re(r"Checking.*"))
)