mirror of
https://gerrit.googlesource.com/git-repo
synced 2026-05-31 06:59:46 +00:00
run_tests: leverage cipd when available for help2man
This tool isn't installed on CI bot images so we've been skipping it, but this is causing people to not run tests locally, and ignore errors. Use cipd to pull the tool in when available. Then revert a recent man change that the tool rejects. Change-Id: I1030d0070fd5a624656eba7434ae6ec99b2e3f2d Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/582401 Reviewed-by: Greg Edelston <gredelston@google.com> Tested-by: Mike Frysinger <vapier@google.com>
This commit is contained in:
@@ -66,7 +66,11 @@ def main(argv: List[str]) -> int:
|
||||
parser = get_parser()
|
||||
opts = parser.parse_args(argv)
|
||||
|
||||
if not shutil.which("help2man"):
|
||||
help2man = ["help2man"]
|
||||
cipd_help2man = TOPDIR / ".cipd_bin/bin/help2man"
|
||||
if cipd_help2man.exists():
|
||||
help2man = ["perl", cipd_help2man]
|
||||
elif not shutil.which("help2man"):
|
||||
sys.exit("Please install help2man to continue.")
|
||||
|
||||
# Let repo know we're generating man pages so it can avoid some dynamic
|
||||
@@ -81,7 +85,7 @@ def main(argv: List[str]) -> int:
|
||||
version = RepoSourceVersion()
|
||||
cmdlist = [
|
||||
[
|
||||
"help2man",
|
||||
*help2man,
|
||||
"-N",
|
||||
"-n",
|
||||
f"repo {cmd} - manual page for repo {cmd}",
|
||||
@@ -100,7 +104,7 @@ def main(argv: List[str]) -> int:
|
||||
]
|
||||
cmdlist.append(
|
||||
[
|
||||
"help2man",
|
||||
*help2man,
|
||||
"-N",
|
||||
"-n",
|
||||
"repository management tool built on top of git",
|
||||
|
||||
Reference in New Issue
Block a user