Skip to content

Commit fb2eae4

Browse files
committed
Improve log info for binary files on NuttX App. Documentation updates.
1 parent 3f5ed7b commit fb2eae4

File tree

6 files changed

+13
-28
lines changed

6 files changed

+13
-28
lines changed

docs/concepts/services.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ graph LR
1818
1919
pytest-embedded-nuttx --> pytest-embedded-serial
2020
pytest-embedded-nuttx -->|optional, support test on espressif chips| pytest-embedded-serial-esp
21+
pytest-embedded-nuttx -->|optional, support test on qemu| pytest-embedded-qemu
2122
2223
pytest-embedded-serial-esp --> pytest-embedded-serial
2324

pytest-embedded-nuttx/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ Pytest embedded service for the NuttX project, compatible with Espressif devices
44

55
Using the 'nuttx' service alongside 'serial' enables reading from and writing to the serial port, taking NuttShell into account when running programs and retrieving return codes.
66

7-
The `nuttx` service provides basic serial communication and testing. Adding the 'esp' service enables further capabilities for Espressif devices, including flashing and device rebooting.
7+
The `nuttx` service provides basic serial communication and testing. Adding the 'esp' service enables further capabilities for Espressif devices, including flashing and device rebooting. Alternatively, using the 'qemu' service is also supported with NuttX
8+
binaries.
89

910
Additional Features:
1011

1112
- `app`: Scans the NuttX binary directory to locate firmware and bootloader files.
1213
- `serial`: Parses binary information and flashes the board. Requires the 'esp' service.
13-
- `dut`: Sends commands to the device through the serial port. Requires the 'serial' service or 'esp' service for Espressif devices.
14+
- `dut`: Sends commands to the device through the serial port. Requires the 'serial' service, 'esp' service for Espressif devices or 'qemu' service for emulation.

pytest-embedded-nuttx/pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ dependencies = [
3939
esp = [
4040
"pytest-embedded-serial-esp~=1.12.0",
4141
]
42+
qemu = [
43+
"pytest-embedded-qemu~=1.12.0",
44+
]
4245

4346
[project.urls]
4447
homepage = "https://github.com/espressif/pytest-embedded"

pytest-embedded-nuttx/pytest_embedded_nuttx/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
from pytest_embedded.utils import lazy_load
66

7-
from .app import NuttxApp
87
from .dut import NuttxDut, NuttxEspDut, NuttxQemuDut, NuttxSerialDut
98

109
__getattr__ = lazy_load(

pytest-embedded-nuttx/pytest_embedded_nuttx/app.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,13 @@ def _get_bin_files(self) -> list:
5353
if 'nuttx' in file_name:
5454
if 'merged' in file_name:
5555
merge_file = file_path
56+
logging.info('Merge file: %s', merge_file.as_posix())
5657
else:
5758
app_file = file_path
59+
logging.info('App file: %s', app_file.as_posix())
5860
if 'mcuboot-' in file_name:
5961
bootloader_file = file_path
62+
logging.info('Bootloader file: %s', bootloader_file.as_posix())
6063

6164
if not app_file:
6265
logging.error('App file not found: %s', app_file)

pytest-embedded-nuttx/pytest_embedded_nuttx/dut.py

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,7 @@ def __init__(
107107
super().__init__(**kwargs)
108108

109109
def reset(self) -> None:
110-
"""Reset the DUT by toggling the DTR line.
111-
112-
Args:
113-
None.
114-
115-
Returns:
116-
None.
117-
"""
110+
"""Reset the DUT by toggling the DTR line."""
118111
self.serial.proc.dtr = False
119112
sleep(0.2)
120113
self.serial.proc.dtr = True
@@ -135,14 +128,7 @@ def __init__(
135128
super().__init__(qemu=qemu, **kwargs)
136129

137130
def reset(self) -> None:
138-
"""Hard reset the DUT.
139-
140-
Args:
141-
None.
142-
143-
Returns:
144-
None.
145-
"""
131+
"""Hard reset the DUT."""
146132
self.hard_reset()
147133

148134

@@ -162,13 +148,5 @@ def __init__(
162148
super().__init__(app=app, **kwargs)
163149

164150
def reset(self) -> None:
165-
"""
166-
Resets the board.
167-
168-
Args:
169-
None.
170-
171-
Returns:
172-
None.
173-
"""
151+
"""Resets the board."""
174152
self.serial.hard_reset()

0 commit comments

Comments
 (0)