Skip to content

Commit 8f55774

Browse files
XenuIsWatchingfabiobaltieri
authored andcommitted
test: drivers: build_all: add cdns uart build only test
As the cadence uart, has no off-the-shelve microprocessor out there. Add a build only test case for the cadence uart using the qemu cortex m3 as the board. Signed-off-by: Ryan McClelland <[email protected]>
1 parent 652cabe commit 8f55774

File tree

6 files changed

+52
-0
lines changed

6 files changed

+52
-0
lines changed

MAINTAINERS.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,6 +1304,7 @@ Release Notes:
13041304
- dts/bindings/serial/
13051305
- samples/drivers/uart/
13061306
- tests/drivers/uart/
1307+
- tests/drivers/build_all/uart/
13071308
- doc/hardware/peripherals/uart.rst
13081309
labels:
13091310
- "area: UART"
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: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* Copyright (c) 2023 Meta Platforms
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
uart3: uart@88888888 {
9+
compatible = "cdns,uart";
10+
reg = <0x88888888 0x400>;
11+
interrupt-parent = <&nvic>;
12+
interrupts = <4 1>;
13+
clock-frequency = <100000000>;
14+
current-speed = <921600>;
15+
bdiv = <4>;
16+
parity = "none";
17+
};
18+
};

tests/drivers/build_all/uart/prj.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CONFIG_TEST=y
2+
CONFIG_TEST_USERSPACE=y
3+
CONFIG_SERIAL=y
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*
2+
* Copyright (c) 2023 Meta Platforms
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
int main(void)
8+
{
9+
return 0;
10+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
common:
2+
build_only: true
3+
tags:
4+
- drivers
5+
- uart
6+
tests:
7+
drivers.uart.build:
8+
# will cover drivers without in-tree boards
9+
platform_allow: qemu_cortex_m3
10+
tags: uart_cdns
11+
extra_configs:
12+
- CONFIG_SERIAL=y

0 commit comments

Comments
 (0)