-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Description
Is your enhancement proposal related to a problem? Please describe.
There are thousands of overlay files located under sample/* and tests/* ... */boards/. E.g. https://github.com/zephyrproject-rtos/zephyr/tree/main/tests/drivers/uart/uart_async_api/boards (142 files)
https://github.com/zephyrproject-rtos/zephyr/tree/main/tests/drivers/dma/chan_blen_transfer/boards (173 files).
Every time someone wants to add a support of such tests on another board they have to add extra board specific overlays. In many cases such overlays are yet another copy of the same file, just with a different name.
Such mechanism doesn't scale.
Additional context
We discussed the toping during testing wg meetings and we don't know how it can be changed. Maybe there won't be a single solution, but a combination of several, including rework of some tests. One approach is proposed by @hakehuang which allows for reuse of the same overlay files by multiple boards, at the cost of adding entries in test yaml responsible for mapping such boards with more general overlays https://github.com/zephyrproject-rtos/zephyr/blob/main/tests/drivers/uart/uart_async_api/testcase.yaml#L87. However, it can significantly increase complexity of test yaml resulting with tests with hundreds of namespaced configs.
Other idea is to move some implementation of overlays to a board/soc/variant/more general level, as a kind of an extension, that could be added (and reused) whenever such overlay is requested by tests?
We might also need to rethink of how overlays are applied, possibly using SoC overlays or feature-based overlays instead of board-specific ones.
As a testing working group we wanted to flag the issue of "exploding" overlays and ask other maintainers for their take on it and possible solutions.