-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Description
Summary
During the review of PR #97819, criticism came up regarding too many direct driver tests for one and the same shield.
Why do you need to bring in Arduino uno click in the mix?
Originally posted by @kartben in #97819 (comment)
The reason for these multiple tests is the ability of using the Arduino UNO R3 to MikroElektronika Click shield with the MikroElektronika CAN FD 6 Click shield (or in theory any other Click shield) on virtually all FRDM, Nucleo, or Discovery boards. In general terms, this means that purely passive shields (hardware adapters) can be used to adapt standardized headers, thereby enabling the use of “non-standard” shields on even more boards via a shield stack.
This type of integration testing has nothing to do with drivers and currently does not exist in Zephyr. This issue is intended to open the discussion about new Shield Stack integration testing. I am willing to lay the groundwork for this and submit code in the coming months. Feedback is welcome.
Describe the solution you'd like
In the discussion in PR #97819, the idea was born to create a new area for this under tests/cmake/
.
Perhaps under
tests/cmake/shields/
?Originally posted by @henrikbrixandersen in #97819 (comment)
I also think that the location under tests/cmake/shields/
will be a good starting point. As far as I can tell today, the test cases in this area will also be very simple. Most tests can already be completed at the CMake level and, in most of the expected cases, do not require a real runtime environment. With the help of CMake functions/macros that have to be created, the meta data model in DTS and Kconfig can be accessed at any time and the corresponding expected values can be reliably checked (new CMake test fixtures).
Alternatives
Ideas welcome. I can't come up with an alternative yet.
Additional Context
We have already implemented exactly this in our downstream project “Bridle”. This can serve as a blueprint. If you are interested, please take a look here:
- Code: https://github.com/tiacsys/bridle/tree/main/tests/shields (look into the
CMakeLists.txt
files) - DOC: https://bridle.tiac-systems.net/doc/latest/bridle/tests/shields/README.html