diff options
Diffstat (limited to 'zephyr/zmake')
-rw-r--r-- | zephyr/zmake/tests/test_print_versions.py | 38 | ||||
-rw-r--r-- | zephyr/zmake/zmake/__main__.py | 5 | ||||
-rw-r--r-- | zephyr/zmake/zmake/zmake.py | 7 |
3 files changed, 0 insertions, 50 deletions
diff --git a/zephyr/zmake/tests/test_print_versions.py b/zephyr/zmake/tests/test_print_versions.py deleted file mode 100644 index f65fa569a3..0000000000 --- a/zephyr/zmake/tests/test_print_versions.py +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 2021 The Chromium OS Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import pathlib -import tempfile - -import zmake.zmake as zm - - -def generate_zmake_yaml(dest, versions): - with open(dest, "w") as f: - f.write("board: test\n") - f.write("output-type: elf\n") - f.write("toolchain: llvm\n") - f.write("supported-zephyr-versions:\n") - for version in versions: - f.write(" - {}\n".format(version)) - - -def test_single_version(capsys): - with tempfile.TemporaryDirectory() as temp_dir_name: - generate_zmake_yaml(pathlib.Path(temp_dir_name) / "zmake.yaml", ["v2.5"]) - zm.Zmake().print_versions(temp_dir_name) - captured = capsys.readouterr().out.splitlines() - assert captured == ["v2.5"] - - -def test_multiple_versions(capsys): - with tempfile.TemporaryDirectory() as temp_dir_name: - generate_zmake_yaml( - pathlib.Path(temp_dir_name) / "zmake.yaml", ["v2.5", "v2.6"] - ) - zm.Zmake().print_versions(temp_dir_name) - captured = capsys.readouterr().out.splitlines() - # Compare the sorted lists since we don't guarantee anything about the - # print order - assert sorted(captured) == sorted(["v2.5", "v2.6"]) diff --git a/zephyr/zmake/zmake/__main__.py b/zephyr/zmake/zmake/__main__.py index 9ee8e57a2c..74845d9bbc 100644 --- a/zephyr/zmake/zmake/__main__.py +++ b/zephyr/zmake/zmake/__main__.py @@ -105,11 +105,6 @@ def main(argv=None): sub = parser.add_subparsers(dest="subcommand", help="Subcommand") sub.required = True - print_versions = sub.add_parser("print-versions") - print_versions.add_argument( - "project_dir", type=pathlib.Path, help="Path to the project to build" - ) - configure = sub.add_parser("configure") configure.add_argument( "--ignore-unsupported-zephyr-version", diff --git a/zephyr/zmake/zmake/zmake.py b/zephyr/zmake/zmake/zmake.py index baaced8ca8..45e23fd904 100644 --- a/zephyr/zmake/zmake/zmake.py +++ b/zephyr/zmake/zmake/zmake.py @@ -193,13 +193,6 @@ 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, |