Skip to content

Commit

Permalink
Modify toolchain/autoupdate_testdata.py to use scripts/scripts_utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
hamphet committed Aug 18, 2024
1 parent 64204d9 commit 657eda9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Empty file added scripts/__init__.py
Empty file.
11 changes: 9 additions & 2 deletions toolchain/autoupdate_testdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,23 @@
import re
import subprocess
import sys
import os
from pathlib import Path

directory = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
sys.path.append(os.path.join(directory))
import scripts.scripts_utils # noqa: E402


def main() -> None:
scripts.scripts_utils.chdir_repo_root()
bazel = scripts.scripts_utils.locate_bazel()
# 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 +44,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 657eda9

Please sign in to comment.