From 2f114c508fc35084d7a9dfdee92be29a71dc53da Mon Sep 17 00:00:00 2001 From: Maska989 Date: Wed, 28 Aug 2024 15:48:07 +0200 Subject: [PATCH] trunner: add sparcv8leon3-generic target support JIRA: CI-474 --- Makefile.sparcv8leon3 | 2 ++ psh/test.yaml | 13 ++++++++----- runner.py | 2 ++ trunner/target/__init__.py | 2 ++ trunner/target/emulated.py | 13 +++++++++++++ 5 files changed, 27 insertions(+), 5 deletions(-) diff --git a/Makefile.sparcv8leon3 b/Makefile.sparcv8leon3 index 98114b591..7e50dd07b 100644 --- a/Makefile.sparcv8leon3 +++ b/Makefile.sparcv8leon3 @@ -1 +1,3 @@ +ifneq ($(TARGET), sparcv8leon3-generic-qemu) DEFAULT_COMPONENTS += test-grlib-multi +endif \ No newline at end of file diff --git a/psh/test.yaml b/psh/test.yaml index 9c0254e92..cd4b08864 100644 --- a/psh/test.yaml +++ b/psh/test.yaml @@ -1,4 +1,7 @@ test: + targets: + value: [sparcv8leon3-generic-qemu] + tests: - name: gibber harness: test-gibber.py @@ -13,7 +16,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 @@ -36,7 +39,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 @@ -50,7 +53,7 @@ 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 @@ -58,13 +61,13 @@ test: - 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 diff --git a/runner.py b/runner.py index 731feed33..8386a8841 100755 --- a/runner.py +++ b/runner.py @@ -18,6 +18,7 @@ HostPCGenericTarget, IA32GenericQemuTarget, RISCV64GenericQemuTarget, + SPARCV8Leon3GenericQemuTarget, ARMv7A9Zynq7000QemuTarget, STM32L4x6Target, Zynq7000ZedboardTarget, @@ -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] diff --git a/trunner/target/__init__.py b/trunner/target/__init__.py index 096c953d3..a757d1a03 100644 --- a/trunner/target/__init__.py +++ b/trunner/target/__init__.py @@ -7,6 +7,7 @@ IA32GenericQemuTarget, RISCV64GenericQemuTarget, ARMv7A9Zynq7000QemuTarget, + SPARCV8Leon3GenericQemuTarget, ) from .host import HostPCGenericTarget @@ -16,6 +17,7 @@ "ARMv7M7Target", "IA32GenericQemuTarget", "RISCV64GenericQemuTarget", + "SPARCV8Leon3GenericQemuTarget", "ARMv7A9Zynq7000QemuTarget", "HostPCGenericTarget", "STM32L4x6Target", diff --git a/trunner/target/emulated.py b/trunner/target/emulated.py index 25c927178..3d371b4e6 100644 --- a/trunner/target/emulated.py +++ b/trunner/target/emulated.py @@ -80,6 +80,19 @@ def from_context(cls, _: TestContext): return cls() +class SPARCV8Leon3GenericQemuTarget(QemuTarget): + name = "sparcv8leon3-generic-qemu" + rootfs = False + experimental = True + + 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