Skip to content

Commit

Permalink
trunner: add sparcv8leon3-generic target support
Browse files Browse the repository at this point in the history
JIRA: CI-474
  • Loading branch information
maska989 committed Sep 18, 2024
1 parent 3a22101 commit 24427c5
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 6 deletions.
10 changes: 5 additions & 5 deletions psh/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ test:
- name: pshlogin
harness: test-pshlogin.py
targets:
exclude: [armv7m7-imxrt106x-evk, armv7m7-imxrt117x-evk, armv7m4-stm32l4x6-nucleo]
exclude: [armv7m7-imxrt106x-evk, armv7m7-imxrt117x-evk, armv7m4-stm32l4x6-nucleo, sparcv8leon3-generic-qemu]

- name: echo
harness: test-echo.py
Expand All @@ -36,7 +36,7 @@ test:
- name: cat-shells
harness: test-cat-shells.py
targets:
exclude: [armv7m7-imxrt106x-evk, armv7m7-imxrt117x-evk, armv7m4-stm32l4x6-nucleo]
exclude: [armv7m7-imxrt106x-evk, armv7m7-imxrt117x-evk, armv7m4-stm32l4x6-nucleo, sparcv8leon3-generic-qemu]

- name: kill
harness: test-kill.py
Expand All @@ -50,21 +50,21 @@ test:
- name: touch-rootfs
harness: test-touch-rootfs.py
targets:
exclude: [armv7m7-imxrt106x-evk, armv7m7-imxrt117x-evk, armv7m4-stm32l4x6-nucleo]
exclude: [armv7m7-imxrt106x-evk, armv7m7-imxrt117x-evk, armv7m4-stm32l4x6-nucleo, sparcv8leon3-generic-qemu]

- name: ls
harness: test-ls.py

- name: ls-rootfs
harness: test-ls-rootfs.py
targets:
exclude: [armv7m7-imxrt106x-evk, armv7m7-imxrt117x-evk, armv7m4-stm32l4x6-nucleo]
exclude: [armv7m7-imxrt106x-evk, armv7m7-imxrt117x-evk, armv7m4-stm32l4x6-nucleo, sparcv8leon3-generic-qemu]

- name: runfile
harness: test-runfile.py
targets:
# runfile applet is not intended for non-rootfs targets
exclude: [armv7m7-imxrt106x-evk, armv7m7-imxrt117x-evk, armv7m4-stm32l4x6-nucleo]
exclude: [armv7m7-imxrt106x-evk, armv7m7-imxrt117x-evk, armv7m4-stm32l4x6-nucleo, sparcv8leon3-generic-qemu]

- name: history
harness: test-history.py
Expand Down
2 changes: 2 additions & 0 deletions runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
HostPCGenericTarget,
IA32GenericQemuTarget,
RISCV64GenericQemuTarget,
SPARCV8Leon3GenericQemuTarget,
ARMv7A9Zynq7000QemuTarget,
STM32L4x6Target,
Zynq7000ZedboardTarget,
Expand Down Expand Up @@ -236,6 +237,7 @@ def resolve_targets_and_hosts() -> Tuple[Dict[str, Type[TargetBase]], Dict[str,
IMXRT117xEvkTarget,
Zynq7000ZedboardTarget,
IMX6ULLEvkTarget,
SPARCV8Leon3GenericQemuTarget,
]

hosts: List[Type[Host]] = [EmulatorHost, RpiHost]
Expand Down
2 changes: 2 additions & 0 deletions trunner/target/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
IA32GenericQemuTarget,
RISCV64GenericQemuTarget,
ARMv7A9Zynq7000QemuTarget,
SPARCV8Leon3GenericQemuTarget,
)
from .host import HostPCGenericTarget

Expand All @@ -16,6 +17,7 @@
"ARMv7M7Target",
"IA32GenericQemuTarget",
"RISCV64GenericQemuTarget",
"SPARCV8Leon3GenericQemuTarget",
"ARMv7A9Zynq7000QemuTarget",
"HostPCGenericTarget",
"STM32L4x6Target",
Expand Down
20 changes: 19 additions & 1 deletion trunner/target/emulated.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@

from trunner.ctx import TestContext
from trunner.dut import QemuDut
from trunner.harness import HarnessBuilder, RebooterHarness, ShellHarness, TestStartRunningHarness
from trunner.harness import (
HarnessBuilder,
RebooterHarness,
ShellHarness,
TestStartRunningHarness,
)
from trunner.types import TestOptions, TestResult
from .base import TargetBase

Expand Down Expand Up @@ -80,9 +85,22 @@ def from_context(cls, _: TestContext):
return cls()


class SPARCV8Leon3GenericQemuTarget(QemuTarget):
name = "sparcv8leon3-generic-qemu"
rootfs = False

def __init__(self):
super().__init__("sparcv8leon3-generic-qemu-test.sh")

@classmethod
def from_context(cls, _: TestContext):
return cls()


class ARMv7A9Zynq7000QemuTarget(QemuTarget):
name = "armv7a9-zynq7000-qemu"
rootfs = True
experimental = True
shell_prompt = "root@?:~ # "

def __init__(self):
Expand Down

0 comments on commit 24427c5

Please sign in to comment.