Skip to content

Commit 564ad33

Browse files
tests: zbus: add multidomain proxy agent test suite
Add comprehensive test suite for the zbus multidomain proxy agent functionality. Implements a mock backend to enable isolated testing without requiring actual hardware communication. Signed-off-by: Trond F. Christiansen <[email protected]>
1 parent a261607 commit 564ad33

File tree

6 files changed

+910
-0
lines changed

6 files changed

+910
-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 src/zbus_multidomain_mock_backend.c)
13+
target_sources(app PRIVATE ${app_sources})
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#
2+
# Copyright (c) 2025 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
7+
CONFIG_ZTEST=y
8+
CONFIG_ASSERT=n
9+
CONFIG_LOG=y
10+
CONFIG_ZBUS=y
11+
CONFIG_ZBUS_CHANNEL_NAME=y
12+
CONFIG_ZBUS_MULTIDOMAIN=y
13+
14+
CONFIG_ZBUS_MULTIDOMAIN_LOG_LEVEL_DBG=y
15+
16+
# Retransmission configuration for faster testing
17+
CONFIG_ZBUS_MULTIDOMAIN_SENT_MSG_ACK_TIMEOUT=10
18+
CONFIG_ZBUS_MULTIDOMAIN_SENT_MSG_ACK_TIMEOUT_MAX=100
19+
CONFIG_ZBUS_MULTIDOMAIN_MAX_TRANSMIT_ATTEMPTS=5
20+
21+
# Increase message pool size for testing multiple scenarios
22+
CONFIG_ZBUS_MULTIDOMAIN_SENT_MSG_POOL_SIZE=16
23+
24+
# FFF (Fake Function Framework) for mocking
25+
CONFIG_ZTEST_MOCKING=y

0 commit comments

Comments
 (0)