Skip to content

Commit e38acc8

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 74dedbd commit e38acc8

File tree

6 files changed

+900
-0
lines changed

6 files changed

+900
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
cmake_minimum_required(VERSION 3.20.0)
3+
4+
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
5+
project(test_channel_name)
6+
7+
FILE(GLOB app_sources src/main.c src/zbus_multidomain_mock_backend.c)
8+
target_sources(app PRIVATE ${app_sources})
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
CONFIG_ZTEST=y
2+
CONFIG_ASSERT=n
3+
CONFIG_LOG=y
4+
CONFIG_ZBUS=y
5+
CONFIG_ZBUS_CHANNEL_NAME=y
6+
CONFIG_ZBUS_MULTIDOMAIN=y
7+
8+
CONFIG_ZBUS_MULTIDOMAIN_LOG_LEVEL_DBG=y
9+
10+
# Retransmission configuration for faster testing
11+
CONFIG_ZBUS_MULTIDOMAIN_SENT_MSG_ACK_TIMEOUT=10
12+
CONFIG_ZBUS_MULTIDOMAIN_SENT_MSG_ACK_TIMEOUT_MAX=100
13+
CONFIG_ZBUS_MULTIDOMAIN_MAX_TRANSMIT_ATTEMPTS=5
14+
15+
# Increase message pool size for testing multiple scenarios
16+
CONFIG_ZBUS_MULTIDOMAIN_SENT_MSG_POOL_SIZE=16
17+
18+
# FFF (Fake Function Framework) for mocking
19+
CONFIG_ZTEST_MOCKING=y

0 commit comments

Comments
 (0)