Skip to content

Commit

Permalink
kseftests: override KSELFTESTROOT
Browse files Browse the repository at this point in the history
When passign another KSELFTESTROOT path than the default one, kirk
complains that it can't find the KSELFTESTROOT. Because it still assumes
the root is the default one '/opt/linux/tools/testing/selftests'.

Set the new KSELFTESTROOT with '--env KSELFTESTROOT=/path/to/the/new/kselftest_root'
and update sef.env also update self._root with this new path.

Signed-off-by: Anders Roxell <[email protected]>
  • Loading branch information
roxell committed Jul 8, 2024
1 parent 874a070 commit 21bbb4e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions libkirk/kselftests.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ def config_help(self) -> dict:

def setup(self, **kwargs: dict) -> None:
self._root = kwargs.get("root", "/opt/linux/tools/testing/selftests")
self._env = {
"KSELFTESTROOT": self._root,
}

env = kwargs.get("env", None)
if env:
self._env.update(env)

if self._env["KSELFTESTROOT"]:
self._root = self._env["KSELFTESTROOT"]

async def _get_cgroup(self, sut: SUT) -> Suite:
"""
Expand Down

0 comments on commit 21bbb4e

Please sign in to comment.