diff options
author | Jeremy Bettis <jbettis@google.com> | 2022-02-25 14:51:20 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2022-02-28 18:28:43 +0000 |
commit | 0ac172fe2bca63a31daecfe1042eac8fa180d00e (patch) | |
tree | 08b0839083cf5b58dd3d5a2dc51b29ce76b0e02a /zephyr/zmake/zmake/toolchains.py | |
parent | 8feab3528995459ad8f0b098ced4188b18db5fe8 (diff) | |
download | chrome-ec-0ac172fe2bca63a31daecfe1042eac8fa180d00e.tar.gz |
zmake: Make cros lint happy for toolchains
Made changes for pylint.
BRANCH=None
BUG=None
TEST=black . && ./run_tests.sh && \
cros lint tests/test_toolchains.py zmake/toolchains.py
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Change-Id: I60eff964fdb619a5688c439e101f8f28c239585d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3491407
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'zephyr/zmake/zmake/toolchains.py')
-rw-r--r-- | zephyr/zmake/zmake/toolchains.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/zephyr/zmake/zmake/toolchains.py b/zephyr/zmake/zmake/toolchains.py index 671c539c0f..13ee30de08 100644 --- a/zephyr/zmake/zmake/toolchains.py +++ b/zephyr/zmake/zmake/toolchains.py @@ -20,7 +20,7 @@ class GenericToolchain: self.name = name self.modules = modules or {} - def probe(self): + def probe(self): # pylint:disable=no-self-use """Probe if the toolchain is available on the system.""" # Since the toolchain is not known to zmake, we have no way to # know if it's installed. Simply return False to indicate not @@ -43,6 +43,8 @@ class GenericToolchain: class CorebootSdkToolchain(GenericToolchain): + """Coreboot SDK toolchain installed in default location.""" + def probe(self): # For now, we always assume it's at /opt/coreboot-sdk, since # that's where it's installed in the chroot. We may want to @@ -63,6 +65,12 @@ class CorebootSdkToolchain(GenericToolchain): class ZephyrToolchain(GenericToolchain): + """Zephyr SDK toolchain. + + Either set the environment var ZEPHYR_SDK_INSTALL_DIR, or install + the SDK in one of the common known locations. + """ + def __init__(self, *args, **kwargs): self.zephyr_sdk_install_dir = self._find_zephyr_sdk() super().__init__(*args, **kwargs) @@ -122,6 +130,8 @@ class ZephyrToolchain(GenericToolchain): class LlvmToolchain(GenericToolchain): + """LLVM toolchain as used in the chroot.""" + def probe(self): # TODO: differentiate chroot llvm path vs. something more # generic? @@ -141,6 +151,8 @@ class LlvmToolchain(GenericToolchain): class HostToolchain(GenericToolchain): + """GCC toolchain found in the PATH.""" + def probe(self): # "host" toolchain for Zephyr means GCC. for search_path in os.getenv("PATH", "/usr/bin").split(":"): |