mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 19:50:14 +01:00
Modify toolchain/autoupdate_testdata.py to use scripts/scripts_utils.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`.
This commit is contained in:
@@ -15,12 +15,13 @@ from pathlib import Path
|
||||
|
||||
|
||||
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",
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user