NTFC
NuttX Test Framework for Community.
What is NTFC?
NTFC is a Python-based testing framework designed to automate the testing of NuttX RTOS on various platforms. It provides a structured way to develop, discover, and execute test cases against NuttX configurations.
Purpose
NTFC enables developers to:
-
Validate NuttX functionality across different configurations and hardware targets
-
Automate test execution on NuttX devices for real hardware and host-based target
-
Detect system failures including OS crashes and busy loop conditions
-
Dynamically discover applicable tests based on the NuttX image configuration
-
Standardize testing workflows using pytest, a widely-adopted Python testing framework
How It Works
NTFC acts as a bridge between pytest and NuttX devices/simulators:
-
Loads a NuttX YAML configuration specifying the target device and build parameters
-
Builds or prepares the NuttX image (optionally flashing to hardware)
-
Discovers which test cases are applicable based on the NuttX configuration and ELF symbols
-
Executes tests by sending NSH commands to the running NuttX instance
-
Validates command output and monitors for system failures
This tool requires at least Python 3.10. Not tested with earlier versions of Python.
Features
-
NuttX simulator, QEMU, Renode and devices with serial port are supported
-
Run the command from NSH and compare with the expected output
-
OS crash detection and busy loop detection
-
Detection of supported test cases for a given NuttX image based on the configuration and image ELF file
Installation
NTFC can be installed from source using pip. PyPI package release is planned for future versions.
git clone <PATH_TO_NTFC_REPO>
cd ntfc
pip install -e .
NTFC requires Python 3.10 or later (not tested with older Python).
Optional dependencies
- pytest-html - for HTML test reports
- pytest-json - for JSON test reports
Documentation
Documentation is available in the Documentation/ directory. You can build
the HTML documentation using Sphinx:
pip install -r Documentation/requirements.txt
cd Documentation
make html
The generated HTML will be available in Documentation/_build/html/index.html.
See Documentation/quickstart for a quick start guide and Documentation/usage for detailed usage information.
Preparing the Image for Testing
CONFIG_DEBUG_SYMBOLSis required for automatic command detectionCONFIG_DEBUG_FEATURES=yandCONFIG_DEBUG_ASSERTIONS=yare recommended for better error detection
Test Cases
Currently available test case repositories:
- https://github.com/apache/nuttx-ntfc-testing - NuttX RTOS functionality tests
For guidance on writing your own test cases, see Documentation/writing-test-cases.
Contributing
To get started with developing NTFC, see CONTRIBUTING.md.
The roadmpa for the project can be found in ROADMAP.
Metadata
Release files for ntfc 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ntfc-0.0.4.tar.gz | 148.0 kB | Without provenance | Details for ntfc-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ntfc-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for ntfc-0.0.4-py3-none-any.whl |
Total release size: 337.3 kB
Release files / ntfc-0.0.4.tar.gz
| Download URL | ntfc-0.0.4.tar.gz |
|---|---|
| Size | 148.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
304501b87ff4463c044f5ee43545e205639718cb52b77a5cc88f21fb658bfe64
|
|
BLAKE2b-256 checksum How to use checksums |
4af5101c7267c86b88d34457634ae0d223e8ce43f80faf0bb19e8dc91743ac4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.10
|
Release files / ntfc-0.0.4-py3-none-any.whl
| Download URL | ntfc-0.0.4-py3-none-any.whl |
|---|---|
| Size | 189.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
996539f6222f3a8bb64d9040af1e74344e769ce777b4c469a9e3837b38f559cc
|
|
BLAKE2b-256 checksum How to use checksums |
fb87a14d589bd418e1de160dc49cc4114a26e0314a24a43ae6c6fdb78346ceaa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.10
|
Security for ntfc 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.