From 322e27a0204be0c694375a45b9001c8f8961d0f3 Mon Sep 17 00:00:00 2001 From: Maska989 Date: Fri, 11 Oct 2024 13:12:01 +0200 Subject: [PATCH 1/2] trunner: add sparcv8leon3-generic-qemu target support JIRA: CI-474 --- psh/test.yaml | 13 ++++++++----- runner.py | 2 ++ trunner/target/__init__.py | 2 ++ trunner/target/emulated.py | 13 +++++++++++++ 4 files changed, 25 insertions(+), 5 deletions(-) diff --git a/psh/test.yaml b/psh/test.yaml index f4c942a3e..5d7934716 100644 --- a/psh/test.yaml +++ b/psh/test.yaml @@ -1,4 +1,7 @@ test: + targets: + include: [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 From 3ac9225131232195622fa433e5676e4b37993eb9 Mon Sep 17 00:00:00 2001 From: Maska989 Date: Fri, 11 Oct 2024 13:13:28 +0200 Subject: [PATCH 2/2] sparcv8leon3: prevent from building test-grlib-multi on qemu target This test is not intended to be built on this particular target. JIRA: CI-474 --- Makefile.sparcv8leon3 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile.sparcv8leon3 b/Makefile.sparcv8leon3 index 98114b591..704dcf4c3 100644 --- a/Makefile.sparcv8leon3 +++ b/Makefile.sparcv8leon3 @@ -1 +1,3 @@ +ifneq ($(TARGET), sparcv8leon3-generic-qemu) DEFAULT_COMPONENTS += test-grlib-multi +endif