Hello,
first: thanks so much for the advances in unit testing, last time I tried it, it seemed pretty complicated, that works better now
Next I would like to add "multiple stages test cases" i.e. communication between boards to my projects and I ran into a couple of issues there.
I follow this documentation
Unfortunately there are no examples available for the multi stage and multi device test cases. As soon as I get it working I suggest and like to help with providing examples for that. The normal test case works fine and is easy to follow as there exists an example (although not linked to in the documentation. This is probably not intended?)
====================================================
Multiple devices:
If I copy the example code into a working testing application, the "unity_send_signal" function cannot be found.
As I see it, it is located under tools/unit-test-app/compontents/test_utils.h and is used by other test cases within the esp-idf - for example "components/driver/test/test_i2c.c" which include "test_utils.h" in the c file and have test_utils in the CMakeLists.txt.
Adding test_utils into my CMakeLists does however not work, probably it looks only in the components folder? If I copy the test_utils to the components the building works, however as soon as I use one of the functions "unity_wait_for_signal" or "unity_send_signal" something seems to stop working and unrelated tests which previously passed, now fail with "Expected Non-NULL"
What am I doing wrong here? Is it the wrong linking or an issue in using the library?
====================================================
Making the multi stage code run:
ok, this one is not too hard, but I headed in the wrong direction first in changing the reset lookup to the more familiar esp_reset_reason() from esp_system.h. (which of course then also works).
Would it distract too much to include the required headers to the code snippet or provide a standalone example?
While these fixes sound trivial, it took me quite some while to find out what's missing.
====================================================
There are a few other issues on the documentation page:
- "this requirement is relaxed and the use of COMPONENT_SRCDIRS is advised."
-> probably SRC_DIRS is the right cmake variable to be used here?
- the gpio pin config gets shifted in that way: "1 << gpio_no". This produces a compiler warning and I have seen this done as "1ULL << gpio_no" in other places. Should this be changed?
I will happily update the documentation, set up an example or something else, but don't dare that without some opinions
Hope to hear from somebody to get the unit tests up and running
Thanks!
Issue with multiple stages test cases
-
- Posts: 2
- Joined: Tue Oct 30, 2018 11:28 am
Jump to
- English Forum
- Explore
- News
- General Discussion
- FAQ
- Documentation
- Documentation
- Sample Code
- Discussion Forum
- Hardware
- ESP-IDF
- ESP-BOX
- ESP-ADF
- ESP-MDF
- ESP-WHO
- ESP-SkaiNet
- ESP32 Arduino
- IDEs for ESP-IDF
- ESP-AT
- ESP IoT Solution
- ESP RainMaker
- Rust
- ESP8266
- Report Bugs
- Showcase
- Chinese Forum 中文社区
- 活动区
- 乐鑫活动专区
- 讨论区
- 全国大学生物联网设计竞赛乐鑫答疑专区
- ESP-IDF 中文讨论版
- 《ESP32-C3 物联网工程开发实战》书籍讨论版
- 中文文档讨论版
- ESP-AT 中文讨论版
- ESP-BOX 中文讨论版
- ESP IoT Solution 中文讨论版
- ESP-ADF 中文讨论版
- ESP Mesh 中文讨论版
- ESP Cloud 中文讨论版
- ESP-WHO 中文讨论版
- ESP-SkaiNet 中文讨论版
- ESP 生产支持讨论版
- 硬件问题讨论
- 项目展示
Who is online
Users browsing this forum: No registered users and 347 guests
- All times are UTC
- Top
- Delete cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. ESP8266EX and ESP32 are some of our products.