diff options
author | Yuval Peress <peress@chromium.org> | 2021-06-23 22:51:54 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-06-24 17:32:29 +0000 |
commit | 46481b71d4d9a7d0f0830794fb84900e8cfd3d7a (patch) | |
tree | 33cbb199d82de97a243d95f5186dbf2649034f57 /zephyr/zmake/zmake/zmake.py | |
parent | 0250c5d2866b425bf2f808daa82d600ef4694dd2 (diff) | |
download | chrome-ec-46481b71d4d9a7d0f0830794fb84900e8cfd3d7a.tar.gz |
zmake: Add ability to print compatible zephyr versions
This simple subcommand in zmake prints the compatible Zephyr
versions for the project. It will be used in the zephyr
ebuild to set the correct zephyr-base and modules directories.
BRANCH=none
BUG=b:190731415, b:191892353
TEST=zmake print-versions zephyr/projects/volteer/volteer
TEST=added unit tests
Change-Id: If597035f71cca1e90c9402dbdb0e5e558e1e0892
Signed-off-by: Yuval Peress <peress@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2984298
Reviewed-by: Simon Glass <sjg@chromium.org>
Commit-Queue: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'zephyr/zmake/zmake/zmake.py')
-rw-r--r-- | zephyr/zmake/zmake/zmake.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/zephyr/zmake/zmake/zmake.py b/zephyr/zmake/zmake/zmake.py index e0a2debf59..e102e865a1 100644 --- a/zephyr/zmake/zmake/zmake.py +++ b/zephyr/zmake/zmake/zmake.py @@ -192,6 +192,13 @@ class Zmake: return util.locate_zephyr_base(self.checkout, version) + def print_versions(self, project_dir): + """Print all the supported versions for a project directory""" + project = zmake.project.Project(pathlib.Path(project_dir)) + supported_versions = project.config.supported_zephyr_versions + for version in supported_versions: + print('v{}.{}'.format(*version[:2])) + def configure(self, project_dir, build_dir=None, toolchain=None, ignore_unsupported_zephyr_version=False, build_after_configure=False, test_after_configure=False, |