The unit code is in .cpp files.
I have the UUT directory structure:
/esp/app/components/<component-name>/src
/esp/app/components/<component-name>/include
And the test harness is stored here:
/esp/app/components/<component-name>/test/src
/esp/app/components/<component-name>/test/include
I attempt to compile from within: /esp/app/components/<component-name>/test
Project makefile is:
Code: Select all
PROJECT_NAME := test-unit
COMPONENT_SRCDIRS := ./src ./../src
COMPONENT_ADD_INCLUDEDIRS := ./include
include $(IDF_PATH)/make/project.mk
esp/app/components/<component-name>/src .cpp files.
Takes an ages to recompile the IDF each time so worked solution/advise welcome!
I want unit tests to be built from within a sub directory. Eventually I may want all test combining as below but compilation & memory limitations mean one at a time.
I note that the IDF has a Unity setup https://docs.espressif.com/projects/esp ... tests.html
The legacy tests are Catch2 though.