mirror of
https://github.com/torlando-tech/pyxis.git
synced 2026-05-14 11:25:04 +00:00
14f937cf8a
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.
36 lines
832 B
C++
36 lines
832 B
C++
// Native-test shim for microReticulum's Log.h. Replaces all logging macros
|
|
// with no-ops so we can compile pyxis source files standalone.
|
|
//
|
|
// Real Log.h has a substantial logger with levels, callbacks, formatting,
|
|
// etc. None of that is relevant for unit tests; we just want the compile
|
|
// to succeed.
|
|
#pragma once
|
|
|
|
#include <cstdio>
|
|
|
|
#ifndef TRACE
|
|
#define TRACE(...) ((void)0)
|
|
#endif
|
|
#ifndef DEBUG
|
|
#define DEBUG(...) ((void)0)
|
|
#endif
|
|
#ifndef INFO
|
|
#define INFO(...) ((void)0)
|
|
#endif
|
|
#ifndef WARN
|
|
#define WARN(...) ((void)0)
|
|
#endif
|
|
#ifndef WARNING
|
|
#define WARNING(...) ((void)0)
|
|
#endif
|
|
#ifndef ERROR
|
|
#define ERROR(...) ((void)0)
|
|
#endif
|
|
|
|
namespace RNS {
|
|
namespace Log {
|
|
inline void log(const char*) {}
|
|
inline void log(const char*, ...) {}
|
|
} // namespace Log
|
|
} // namespace RNS
|