health-check 740 B

12345678910111213141516171819202122232425262728293031
  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. import sys
  6. from impl.common import (
  7. CROSVM_ROOT,
  8. run_main,
  9. cmd,
  10. chdir,
  11. )
  12. def main(list_checks: bool = False, all: bool = False, *check_names: str):
  13. chdir(CROSVM_ROOT)
  14. if not list_checks:
  15. print("Deprecated. Please use ./tools/presubmit instead")
  16. if not check_names:
  17. check_names = ("health_checks",)
  18. cmd(
  19. sys.executable,
  20. "tools/presubmit",
  21. "--no-delta" if all else None,
  22. "--list-checks" if list_checks else None,
  23. *check_names
  24. ).fg()
  25. if __name__ == "__main__":
  26. run_main(main)