summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Bettis <jbettis@google.com>2021-08-23 16:37:58 -0600
committerCommit Bot <commit-bot@chromium.org>2021-08-24 20:58:00 +0000
commit27788b0e3526aa9aafa4992abe417aafa9d9987b (patch)
tree46dcb9c42a5befac3e640ccf4e5c5efec6bd9b0e
parenta8e156e487373aff35c2a8869442745a1121e128 (diff)
downloadchrome-ec-27788b0e3526aa9aafa4992abe417aafa9d9987b.tar.gz
zmake: Fix zmake coverage
zmake build was changed to generate ec_version.h, update zmake coverage to do the same. BUG=None TEST=zmake coverage BRANCH=none Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: Ib65f862843617a3ee64d0e68b2b9e204afc85787 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3115429 Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
-rw-r--r--zephyr/zmake/zmake/zmake.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/zephyr/zmake/zmake/zmake.py b/zephyr/zmake/zmake/zmake.py
index 1288b2fe15..7c0d46550f 100644
--- a/zephyr/zmake/zmake/zmake.py
+++ b/zephyr/zmake/zmake/zmake.py
@@ -584,6 +584,21 @@ class Zmake:
if rv:
return rv
+ # Compute the version string.
+ version_string = zmake.version.get_version_string(
+ project,
+ build_dir / "zephyr_base",
+ zmake.modules.locate_from_directory(build_dir / "modules"),
+ )
+
+ # The version header needs to generated during the build phase
+ # instead of configure, as the tree may have changed since
+ # configure was run.
+ zmake.version.write_version_header(
+ version_string,
+ build_dir / "include" / "ec_version.h",
+ )
+
# Use ninja to compile the all.libraries target.
build_project = zmake.project.Project(build_dir / "project")