Metadata-Version: 2.4
Name: pytest-embedded-nuttx
Version: 2.10.0
Summary: Make pytest-embedded plugin work with NuttX.
Author-email: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>, Fu Hanxi <fuhanxi@espressif.com>
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: Pytest
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development :: Testing
License-File: LICENSE
Requires-Dist: pytest-embedded-serial~=2.10.0
Requires-Dist: pytest-embedded-serial-esp~=2.10.0 ; extra == "esp"
Requires-Dist: pytest-embedded-qemu~=2.10.0 ; extra == "qemu"
Project-URL: changelog, https://github.com/espressif/pytest-embedded/blob/main/CHANGELOG.md
Project-URL: documentation, https://docs.espressif.com/projects/pytest-embedded/en/latest/
Project-URL: homepage, https://github.com/espressif/pytest-embedded
Project-URL: repository, https://github.com/espressif/pytest-embedded
Provides-Extra: esp
Provides-Extra: qemu

### pytest-embedded-nuttx

A `pytest-embedded` service for testing Apache [NuttX](https://nuttx.apache.org/) RTOS firmware on physical targets or in QEMU.

#### Service Activation

Activate this service by passing `nuttx` to `--embedded-services`. Combine with `serial` (and optionally `esp` for Espressif chips):

```shell
pytest --embedded-services serial,esp,nuttx --app-path /path/to/nuttx/build
```

Or run NuttX tests inside QEMU:

```shell
pytest --embedded-services qemu,nuttx --app-path /path/to/nuttx/build
```

#### Extra Functionalities

- **NuttX App Detection**: Scans the NuttX build directory for bootloader, partition table, and firmware ELF/binary files.
- **NuttShell (NSH) Interaction**: Seamlessly runs commands in NuttShell via the serial port and verifies command exit codes.
- **Flashing & Reset Support**: Leverages the `esp` service to automatically flash Espressif chips and trigger hardware resets.
- **Emulation Support**: Supports running NuttX binaries inside the QEMU emulator.

#### Quick Example

```python
from pytest_embedded import Dut


def test_nuttx_shell(dut: Dut):
    # Wait for the NuttShell prompt
    dut.expect('nsh>')
    dut.write('help\n')
    dut.expect('Builtin Apps:')
```

