Add unit test
Posted: Mon Oct 23, 2023 1:00 pm
Hello,
I am trying to add unit tests to my project. I followed the file tree of the unit test example (https://github.com/espressif/esp-idf/tr ... /unit_test) and change the CMakeLists.txt files as a result. However when I compile my code I get a fatal error about a file of the ESP-IDF framework :
Here my file tree :
Moreover, the ESP-IDF example only shows how to do unit test for user made functions and not user made functions + ESP-IDF items (like the gpio.h).
Does anyone have an idea what I did wrong or I missed ?
Thank you for your help
I am trying to add unit tests to my project. I followed the file tree of the unit test example (https://github.com/espressif/esp-idf/tr ... /unit_test) and change the CMakeLists.txt files as a result. However when I compile my code I get a fatal error about a file of the ESP-IDF framework :
Code: Select all
fatal error: driver/gpio.h: No such file or directory
14 | #include "driver/gpio.h"
Code: Select all
+ components
+ folder_1
+ include
- file_1.h
- file_2.h
- file_3.h
+ test
- CMakeLists.txt
- test_file.c
- file_1.c
- file_2.c
- file_3.c
- CMakeLists.txt
- folder_2
- folder_3
+ main
+ include
- main.h
- CMakeLists.txt
- main.c
Does anyone have an idea what I did wrong or I missed ?
Thank you for your help