diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2023-01-12 14:49:08 -0700 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-01-17 18:35:12 +0000 |
commit | 92e23477494e6815a90bded7386f8e1ad138f87d (patch) | |
tree | aca833ceb66b05fd9bbb7f7b7e105a96e2bb1eed /zephyr/zmake/zmake/zmake.py | |
parent | 435ced35da433c5eccf33b30711d106e6b3e7307 (diff) | |
download | chrome-ec-92e23477494e6815a90bded7386f8e1ad138f87d.tar.gz |
zephyr: zmake: Allow tool path customization
Allow callers of zmake to customize the precise execution of external
tools by specifying TOOL_PATH_${program} environment variables. This
enables bazel to locate tools where it likes, and we can just tell
zmake where they are.
BUG=b:259306777
BRANCH=none
TEST=tests pass
Change-Id: I58b153fbb890766f7ac7e9f590aa098a93576cb4
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4166335
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Reviewed-by: Aaron Massey <aaronmassey@google.com>
Diffstat (limited to 'zephyr/zmake/zmake/zmake.py')
-rw-r--r-- | zephyr/zmake/zmake/zmake.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/zephyr/zmake/zmake/zmake.py b/zephyr/zmake/zmake/zmake.py index 1c1dcfb36c..6454049d53 100644 --- a/zephyr/zmake/zmake/zmake.py +++ b/zephyr/zmake/zmake/zmake.py @@ -761,7 +761,11 @@ class Zmake: """Builds one sub-dir of a configured project (build-ro, etc).""" with self.jobserver.get_job(): - cmd = ["/usr/bin/ninja", "-C", dirs[build_name].as_posix()] + cmd = [ + util.get_tool_path("ninja"), + "-C", + dirs[build_name].as_posix(), + ] if self.goma: # Go nuts ninja, goma does the heavy lifting! cmd.append("-j1024") @@ -827,7 +831,7 @@ class Zmake: else: self.logger.info("Running lcov on %s.", build_dir) cmd = [ - "/usr/bin/lcov", + util.get_tool_path("lcov"), "--gcov-tool", gcov, "-q", @@ -879,7 +883,7 @@ class Zmake: # Merge info files into a single lcov.info self.logger.info("Merging coverage data into %s.", output_file) cmd = [ - "/usr/bin/lcov", + util.get_tool_path("lcov"), "-o", output_file, "--rc", |