Setup ZTest unit testing infrastructure for f_core libraries#363
Setup ZTest unit testing infrastructure for f_core libraries#363
Conversation
Co-authored-by: AarC10 <30483634+AarC10@users.noreply.github.com>
Co-authored-by: AarC10 <30483634+AarC10@users.noreply.github.com>
Co-authored-by: AarC10 <30483634+AarC10@users.noreply.github.com>
Co-authored-by: AarC10 <30483634+AarC10@users.noreply.github.com>
Co-authored-by: AarC10 <30483634+AarC10@users.noreply.github.com>
|
Also, i dont think the golay encoding is something we even bother taking up space with testing. for one, we didnt write it and its been correct for like 20 years. and for two, even if it fails some test, if we change it, we will no longer be decoded by horus-gui since its the one they use. |
|
also if this PR decides that tests/f_core holds tests for things in f_core can this PR also move the test that resides in utils/ into there as well Though, idk if its necessary to segment them under tests/f_core bc realistically what could the tests/ folder be for since its not for applications. i imagine a sensor-mod specific test would live under the sensor-mod folder since it will share code with the app (if we wever get that far - rn none of the app folders are really set up to support anything more than building an executable but if we got to be cool) |

Description
Adds ZTest-based unit testing for core library modules with CI integration. Provides foundation and examples for testing f_core components.
Changes
Test Suites:
app/tests/f_core/gnss_utils/- Tests GNSS conversion utilities (nanodegrees↔degrees, millimeters↔meters)app/tests/f_core/golay/- Tests Golay (23,12,7) error correction encoding/decoding with 1-3 bit error correctionCI Integration:
.github/hardware-roots.yamlto trigger tests on relevant file changestestcase.yamland run throughwest twisterDocumentation:
app/tests/f_core/README.md- Test authoring guide with examples, structure requirements, and ZTest assertion referenceEach test suite includes standard Zephyr test files:
main.c,CMakeLists.txt,prj.conf,testcase.yaml,KconfigType of change
How Has This Been Tested?
Tests will be validated by CI on push. Structure follows existing
app/tests/utils/pattern.Test Configuration:
Checklist:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.