summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorKeith Short <keithshort@chromium.org>2023-04-14 11:55:48 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-04-17 16:26:47 +0000
commit1ee9895f2afd8b65810e8391d5039490454d7420 (patch)
treecb8961177e59a98d517635611c7304e4874369e3 /util
parent2b5991763119d997f3d92a0b1aa503c174623a22 (diff)
downloadchrome-ec-1ee9895f2afd8b65810e8391d5039490454d7420.tar.gz
zephyr: twister: Allow override of zephyr_base
Allow the user to override the default zephyr_base by setting the ZEPHYR_BASE environment variable. BUG=none BRANCH=none TEST=./twister TEST=ZEPHYR_BASE=~/zephyrproject/zephyr ./twister Change-Id: I09e19c5d1f1937c443832bbd100d92b9beba9141 Signed-off-by: Keith Short <keithshort@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4426807 Reviewed-by: Al Semjonovs <asemjonovs@google.com>
Diffstat (limited to 'util')
-rwxr-xr-xutil/twister_launcher.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/util/twister_launcher.py b/util/twister_launcher.py
index eb7133da30..4cd35a6ef7 100755
--- a/util/twister_launcher.py
+++ b/util/twister_launcher.py
@@ -1,5 +1,4 @@
#!/usr/bin/env vpython3
-
# Copyright 2022 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -121,7 +120,12 @@ def find_paths():
if cros_checkout:
ec_base = cros_checkout / "src" / "platform" / "ec"
- zephyr_base = cros_checkout / "src" / "third_party" / "zephyr" / "main"
+ try:
+ zephyr_base = Path(os.environ["ZEPHYR_BASE"]).resolve()
+ except KeyError as err:
+ zephyr_base = (
+ cros_checkout / "src" / "third_party" / "zephyr" / "main"
+ )
zephyr_modules_dir = cros_checkout / "src" / "third_party" / "zephyr"
else:
try: