Building test cases

Posts: 121
Joined: Mon Jun 04, 2018 2:47 pm

Building test cases

Postby PeterR » Wed Apr 17, 2019 1:56 pm

I want to run legacy Catch2 unit tests on target.
The unit code is in .cpp files.

I have the UUT directory structure:


And the test harness is stored here:

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

include $(IDF_PATH)/make/
The build makes the IDF components but on link complains that there is no app_main(). The build does not attempt to build
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 ... tests.html
The legacy tests are Catch2 though.

Return to “General Discussion”

Who is online

Users browsing this forum: Adham Aboud and 13 guests