Add native pyxis test suite + CI

Standalone C++ tests of pyxis-unique code (BLE fragmenter/reassembler,
peer manager, GATT op queue, LXST ring buffers, audio filters, HDLC
framing) plus Python tests of the patch_nimble.py build script.

Each C++ test is compiled directly by clang++/g++ with shims in
tests/native/ (Bytes.h, Log.h, Utilities/OS.h) so pyxis sources can build
without microReticulum's full Arduino/MsgPack dep tree. A pytest wrapper
per test compiles, runs, and parses the summary line — the whole suite
is one command: `pytest tests/build_scripts tests/native -v`.

Total: 13 pytest tests, ~72 underlying C++ assertions, 3.4s.

Surfaced an HPF-formula bug in lxst_audio (mirrored upstream in
LXST-kt/native_audio_filters.cpp) — filed as LXST-kt#13 and tracked
in the corresponding test with a TODO link.

CI workflow runs the pyxis pytest suite plus the clean-passing
microReticulum native17 unit tests (94/114 of the existing fork
test/* suites) on push and PR.
This commit is contained in:
torlando-tech committed 2026-05-04 14:50:16 -04:00
1 parent fd5e9316f9
commit 14f937cf8a
19 files changed
+2577

No files matched your search

+71
View File
@@ -0,0 +1,71 @@
name: Test
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
pyxis-pytest:
name: Pyxis pytest suite (build_scripts + native)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install pytest
run: pip install pytest
- name: Run pytest
run: pytest tests/build_scripts tests/native -v
microreticulum-native:
name: microReticulum native unit tests (PlatformIO native17)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Cache PlatformIO
uses: actions/cache@v4
with:
path: |
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio-mrn
- name: Install PlatformIO
run: pip install --upgrade platformio
# Run only suites that build cleanly under native17 in the fork.
# Erroring suites (test_ble, test_tdeck, test_lxmf, test_ratchets, etc.)
# are tracked separately — see pyxis MEMORY.md.
- name: Run native17 tests
working-directory: deps/microReticulum
run: |
pio test -e native17 -f test_os
pio test -e native17 -f test_bytes
pio test -e native17 -f test_msgpack
pio test -e native17 -f test_crypto
pio test -e native17 -f test_filesystem
pio test -e native17 -f test_objects
pio test -e native17 -f test_general
pio test -e native17 -f test_reference
pio test -e native17 -f test_example
pio test -e native17 -f test_collections
pio test -e native17 -f test_interop