Skip to content
Merged
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
8 changes: 8 additions & 0 deletions pytest-embedded-espemu/pytest_embedded_espemu/dut.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
class EspEmuDut(Dut):
"""
esp-emu dut class

Attributes:
target (str): target chip type, taken from the app
"""

def __init__(
Expand All @@ -19,6 +22,11 @@ def __init__(

super().__init__(**kwargs)

# `IdfDut` exposes this for serial runs, and test fixtures use it to
# select target specific behavior. `EspEmuApp` is an `IdfApp`, so the
# target is known here as well; keep it optional for other app classes.
self.target: str | None = getattr(self.app, 'target', None)

self._hard_reset_func = self.espemu._hard_reset

def write(self, s: AnyStr) -> None:
Expand Down
8 changes: 8 additions & 0 deletions pytest-embedded-qemu/pytest_embedded_qemu/dut.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
class QemuDut(Dut):
"""
QEMU dut class

Attributes:
target (str): target chip type, taken from the app
"""

def __init__(
Expand All @@ -19,6 +22,11 @@ def __init__(

super().__init__(**kwargs)

# `IdfDut` exposes this for serial runs, and test fixtures use it to
# select target specific behavior. `QemuApp` is an `IdfApp`, so the
# target is known here as well; keep it optional for other app classes.
self.target: str | None = getattr(self.app, 'target', None)

self._hard_reset_func = self.qemu._hard_reset

def write(self, s: AnyStr) -> None:
Expand Down
Loading