Skip to content

Commit c9a5999

Browse files
committed
tests: drivers: build_all: Add test for display drivers
Add a blank test to cover building drivers that are in drivers/display/ Signed-off-by: Mohamed ElShahawi <[email protected]>
1 parent b6a253d commit c9a5999

File tree

6 files changed

+77
-0
lines changed

6 files changed

+77
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
cmake_minimum_required(VERSION 3.20.0)
4+
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
5+
project(build_all)
6+
7+
FILE(GLOB app_sources src/*.c)
8+
target_sources(app PRIVATE ${app_sources})
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/*
2+
* Copyright (c) 2022, Kumar Gala <[email protected]>
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
* Application overlay for testing driver builds
7+
*
8+
* Names in this file should be chosen in a way that won't conflict
9+
* with real-world devicetree nodes, to allow these tests to run on
10+
* (and be extended to test) real hardware.
11+
*/
12+
13+
/ {
14+
test {
15+
#address-cells = <1>;
16+
#size-cells = <1>;
17+
18+
test_gpio: gpio@deadbeef {
19+
compatible = "vnd,gpio";
20+
gpio-controller;
21+
reg = <0xdeadbeef 0x1000>;
22+
#gpio-cells = <0x2>;
23+
status = "okay";
24+
};
25+
26+
test_spi: spi@33334444 {
27+
#address-cells = <1>;
28+
#size-cells = <0>;
29+
compatible = "vnd,spi";
30+
reg = <0x33334444 0x1000>;
31+
status = "okay";
32+
clock-frequency = <2000000>;
33+
34+
/* one entry for every devices at spi.dtsi */
35+
cs-gpios = <&test_gpio 0 0>;
36+
37+
test_spi_ili9342c: ili9342c@0 {
38+
compatible = "ilitek,ili9342c";
39+
reg = <0>;
40+
spi-max-frequency = <25000000>;
41+
cmd-data-gpios = <&test_gpio 0 0>;
42+
pixel-format = <0>;
43+
rotation = <270>;
44+
width = <320>;
45+
height = <240>;
46+
};
47+
};
48+
};
49+
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_ILI9342C=y
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CONFIG_TEST=y
2+
CONFIG_SPI=y
3+
CONFIG_DISPLAY=y
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/*
2+
* Copyright (c) 2022, Kumar Gala <[email protected]>
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
void main(void)
8+
{
9+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
common:
2+
build_only: true
3+
min_ram: 32
4+
tags: drivers display
5+
tests:
6+
drivers.display.ili9342c.build:
7+
extra_args: CONF_FILE=display_ili9342c.conf

0 commit comments

Comments
 (0)