Skip to main content

NTFC for NuttX

Project description

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:

  1. Loads a NuttX YAML configuration specifying the target device and build parameters

  2. Builds or prepares the NuttX image (optionally flashing to hardware)

  3. Discovers which test cases are applicable based on the NuttX configuration and ELF symbols

  4. Executes tests by sending NSH commands to the running NuttX instance

  5. 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 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

Usage

See docs/quickstart for a quick start guide and docs/usage for detailed usage information.

Preparing the Image for Testing

  • CONFIG_DEBUG_SYMBOLS is required for automatic command detection
  • CONFIG_DEBUG_FEATURES=y and CONFIG_DEBUG_ASSERTIONS=y are recommended for better error detection

Test Cases

Currently available test case repositories:

For guidance on writing your own test cases, see docs/writing-test-cases.

Contributing

To get started with developing NTFC, see CONTRIBUTING.md.

The roadmpa for the project can be found in ROADMAP.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ntfc-0.0.1.tar.gz (44.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ntfc-0.0.1-py3-none-any.whl (69.8 kB view details)

Uploaded Python 3

File details

Details for the file ntfc-0.0.1.tar.gz.

File metadata

  • Download URL: ntfc-0.0.1.tar.gz
  • Upload date:
  • Size: 44.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for ntfc-0.0.1.tar.gz
Algorithm Hash digest
SHA256 b1f6e8f2cfb206644b8c29119634c0937809fa9b4b1102c0a6c6e5fa9cbbbf79
MD5 7a625884d2920a78a37982ffce67b85c
BLAKE2b-256 f02f92f24137be328749a514be92c7567270ca188d8da4c7b0ce83a4d84f2daf

See more details on using hashes here.

File details

Details for the file ntfc-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: ntfc-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 69.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for ntfc-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 430cf3f1254294b9b848b2cd746f27e92419dd0cbcde8d17e22aa3da0d1f01ec
MD5 6a5091c67d9bc70c93d0994c8c88010d
BLAKE2b-256 4468f57d3cc69766b9db26370c46a8a1ce88e686974104a97e8c7e06c9195bcd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page