diff options
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | cipd_manifest.txt | 32 | ||||
| -rw-r--r-- | cipd_manifest.versions | 18 | ||||
| -rw-r--r-- | man/repo-manifest.1 | 4 | ||||
| -rw-r--r-- | release/update_manpages.py | 10 | ||||
| -rwxr-xr-x | run_tests | 21 |
6 files changed, 76 insertions, 10 deletions
diff --git a/.gitignore b/.gitignore index 4e91be94c..4326a4ee1 100644 --- a/.gitignore +++ b/.gitignore | |||
| @@ -6,6 +6,7 @@ __pycache__ | |||
| 6 | /dist | 6 | /dist |
| 7 | .repopickle_* | 7 | .repopickle_* |
| 8 | /repoc | 8 | /repoc |
| 9 | /.cipd_bin | ||
| 9 | /.tox | 10 | /.tox |
| 10 | /.venv | 11 | /.venv |
| 11 | 12 | ||
diff --git a/cipd_manifest.txt b/cipd_manifest.txt new file mode 100644 index 000000000..da6dd8e02 --- /dev/null +++ b/cipd_manifest.txt | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | # Copyright (C) 2026 The Android Open Source Project | ||
| 2 | # | ||
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 4 | # you may not use this file except in compliance with the License. | ||
| 5 | # You may obtain a copy of the License at | ||
| 6 | # | ||
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 | ||
| 8 | # | ||
| 9 | # Unless required by applicable law or agreed to in writing, software | ||
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, | ||
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 12 | # See the License for the specific language governing permissions and | ||
| 13 | # limitations under the License. | ||
| 14 | |||
| 15 | # This file contains version pins of a few tools used by run_tests. | ||
| 16 | |||
| 17 | # Pin resolved versions in the repo, to reduce trust in the CIPD backend. | ||
| 18 | # | ||
| 19 | # Most of these tools are generated via builders at | ||
| 20 | # https://ci.chromium.org/p/infra/g/infra/console | ||
| 21 | # | ||
| 22 | # For these, the git revision is the one of | ||
| 23 | # https://chromium.googlesource.com/infra/infra.git. | ||
| 24 | # | ||
| 25 | # To regenerate them (after modifying this file): | ||
| 26 | # cipd ensure-file-resolve -ensure-file cipd_manifest.txt | ||
| 27 | $ResolvedVersions cipd_manifest.versions | ||
| 28 | |||
| 29 | # Supported platforms. Feel free to add more as long as the tools work. | ||
| 30 | $VerifiedPlatform linux-amd64 linux-arm64 mac-amd64 mac-arm64 | ||
| 31 | |||
| 32 | infra/3pp/tools/help2man/${platform} version:3@1.47.8.chromium.1 | ||
diff --git a/cipd_manifest.versions b/cipd_manifest.versions new file mode 100644 index 000000000..135f54048 --- /dev/null +++ b/cipd_manifest.versions | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | # This file is auto-generated by 'cipd ensure-file-resolve'. | ||
| 2 | # Do not modify manually. All changes will be overwritten. | ||
| 3 | |||
| 4 | infra/3pp/tools/help2man/linux-amd64 | ||
| 5 | version:3@1.47.8.chromium.1 | ||
| 6 | Ftn7OHsJBffbIuK3KERGGF21oKqMmnV00B6ZKmjxKe4C | ||
| 7 | |||
| 8 | infra/3pp/tools/help2man/linux-arm64 | ||
| 9 | version:3@1.47.8.chromium.1 | ||
| 10 | _7lsBiY7fUeLXx1UJc_LEE8H9DG7CGGM9M2gjyqB9T4C | ||
| 11 | |||
| 12 | infra/3pp/tools/help2man/mac-amd64 | ||
| 13 | version:3@1.47.8.chromium.1 | ||
| 14 | E7Dldyd8BvjuW2ZuZy3ILNt7KNN2Cs_F_5dkwRfaL8IC | ||
| 15 | |||
| 16 | infra/3pp/tools/help2man/mac-arm64 | ||
| 17 | version:3@1.47.8.chromium.1 | ||
| 18 | K5qjjtmIDBnibI_76qoEEgsbwzkQUGrZxbBsaUgOeisC | ||
diff --git a/man/repo-manifest.1 b/man/repo-manifest.1 index 35c7d0216..75c9fa9e1 100644 --- a/man/repo-manifest.1 +++ b/man/repo-manifest.1 | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | .\" DO NOT MODIFY THIS FILE! It was generated by help2man. | 1 | .\" DO NOT MODIFY THIS FILE! It was generated by help2man. |
| 2 | .TH REPO "1" "May 2026" "repo manifest" "Repo Manual" | 2 | .TH REPO "1" "April 2026" "repo manifest" "Repo Manual" |
| 3 | .SH NAME | 3 | .SH NAME |
| 4 | repo \- repo manifest - manual page for repo manifest | 4 | repo \- repo manifest - manual page for repo manifest |
| 5 | .SH SYNOPSIS | 5 | .SH SYNOPSIS |
| @@ -697,7 +697,7 @@ default to which all projects in the included manifest belong. This recurses, | |||
| 697 | meaning it will apply to all projects in all manifests included as a result of | 697 | meaning it will apply to all projects in all manifests included as a result of |
| 698 | this element. | 698 | this element. |
| 699 | .PP | 699 | .PP |
| 700 | Local Manifests | 700 | Local Manifests |
| 701 | .PP | 701 | .PP |
| 702 | Additional remotes and projects may be added through local manifest files stored | 702 | Additional remotes and projects may be added through local manifest files stored |
| 703 | in `$TOP_DIR/.repo/local_manifests/*.xml`. | 703 | in `$TOP_DIR/.repo/local_manifests/*.xml`. |
diff --git a/release/update_manpages.py b/release/update_manpages.py index 8bd69b6a7..ecf51bb7a 100644 --- a/release/update_manpages.py +++ b/release/update_manpages.py | |||
| @@ -66,7 +66,11 @@ def main(argv: List[str]) -> int: | |||
| 66 | parser = get_parser() | 66 | parser = get_parser() |
| 67 | opts = parser.parse_args(argv) | 67 | opts = parser.parse_args(argv) |
| 68 | 68 | ||
| 69 | if not shutil.which("help2man"): | 69 | help2man = ["help2man"] |
| 70 | cipd_help2man = TOPDIR / ".cipd_bin/bin/help2man" | ||
| 71 | if cipd_help2man.exists(): | ||
| 72 | help2man = ["perl", cipd_help2man] | ||
| 73 | elif not shutil.which("help2man"): | ||
| 70 | sys.exit("Please install help2man to continue.") | 74 | sys.exit("Please install help2man to continue.") |
| 71 | 75 | ||
| 72 | # Let repo know we're generating man pages so it can avoid some dynamic | 76 | # Let repo know we're generating man pages so it can avoid some dynamic |
| @@ -81,7 +85,7 @@ def main(argv: List[str]) -> int: | |||
| 81 | version = RepoSourceVersion() | 85 | version = RepoSourceVersion() |
| 82 | cmdlist = [ | 86 | cmdlist = [ |
| 83 | [ | 87 | [ |
| 84 | "help2man", | 88 | *help2man, |
| 85 | "-N", | 89 | "-N", |
| 86 | "-n", | 90 | "-n", |
| 87 | f"repo {cmd} - manual page for repo {cmd}", | 91 | f"repo {cmd} - manual page for repo {cmd}", |
| @@ -100,7 +104,7 @@ def main(argv: List[str]) -> int: | |||
| 100 | ] | 104 | ] |
| 101 | cmdlist.append( | 105 | cmdlist.append( |
| 102 | [ | 106 | [ |
| 103 | "help2man", | 107 | *help2man, |
| 104 | "-N", | 108 | "-N", |
| 105 | "-n", | 109 | "-n", |
| 106 | "repository management tool built on top of git", | 110 | "repository management tool built on top of git", |
| @@ -157,11 +157,6 @@ def run_check_metadata(): | |||
| 157 | 157 | ||
| 158 | def run_update_manpages() -> int: | 158 | def run_update_manpages() -> int: |
| 159 | """Returns the exit code from release/update-manpages.""" | 159 | """Returns the exit code from release/update-manpages.""" |
| 160 | # Allow this to fail on CI, but not local devs. | ||
| 161 | if is_ci() and not shutil.which("help2man"): | ||
| 162 | print("update-manpages: help2man not found; skipping test") | ||
| 163 | return 0 | ||
| 164 | |||
| 165 | argv = ["--check"] | 160 | argv = ["--check"] |
| 166 | log_cmd("release/update-manpages", argv) | 161 | log_cmd("release/update-manpages", argv) |
| 167 | return subprocess.run( | 162 | return subprocess.run( |
| @@ -171,8 +166,24 @@ def run_update_manpages() -> int: | |||
| 171 | ).returncode | 166 | ).returncode |
| 172 | 167 | ||
| 173 | 168 | ||
| 169 | def cipd_bootstrap() -> None: | ||
| 170 | """Install packages via cipd if available.""" | ||
| 171 | argv = ["ensure", "-root", ".cipd_bin", "-ensure-file", "cipd_manifest.txt"] | ||
| 172 | log_cmd("cipd", argv) | ||
| 173 | try: | ||
| 174 | subprocess.run( | ||
| 175 | ["cipd"] + argv, | ||
| 176 | check=True, | ||
| 177 | cwd=ROOT_DIR, | ||
| 178 | ) | ||
| 179 | except FileNotFoundError: | ||
| 180 | # Skip if the user doesn't have cipd from depot_tools. | ||
| 181 | return | ||
| 182 | |||
| 183 | |||
| 174 | def main(argv): | 184 | def main(argv): |
| 175 | """The main entry.""" | 185 | """The main entry.""" |
| 186 | cipd_bootstrap() | ||
| 176 | checks = ( | 187 | checks = ( |
| 177 | functools.partial(run_pytest, argv), | 188 | functools.partial(run_pytest, argv), |
| 178 | functools.partial(run_pytest_py38, argv), | 189 | functools.partial(run_pytest_py38, argv), |
