diff --git a/MAINTAINERS.yml b/MAINTAINERS.yml index cb5d6d8f5a..2a0e0af699 100644 --- a/MAINTAINERS.yml +++ b/MAINTAINERS.yml @@ -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" diff --git a/tests/drivers/build_all/uart/CMakeLists.txt b/tests/drivers/build_all/uart/CMakeLists.txt new file mode 100644 index 0000000000..518596a02f --- /dev/null +++ b/tests/drivers/build_all/uart/CMakeLists.txt @@ -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}) diff --git a/tests/drivers/build_all/uart/boards/qemu_cortex_m3.overlay b/tests/drivers/build_all/uart/boards/qemu_cortex_m3.overlay new file mode 100644 index 0000000000..d0f6cbd471 --- /dev/null +++ b/tests/drivers/build_all/uart/boards/qemu_cortex_m3.overlay @@ -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"; + }; +}; diff --git a/tests/drivers/build_all/uart/prj.conf b/tests/drivers/build_all/uart/prj.conf new file mode 100644 index 0000000000..bb5ccbec1b --- /dev/null +++ b/tests/drivers/build_all/uart/prj.conf @@ -0,0 +1,3 @@ +CONFIG_TEST=y +CONFIG_TEST_USERSPACE=y +CONFIG_SERIAL=y diff --git a/tests/drivers/build_all/uart/src/main.c b/tests/drivers/build_all/uart/src/main.c new file mode 100644 index 0000000000..24eae6f976 --- /dev/null +++ b/tests/drivers/build_all/uart/src/main.c @@ -0,0 +1,10 @@ +/* + * Copyright (c) 2023 Meta Platforms + * + * SPDX-License-Identifier: Apache-2.0 + */ + +int main(void) +{ + return 0; +} diff --git a/tests/drivers/build_all/uart/testcase.yaml b/tests/drivers/build_all/uart/testcase.yaml new file mode 100644 index 0000000000..c652d1cb76 --- /dev/null +++ b/tests/drivers/build_all/uart/testcase.yaml @@ -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