Testing and debugging
DataObject initialization regression test
Loads the detection stream from jsonCfg/Detectors.json without starting the camera, window, or inference. Checks nBuf=1, DataObject initialization before modules, and failure propagation. Requires Eigen 5, glog, and ncurses.
cmake -S test/instance -B build/instance-tests
cmake --build build/instance-tests
ctest --test-dir build/instance-tests --output-on-failureTyped stream and byte transport regression tests
Build OpenKAI with WITH_IO=ON and WITH_PROTOCOL=ON, then run:
python3 test/run_byte_packet_tests.py build --streams-onlyChecks all four DataObjStream<T> subclasses for timestamp preservation, filtering, wraparound, clearing, snapshot ownership, and concurrent byte packet access. Use --byte-only for the wider suite, including duplex transports, JSON/binary parsers, and CAN codecs. WebSocket checks run when USE_WSSERVER=ON. Both modes exclude MAVLink tests.
Eigen vector regression tests
These checks cover vector configuration loading, geometry defaults, and bounding-box operations. They require Eigen 5 and glog.
cmake -S test/eigenVectors -B build/eigenVectors
cmake --build build/eigenVectors
ctest --test-dir build/eigenVectors --output-on-failureConsole shutdown regression test
This uses a pseudo-terminal to check that Ctrl+C and initialization failures restore the terminal settings and leave the ncurses alternate screen.
python3 test/console/shutdown.py build/OpenKAIGDB
gdb --args executablename arg1 arg2 arg3
run
btTurn off GDB downloading separate debug info
echo "unset DEBUGINFOD_URLS" >> ~/.bashrcTest gstreamer
sudo gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=640,height=480,framerate=20/1 ! x264enc ! matroskamux ! filesink location=/home/pi/ssd/test.mkv
sudo gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1280,height=720,framerate=30/1 ! videoconvert ! fbdevsink