Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trunner: add sparcv8leon3-generic-qemu target support #372

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Makefile.sparcv8leon3
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
ifneq ($(TARGET), sparcv8leon3-generic-qemu)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's the simplest solution possible here, but let's leave a comment that we don't want to build this test for qemu architecture and why (please ask an author for a reason).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could also do this in a separate commit and be connected to this issue: phoenix-rtos/phoenix-rtos-project#1182

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it should be done in the separate commit for sure

DEFAULT_COMPONENTS += test-grlib-multi
endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no newline at the end of file

13 changes: 8 additions & 5 deletions psh/test.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
test:
targets:
value: [sparcv8leon3-generic-qemu]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should include target, not set sparcv8leon3-generic-qemu as only target, also comment should be place why it is done.

Suggested change
value: [sparcv8leon3-generic-qemu]
include: [sparcv8leon3-generic-qemu]


tests:
- name: gibber
harness: test-gibber.py
Expand All @@ -13,7 +16,7 @@ test:
- name: pshlogin
harness: test-pshlogin.py
targets:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the beginning of yaml should be smth like:

test:
    targets:
      #TODO: remove when sparcv8leon3-generic-qemu target will stop being experimental
      include: [sparcv8leon3-generic-qemu]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not done

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 +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
Expand All @@ -50,21 +53,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
13 changes: 13 additions & 0 deletions trunner/target/emulated.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading