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:
Ryan McClelland 2023-07-21 22:34:40 -07:00 committed by Fabio Baltieri
parent 652cabeb85
commit 8f55774eae
6 changed files with 52 additions and 0 deletions

View file

@ -1304,6 +1304,7 @@ Release Notes:
- dts/bindings/serial/
- samples/drivers/uart/
- tests/drivers/uart/
- tests/drivers/build_all/uart/
- doc/hardware/peripherals/uart.rst
labels:
- "area: UART"

View 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})

View 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";
};
};

View file

@ -0,0 +1,3 @@
CONFIG_TEST=y
CONFIG_TEST_USERSPACE=y
CONFIG_SERIAL=y

View file

@ -0,0 +1,10 @@
/*
* Copyright (c) 2023 Meta Platforms
*
* SPDX-License-Identifier: Apache-2.0
*/
int main(void)
{
return 0;
}

View 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