summaryrefslogtreecommitdiff
path: root/zephyr/zmake/zmake/zmake.py
diff options
context:
space:
mode:
authorJeremy Bettis <jbettis@google.com>2021-03-17 16:46:34 -0600
committerCommit Bot <commit-bot@chromium.org>2021-03-18 21:39:04 +0000
commit30235cdfc9fba58a0bf67caa19f06caeef79a4db (patch)
tree0eb1e0db99e94eb758d99550a88c4a5b58b45861 /zephyr/zmake/zmake/zmake.py
parentde8f335e0a4da636fce2ec54099212c5f1689aa7 (diff)
downloadchrome-ec-30235cdfc9fba58a0bf67caa19f06caeef79a4db.tar.gz
zephyr: Add --coverage option to zmake configure
zmake configure --coverage will add CONFIG_COVERAGE to the active kconfigs. BUG=b:183007888 TEST=zmake configure --coverage --test -B \ build/ztest-coverage/accel_cal zephyr/test/accel_cal BRANCH=none Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I24465a29c9930762b81319f11fcf834e33d938cc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2770507 Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'zephyr/zmake/zmake/zmake.py')
-rw-r--r--zephyr/zmake/zmake/zmake.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/zephyr/zmake/zmake/zmake.py b/zephyr/zmake/zmake/zmake.py
index 4dbc2fed61..0d47502946 100644
--- a/zephyr/zmake/zmake/zmake.py
+++ b/zephyr/zmake/zmake/zmake.py
@@ -95,7 +95,7 @@ class Zmake:
def configure(self, project_dir, build_dir=None,
toolchain=None, ignore_unsupported_zephyr_version=False,
build_after_configure=False, test_after_configure=False,
- bringup=False):
+ bringup=False, coverage=False):
"""Set up a build directory to later be built by "zmake build"."""
project = zmake.project.Project(project_dir)
supported_versions = project.config.supported_zephyr_versions
@@ -148,6 +148,9 @@ class Zmake:
if bringup:
base_config |= zmake.build_config.BuildConfig(
kconfig_defs={'CONFIG_PLATFORM_EC_BRINGUP': 'y'})
+ if coverage:
+ base_config |= zmake.build_config.BuildConfig(
+ kconfig_defs={'CONFIG_COVERAGE': 'y'})
if not build_dir.exists():
build_dir = build_dir.mkdir()