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 <ryanmcclelland@meta.com>
This commit is contained in:
parent
652cabeb85
commit
8f55774eae
6 changed files with 52 additions and 0 deletions
|
|
@ -1304,6 +1304,7 @@ Release Notes:
|
||||||
- dts/bindings/serial/
|
- dts/bindings/serial/
|
||||||
- samples/drivers/uart/
|
- samples/drivers/uart/
|
||||||
- tests/drivers/uart/
|
- tests/drivers/uart/
|
||||||
|
- tests/drivers/build_all/uart/
|
||||||
- doc/hardware/peripherals/uart.rst
|
- doc/hardware/peripherals/uart.rst
|
||||||
labels:
|
labels:
|
||||||
- "area: UART"
|
- "area: UART"
|
||||||
|
|
|
||||||
8
tests/drivers/build_all/uart/CMakeLists.txt
Normal file
8
tests/drivers/build_all/uart/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
cmake_minimum_required(VERSION 3.20.0)
|
||||||
|
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
|
||||||
|
project(build_all)
|
||||||
|
|
||||||
|
FILE(GLOB app_sources src/*.c)
|
||||||
|
target_sources(app PRIVATE ${app_sources})
|
||||||
18
tests/drivers/build_all/uart/boards/qemu_cortex_m3.overlay
Normal file
18
tests/drivers/build_all/uart/boards/qemu_cortex_m3.overlay
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Meta Platforms
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
/ {
|
||||||
|
uart3: uart@88888888 {
|
||||||
|
compatible = "cdns,uart";
|
||||||
|
reg = <0x88888888 0x400>;
|
||||||
|
interrupt-parent = <&nvic>;
|
||||||
|
interrupts = <4 1>;
|
||||||
|
clock-frequency = <100000000>;
|
||||||
|
current-speed = <921600>;
|
||||||
|
bdiv = <4>;
|
||||||
|
parity = "none";
|
||||||
|
};
|
||||||
|
};
|
||||||
3
tests/drivers/build_all/uart/prj.conf
Normal file
3
tests/drivers/build_all/uart/prj.conf
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
CONFIG_TEST=y
|
||||||
|
CONFIG_TEST_USERSPACE=y
|
||||||
|
CONFIG_SERIAL=y
|
||||||
10
tests/drivers/build_all/uart/src/main.c
Normal file
10
tests/drivers/build_all/uart/src/main.c
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Meta Platforms
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
12
tests/drivers/build_all/uart/testcase.yaml
Normal file
12
tests/drivers/build_all/uart/testcase.yaml
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
common:
|
||||||
|
build_only: true
|
||||||
|
tags:
|
||||||
|
- drivers
|
||||||
|
- uart
|
||||||
|
tests:
|
||||||
|
drivers.uart.build:
|
||||||
|
# will cover drivers without in-tree boards
|
||||||
|
platform_allow: qemu_cortex_m3
|
||||||
|
tags: uart_cdns
|
||||||
|
extra_configs:
|
||||||
|
- CONFIG_SERIAL=y
|
||||||
Loading…
Reference in a new issue