xref: /aosp_15_r20/external/crosvm/tools/health-check (revision bb4ee6a4ae7042d18b07a98463b9c8b875e44b39)
1#!/usr/bin/env python3
2# Copyright 2022 The ChromiumOS Authors
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5
6import sys
7from impl.common import (
8    CROSVM_ROOT,
9    run_main,
10    cmd,
11    chdir,
12)
13
14
15def main(list_checks: bool = False, all: bool = False, *check_names: str):
16    chdir(CROSVM_ROOT)
17    if not list_checks:
18        print("Deprecated. Please use ./tools/presubmit instead")
19    if not check_names:
20        check_names = ("health_checks",)
21    cmd(
22        sys.executable,
23        "tools/presubmit",
24        "--no-delta" if all else None,
25        "--list-checks" if list_checks else None,
26        *check_names
27    ).fg()
28
29
30if __name__ == "__main__":
31    run_main(main)
32