NTFC Integration Tests
NTFC (NuttX Test Framework Client) tests exercise Dawn end-to-end: a firmware image runs on a target and the host communicates with it over real protocol interfaces (CAN socket, serial PTY, UDP, Modbus RTU, Bluetooth LE).
Sessions are split across two manifests so the host CI suite stays independent of physical hardware:
ntfc/manifest-host.yaml- sim and QEMU sessions; runs in normal CI as part ofdawnpy-tests. This is the--ntfc-listdefault.ntfc/manifest-nrf52840dk.yaml- hardware-in-the-loop sessions for the Nordic nRF52840-DK. Not run by default; opt in with--ntfc-list.ntfc/manifest-nucleo-c071rb.yaml- hardware-in-the-loop Modbus RTU session for the STM32 Nucleo-C071RB. Not run by default; opt in with--ntfc-list.
Targets
sim - NuttX simulator running as a Linux process. Requires
testenv_init.shto set up the virtualcan0interface.qemu-intel64 - QEMU
qemu-system-x86_64VM with KVM and an emulated e1000 NIC bridged viatap0. Used for UDP tests.nrf52840-dk - real hardware. A connected nRF52840-DK over USB (DAPLink/J-Link),
nrfutilfor flashing/reset, and a BLE-capable Linux host (BlueZ + L2CAP CoC). Used for NimBLE service, OTS, and descriptor-defined custom GATT tests.nucleo-c071rb - real hardware. A connected STM32 Nucleo-C071RB over USB for ST-LINK flashing and console, plus a host Modbus RTU adapter wired to the board USART1 RS485 pins through a compatible RS485 transceiver. The Modbus client uses
/dev/ttyUSB0by default; override withDAWN_NTFC_MODBUS_PORT.
Host requirements
Each suite below depends on different host facilities (Linux only - see Host Environment for the general host setup):
CAN-based suites (
can,programs_can,gateway) need SocketCAN with thevcankernel module -testenv_init.shbrings up the virtualcan0interface.Serial-based suites (
serial,modbusRTU,nxscope,dynamic_desc) need thesocatPTY bridge between/tmp/ttySIM0and/tmp/ttyNX0.Hardware Modbus RTU on
nucleo-c071rbneedsst-flashand a host RS485 adapter.QEMU-based suites (
udp,modbus_tcp) needqemu-system-x86_64with KVM and kerneltun/bridgesupport;testenv_init.shsets upbr0+tap0.Other
simsuites (shell,blinky_shell) only need the base build environment.
Test Suites
Suite |
Target |
What is tested |
|---|---|---|
|
sim |
Shell commands ( |
|
sim |
Simple write, RTR read, ISO-TP segmented read/write, DescriptorIO segmented read, indexed read/write, push notifications. |
|
sim |
Ping, IO list, read/write round-trip (int32, uint32, uint64, float). |
|
sim |
Coil read/write, holding register read/write (uint16 + uint64 span), input register read, seekable descriptor and capabilities windows, seekable FileIO read/write. |
|
nucleo-c071rb |
Same Modbus RTU dummy register map as the sim suite, exercised on the board USART1 RS485 interface. |
|
qemu-intel64 |
Ping, IO list, read/write round-trip (uint16, float). |
|
sim |
Serial->CAN and CAN->Serial data routing; segmented uint64 in both directions. |
|
sim |
Full PROG pipeline over CAN: latest, min, max, RMS, redirect, moving average, IIR filter, threshold (bool + value), push notifications, program start/stop freeze, segmented uint64 sampling, ring buffer select and stat array read. |
|
sim |
Runtime descriptor upload, slot switch validation, and rollback to slot 0 over serial. |
|
nrf52840-dk |
NimBLE all-services hardware target using fake GPIO,
|
|
nrf52840-dk |
Hardware NimBLE custom-service buffer test. Captures 1024 timestamp
samples into |
Running
dawnpy-tests # full host suite (manifest-host.yaml)
dawnpy-tests --ntfc-only # NTFC step only
# hardware-in-the-loop manifest (nRF52840-DK + BLE)
dawnpy-tests --ntfc-only \
--ntfc-list ntfc/manifest-nrf52840dk.yaml
# hardware-in-the-loop manifest (Nucleo-C071RB + Modbus RTU)
dawnpy-tests --ntfc-only \
--ntfc-list ntfc/manifest-nucleo-c071rb.yaml
# single host suite
python -m ntfc test \
--confpath ntfc/configs/sim/can/config.yaml \
--testpath ntfc/tests/can
# single hardware suite (requires connected nRF52840-DK)
python -m ntfc test \
--confpath ntfc/configs/nrf52840-dk/nimble_ntfc/config.yaml \
--testpath ntfc/tests/nimble_ntfc
# single hardware custom-service buffer suite
python -m ntfc test \
--flash \
--confpath ntfc/configs/nrf52840-dk/nimble_ntfc_buffer/config.yaml \
--testpath ntfc/tests/nimble_ntfc_buffer
# single hardware Modbus suite (requires connected Nucleo-C071RB and RS485)
python -m ntfc test \
--flash \
--confpath ntfc/configs/nucleo-c071rb/modbus_ntfc/config.yaml \
--testpath ntfc/tests/modbus_hardware