Skip to content

Set up Zephyr native_sim test target with ztest framework #53

Description

@flwrenn

Summary

Set up a host-native test framework using Unity v2.6.1 and CTest so firmware algorithm modules can be compiled and tested on the development machine without hardware.

Note: The original plan was Zephyr ztest + native_sim, but native_sim only targets Linux (POSIX architecture) and does not work on macOS. Unity + CTest was chosen instead — it provides the same coverage for pure-C algorithm modules and runs on any host platform.

Area

Tooling / CI

Done when

  • tests/ directory exists with a CMake project that fetches Unity v2.6.1 via FetchContent
  • Algorithm sources are compiled into a hallmark_algorithms static library (explicit source listing, no file(GLOB))
  • A trivial smoke test suite builds and passes on the host machine
  • Tests can be run via cmake -B build/tests tests/ && cmake --build build/tests && ctest --test-dir build/tests

Dependencies

None

Context

All algorithm modules (rapid trigger, HRM, SOCD) need a host-side test harness. This must be done before any algorithm implementation so tests can be written alongside code.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

  • Status
    PR Open

Relationships

None yet

Development

No branches or pull requests

Issue actions