summaryrefslogtreecommitdiff
path: root/zephyr
diff options
context:
space:
mode:
authorAaron Massey <aaronmassey@google.com>2023-05-02 14:48:08 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-05-02 23:35:40 +0000
commit200d74d0f3ad8e8f96c112e7416ed2414d55fa76 (patch)
treeb2c7bb1f5c61b2e8b5b151667ec6e66d0b3fd671 /zephyr
parente419c8156fae5ddf204a8483371047db69a59bf7 (diff)
downloadchrome-ec-200d74d0f3ad8e8f96c112e7416ed2414d55fa76.tar.gz
zmake: Resolve paths to TOOL_s and zephyr_base
The TOOL_PATH_{program} and zephyr base paths are not resolved which may lead to builds that are more prone to error based on working directories. Resolve TOOL_PATH_{program} and zephyr base paths. BUG=b:26805032 TEST=zmake build -a TEST=bazel build cros_firmware:build_krabby TEST=CQ Change-Id: I5eb4a20e16dfadf45089a3fa8f8901b4d2be08a9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4500243 Tested-by: Aaron Massey <aaronmassey@google.com> Auto-Submit: Aaron Massey <aaronmassey@google.com> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'zephyr')
-rw-r--r--zephyr/zmake/zmake/util.py3
-rw-r--r--zephyr/zmake/zmake/zmake.py1
2 files changed, 3 insertions, 1 deletions
diff --git a/zephyr/zmake/zmake/util.py b/zephyr/zmake/zmake/util.py
index 8679895697..6d5905e60c 100644
--- a/zephyr/zmake/zmake/util.py
+++ b/zephyr/zmake/zmake/util.py
@@ -1,6 +1,7 @@
# Copyright 2020 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+
"""Common miscellaneous utility functions for zmake."""
import os
@@ -203,5 +204,5 @@ def get_tool_path(program):
"""
path = os.environ.get(f"TOOL_PATH_{program}")
if path:
- return pathlib.Path(path)
+ return pathlib.Path(path).resolve()
return pathlib.Path(shutil.which(program))
diff --git a/zephyr/zmake/zmake/zmake.py b/zephyr/zmake/zmake/zmake.py
index 6e5f22df97..ee9c1aedae 100644
--- a/zephyr/zmake/zmake/zmake.py
+++ b/zephyr/zmake/zmake/zmake.py
@@ -179,6 +179,7 @@ class Zmake:
self.zephyr_base = (
self.checkout / "src" / "third_party" / "zephyr" / "main"
)
+ self.zephyr_base = self.zephyr_base.resolve()
if modules_dir:
self.module_paths = zmake.modules.locate_from_directory(modules_dir)