Skip to content

Commit

Permalink
Modify toolchain/autoupdate_testdata.py to use scripts/scripts_utils.…
Browse files Browse the repository at this point in the history
…py (#4227)

The current `toolchain/autoupdate_testdata.py` script assumes the
correct bazel version is already installed. This change uses
`scripts/scripts_utils.py` to fallback to `bazelisk`.
  • Loading branch information
hamphet authored Aug 19, 2024
1 parent 34ae2b0 commit 6414ca9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions toolchain/autoupdate_testdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@


def main() -> None:
bazel = str(Path(__file__).parents[1] / "scripts" / "run_bazel.py")
# Use the most recently used build mode, or `fastbuild` if missing
# `bazel-bin`.
build_mode = "fastbuild"
workspace = subprocess.check_output(
[
"bazel",
bazel,
"info",
"workspace",
"--ui_event_filters=stdout",
Expand All @@ -37,7 +38,7 @@ def main() -> None:
exit(f"Build mode not found in `bazel-bin` symlink: {link}")

argv = [
"bazel",
bazel,
"run",
"-c",
build_mode,
Expand Down

0 comments on commit 6414ca9

Please sign in to comment.