summaryrefslogtreecommitdiff
path: root/zephyr/zmake/tests/test_zmake.py
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2021-08-18 14:10:56 -0600
committerCommit Bot <commit-bot@chromium.org>2021-08-19 21:04:09 +0000
commit10809eb023d475681b45863e68d906fae4667eda (patch)
tree1e2b780bc7b4da301bb2ac3b50ffdf34916f9c7f /zephyr/zmake/tests/test_zmake.py
parentd03b7701386d9a48f445d1b3540a71e3d58695ba (diff)
downloadchrome-ec-10809eb023d475681b45863e68d906fae4667eda.tar.gz
zephyr: pull in the version string from zmake
Zmake computes a version string and stores it in FRID/FWID, but this was never plumbed all the way out into the version functionality in the OS, which was reporting the version generated by util/getversion.sh. Add a mechanism to generate the version header from zmake and replace the getversion.sh generation with that. BUG=b:184832251 BRANCH=none TEST=provided unit tests TEST=get this version string on posix-ec: posix-ec_v2.6.73347-cmsis:c3bd20,ec:c814a9,hal_stm32:f8ff8d,os:efe095 2021-08-18 14:10:18 jrosenth@germania Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: Idec1c5f8b5f014126706e4fdc1f3d158edf40a63 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3104625 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'zephyr/zmake/tests/test_zmake.py')
-rw-r--r--zephyr/zmake/tests/test_zmake.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/zephyr/zmake/tests/test_zmake.py b/zephyr/zmake/tests/test_zmake.py
index a5c132dbaa..f7978764f8 100644
--- a/zephyr/zmake/tests/test_zmake.py
+++ b/zephyr/zmake/tests/test_zmake.py
@@ -141,7 +141,8 @@ EXTRAVERSION =
pathlib.Path(tmpname), build_dir=pathlib.Path("build")
)
else:
- zmk.build(pathlib.Path(tmpname))
+ with patch("zmake.version.write_version_header", autospec=True):
+ zmk.build(pathlib.Path(tmpname))
multiproc.wait_for_log_end()
recs = [rec.getMessage() for rec in cap.records]