Hi, I am trying to add some unit testing in my NRF Connect SDK based project. I am using Unity + CMock suggested here. For files with no complicated dependencies it works fine but I have problems with mocking BLE related headers.
Assume I have file fileA.c in my zephyr project source directory I want to test, which handles BLE initialization, and tracks connection/disconnection events. It includes header:
#include <bluetooth/gatt.h>
Next, I have file fileB.c with tests in another directory, in separate zephyr project set up to test file A.
When I try to mock given header with:
Error: Bluetooth device missing. Specify one using --bt-dev=hciN