Skip to content

Commit

Permalink
Read kselftests cgroup shell tests
Browse files Browse the repository at this point in the history
  • Loading branch information
acerv committed Jun 27, 2023
1 parent d22e53e commit 3a9c044
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions libkirk/kselftests.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,17 @@ async def _get_cgroup(self, sut: SUT) -> Suite:
raise KirkException(
f"cgroup folder is not available: {cgroup_dir}")

ret = await sut.run_command(
"basename -s .c -- test_*.c",
cwd=cgroup_dir)
if ret["returncode"] != 0 or not ret["stdout"]:
raise KirkException("Can't read cgroup tests")
names = []
for ext in ("c", "sh"):
ret = await sut.run_command(
f"basename -s .c -- test_*.{ext}",
cwd=cgroup_dir)
if ret["returncode"] != 0 or not ret["stdout"]:
raise KirkException("Can't read cgroup tests")

tests = ret["stdout"].split('\n')
names.extend(tests)

names = ret["stdout"].split('\n')
tests_obj = []

for name in names:
Expand Down

0 comments on commit 3a9c044

Please sign in to comment.