Skip to content

Commit 86a63fa

Browse files
sylvioalvescfriedt
authored andcommitted
tests: build_all: led_strip: split uart test case
Make sure this test filters out UART peripherals that do not support ASYNC operation. Signed-off-by: Sylvio Alves <[email protected]>
1 parent b966871 commit 86a63fa

File tree

3 files changed

+61
-31
lines changed

3 files changed

+61
-31
lines changed

tests/drivers/build_all/led_strip/app.overlay

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -84,29 +84,5 @@
8484
spi-zero-frame = <2>;
8585
};
8686
};
87-
88-
test_uart: uart@55556666 {
89-
compatible = "vnd,serial";
90-
reg = <0x55556666 0x100>;
91-
status = "okay";
92-
current-speed = <2500000>;
93-
data-bits = <7>;
94-
tx-invert;
95-
96-
test_ws2812_uart: ws2812-strip {
97-
compatible = "worldsemi,ws2812-uart";
98-
status = "okay";
99-
100-
one-symbol = <6>; /* 0b110 */
101-
zero-symbol = <4>; /* 0b100 */
102-
bits-per-symbol = <3>;
103-
104-
chain-length = <8>;
105-
reset-delay = <50>;
106-
color-mapping = <LED_COLOR_ID_GREEN
107-
LED_COLOR_ID_RED
108-
LED_COLOR_ID_BLUE>;
109-
};
110-
};
11187
};
11288
};
Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
1+
common:
2+
build_only: true
3+
min_ram: 32
4+
tags:
5+
- drivers
6+
- led_strip
17
tests:
28
drivers.led_strip.build:
3-
build_only: true
4-
min_ram: 32
5-
tags:
6-
- drivers
7-
- led_strip
89
depends_on:
910
- gpio
1011
- spi
12+
drivers.led_strip.build.uart:
13+
depends_on:
14+
- gpio
15+
- uart
16+
filter: not CONFIG_SERIAL_SUPPORT_ASYNC
17+
extra_args:
18+
- DTC_OVERLAY_FILE="uart.overlay"
1119
drivers.led_strip.build.rpi_pico_pio:
12-
build_only: true
13-
platform_allow: rpi_pico
20+
platform_allow:
21+
- rpi_pico
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* Copyright (c) 2020, Linaro Ltd.
3+
* Copyright (c) 2022, Esco Medical ApS
4+
*
5+
* SPDX-License-Identifier: Apache-2.0
6+
*
7+
* Application overlay for testing driver builds
8+
*
9+
* Names in this file should be chosen in a way that won't conflict
10+
* with real-world devicetree nodes, to allow these tests to run on
11+
* (and be extended to test) real hardware.
12+
*/
13+
14+
#include <freq.h>
15+
#include <zephyr/dt-bindings/led/led.h>
16+
17+
/ {
18+
test {
19+
#address-cells = <1>;
20+
#size-cells = <1>;
21+
22+
test_uart: uart@55556666 {
23+
compatible = "vnd,serial";
24+
reg = <0x55556666 0x100>;
25+
status = "okay";
26+
current-speed = <2500000>;
27+
data-bits = <7>;
28+
tx-invert;
29+
30+
test_ws2812_uart: ws2812-strip {
31+
compatible = "worldsemi,ws2812-uart";
32+
status = "okay";
33+
34+
one-symbol = <6>; /* 0b110 */
35+
zero-symbol = <4>; /* 0b100 */
36+
bits-per-symbol = <3>;
37+
38+
chain-length = <8>;
39+
reset-delay = <50>;
40+
color-mapping = <LED_COLOR_ID_GREEN
41+
LED_COLOR_ID_RED
42+
LED_COLOR_ID_BLUE>;
43+
};
44+
};
45+
};
46+
};

0 commit comments

Comments
 (0)