Skip to content

Commit 68cf75c

Browse files
tests: zbus: add multidomain UART backend test suite
Add comprehensive test suite for the zbus multidomain UART backend. The implementation uses UART emulator devices to enable testing without requiring physical UART hardware. Signed-off-by: Trond F. Christiansen <[email protected]>
1 parent 2421f47 commit 68cf75c

File tree

5 files changed

+593
-0
lines changed

5 files changed

+593
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#
2+
# Copyright (c) 2025 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
7+
cmake_minimum_required(VERSION 3.20.0)
8+
9+
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
10+
project(test_channel_name)
11+
12+
FILE(GLOB app_sources src/main.c)
13+
target_sources(app PRIVATE ${app_sources})
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
euart0: uart-emul0 {
9+
compatible = "zephyr,uart-emul";
10+
status = "okay";
11+
current-speed = <0>;
12+
rx-fifo-size = <256>;
13+
tx-fifo-size = <256>;
14+
};
15+
euart1: uart-emul1 {
16+
compatible = "zephyr,uart-emul";
17+
status = "okay";
18+
current-speed = <0>;
19+
rx-fifo-size = <512>;
20+
tx-fifo-size = <512>;
21+
};
22+
};
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#
2+
# Copyright (c) 2025 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
7+
CONFIG_LOG=y
8+
CONFIG_CRC=y
9+
CONFIG_ZBUS=y
10+
CONFIG_ZBUS_CHANNEL_NAME=y
11+
CONFIG_ZBUS_MSG_SUBSCRIBER=y
12+
13+
CONFIG_ZBUS_MULTIDOMAIN=y
14+
CONFIG_ZBUS_MULTIDOMAIN_UART=y
15+
CONFIG_ZBUS_MULTIDOMAIN_LOG_LEVEL_DBG=n
16+
CONFIG_ZBUS_MULTIDOMAIN_SENT_MSG_ACK_TIMEOUT=10
17+
CONFIG_ZBUS_MULTIDOMAIN_SENT_MSG_ACK_TIMEOUT_MAX=100
18+
CONFIG_ZBUS_MULTIDOMAIN_MAX_TRANSMIT_ATTEMPTS=5
19+
CONFIG_ZBUS_MULTIDOMAIN_SENT_MSG_POOL_SIZE=16
20+
21+
CONFIG_ZTEST=y
22+
CONFIG_ASSERT=n
23+
CONFIG_ZTEST_MOCKING=y
24+
25+
CONFIG_MAIN_STACK_SIZE=2048
26+
CONFIG_TEST_EXTRA_STACK_SIZE=2048
27+
28+
# IPC service support
29+
CONFIG_EMUL=y
30+
CONFIG_SERIAL=y
31+
CONFIG_UART_ASYNC_API=y

0 commit comments

Comments
 (0)