crosvm/tools/health-check
Dennis Kempin 35144ac49a tools/presubmit: New presubmit checks
This new script merges tools/health-checks with tools/presubmit. It
can now execute checks in parallel and will run crosvm tests and
clippy for all platforms as well.

This reduces presubmit check time for "everything" on a clean state
from 6:30m to 2m.

Time to run checks after a no-op change to the base crate is 1m,
down from 3m.

The default set of checks is optimized to cover all platforms but
prevent blocking on the build cache. This allows it to complete
in ~30s on incremental builds.

Luci build recipes will be updated to use this script, to ensure
that CI and local checks are always in sync.

The old health-check script is forwarded to the new presubmit
script while CI is updated to use the new script.

BUG=b:254317173
TEST=tools/presubmit

Change-Id: Iafde602bab61dbd2ee2f5f74918dc182b2832d47
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4277625
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Zihan Chen <zihanchen@google.com>
Reviewed-by: Vikram Auradkar <auradkar@google.com>
2023-02-28 22:31:48 +00:00

31 lines
740 B
Python
Executable file

#!/usr/bin/env python3
# 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.
import sys
from impl.common import (
CROSVM_ROOT,
run_main,
cmd,
chdir,
)
def main(list_checks: bool = False, all: bool = False, *check_names: str):
chdir(CROSVM_ROOT)
if not list_checks:
print("Deprecated. Please use ./tools/presubmit instead")
if not check_names:
check_names = ("health_checks",)
cmd(
sys.executable,
"tools/presubmit",
"--no-delta" if all else None,
"--list-checks" if list_checks else None,
*check_names
).fg()
if __name__ == "__main__":
run_main(main)