diff --git a/lisa/tools/b4.py b/lisa/tools/b4.py index a97a6c8f73..5838256a53 100644 --- a/lisa/tools/b4.py +++ b/lisa/tools/b4.py @@ -1,7 +1,8 @@ import pathlib import re from lisa.executable import Tool -from lisa.operating_system import Posix +from lisa.operating_system import Debian +from lisa.tools.python import Pip from lisa.util import get_matched_str @@ -17,8 +18,12 @@ def can_install(self) -> bool: return True def _install(self) -> bool: - if isinstance(self.node.os, Posix): + if isinstance(self.node.os, Debian): self.node.os.install_packages("b4") + installed = self._check_exists() + if not installed: + pip = self.node.tools[Pip] + pip.install_packages("b4", install_to_user=True) return self._check_exists() def am(self, message_id: str, output_dir: pathlib.PurePath) -> pathlib.PurePath: