From 30235cdfc9fba58a0bf67caa19f06caeef79a4db Mon Sep 17 00:00:00 2001 From: Jeremy Bettis Date: Wed, 17 Mar 2021 16:46:34 -0600 Subject: 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 Change-Id: I24465a29c9930762b81319f11fcf834e33d938cc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2770507 Tested-by: Jeremy Bettis Reviewed-by: Simon Glass Reviewed-by: Jack Rosenthal Commit-Queue: Jeremy Bettis --- zephyr/zmake/zmake/zmake.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'zephyr/zmake/zmake/zmake.py') 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() -- cgit v1.2.1