mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-10-23 12:49:55 +00:00
60a517f6bf
This will keep CI and local test in sync. Failed steps can also easily be reproduced locally by copy/pasting the `tools/presubmit {check}` title of each step. We should be able to merge the health check and linux builders eventually, but will need to move the binary size calculation into a separate builder. BUG=b:271171326 TEST=led jobs below: health_check: https://ci.chromium.org/swarming/task/60b7c71b340f4b10 x86_64: https://ci.chromium.org/swarming/task/60b7b0b45f572210 x86_64_direct: https://ci.chromium.org/swarming/task/60b7c44415ae7d10 aarch64: https://ci.chromium.org/swarming/task/60b7c50cc7682610 armhf: https://ci.chromium.org/swarming/task/60b7c458dce14310 mingw64: https://ci.chromium.org/swarming/task/60b7c47b3376fc10 Change-Id: Id3f78c5a021db96e42a90cdc77ab89d43b0f49c1 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4299933 Commit-Queue: Dennis Kempin <denniskempin@google.com> Reviewed-by: Zihan Chen <zihanchen@google.com>
58 lines
1.6 KiB
Python
58 lines
1.6 KiB
Python
# Copyright 2022 The ChromiumOS Authors
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
from recipe_engine.post_process import Filter
|
|
|
|
DEPS = [
|
|
"crosvm",
|
|
"recipe_engine/raw_io",
|
|
"recipe_engine/buildbucket",
|
|
"recipe_engine/context",
|
|
"recipe_engine/properties",
|
|
"recipe_engine/step",
|
|
]
|
|
|
|
|
|
def RunSteps(api):
|
|
with api.crosvm.container_build_context():
|
|
api.step(
|
|
"Self-test dev-container",
|
|
[
|
|
"vpython3",
|
|
api.crosvm.source_dir.join("tools/dev_container"),
|
|
"--verbose",
|
|
"--self-test",
|
|
],
|
|
)
|
|
result = api.step(
|
|
"List checks to run",
|
|
[
|
|
"vpython3",
|
|
api.crosvm.source_dir.join("tools/presubmit"),
|
|
"--list-checks",
|
|
"health_checks",
|
|
],
|
|
stdout=api.raw_io.output_text(),
|
|
)
|
|
check_list = result.stdout.strip().split("\n")
|
|
for check in check_list:
|
|
api.crosvm.step_in_container(
|
|
"tools/presubmit %s" % check, ["tools/presubmit", "--no-delta", check]
|
|
)
|
|
|
|
|
|
def GenTests(api):
|
|
yield (
|
|
api.test(
|
|
"basic",
|
|
api.buildbucket.ci_build(project="crosvm/crosvm"),
|
|
# Provide a fake response to --list-checks
|
|
api.step_data(
|
|
"List checks to run",
|
|
stdout=api.raw_io.output_text("check_a\ncheck_b"),
|
|
),
|
|
)
|
|
+ api.post_process(Filter("List checks to run").include_re(r"tools/presubmit .*"))
|
|
)
|