Repository navigation
v0.3.0 — receiver plugin API + rename
Added
- Receiver plugin API: packages can declare a receiver class under the
embedded_test_runner.receiversentry-point group and have it auto-attached to the runner's router. See README "Receiver plugins" for the contract. Enablespio-gcovand similar packages to attach per-partition capture receivers without per-project Python. - Partition lifecycle hooks:
on_partition_start()/on_partition_complete()onEmbeddedTestRunner. Default implementations forward to plugin receivers that opt in. Subclasses overriding either hook should callsuper()to preserve plugin notification. - Test environment variables via
ETST:ARGS/--env K=V: host forwardsETST_ENV_*host env vars andpio test -a --env K=Varguments to the firmware before eachRUN. Newetst::env(key)/etst::env_int(key, default)lookups in<etst/env.h>, plus arequire_env("KEY")doctest decorator that skips a test when the named env var is missing.
Changed
- Renamed: pio-test-runner → embedded-test-runner, pio_test_runner → etst, ptr_doctest → etst::doctest. Include path:
<etst/...>. Clean break — no backward-compat aliases. - Config struct replaces weak hooks:
ptr_board_init,ptr_after_cycle,ptr_configure_contextremoved. Useetst::configandetst::doctest::config. - Listener renamed:
PtrTestListener→EtstDoctestListener. - doctest_runner.h moved:
<pio_test_runner/doctest_runner.h>→<etst/doctest/runner.h>.
Fixed
open_serialretry default restored:_open_serialno longer passesretries=1, which had overridden the 5-retry default and turned transient sub-second port unavailability after USB-CDC re-enumeration into a hard partition failure on back-to-backpio testruns.- PIO doctest parser integration: forward blank lines to PIO's
DoctestTestCaseParserso it can commit accumulatedTEST CASE:header tokens; collapse parser-emitted subcase entries toTEST_CASEgranularity in_ensure_test_results. Together these eliminate phantom empty-name cases and subcase-iteration double-counting in PIO's outer summary. - Example shim libdeps glob:
examples/test_custom_runner.pyandtests/integration/test/test_custom_runner.pynow glob*/embedded-test-runner/src(matched the post-renamelibrary.jsonname).
Migration
The PTR→ETST rename is a clean break with no backward-compat aliases. Consumers must update:
- C++ includes:
<pio_test_runner/...>→<etst/...> - C++ namespaces:
ptr_doctest::→etst::doctest:: - C++ weak hooks:
ptr_board_init/ptr_after_cycle/ptr_configure_context→ assign toetst::config/etst::doctest::configstruct fields - Python imports:
from pio_test_runner.runner import …→from etst.runner import … - Protocol prefix in any host-side parsers:
PTR:→ETST:(already breaking in 0.2.0 — re-noting for completeness) - Environment variables:
PTR_*→ETST_*(old names still accepted with deprecation warning) library.jsonname in libdeps globs:pio-test-runner→embedded-test-runner(this affects copies of the example shim that pre-date 0.3.0 — re-copyexamples/test_custom_runner.py)