Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions tests/unit/subsys/bluetooth/services/ble_lbs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#
# Copyright (c) 2026 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

cmake_minimum_required(VERSION 3.20.0)

find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})

project(unit_test_ble_lbs)

softdevice_unity_setup()

cmock_handle(${SOFTDEVICE_INCLUDE_DIR}/ble.h)
cmock_handle(${SOFTDEVICE_INCLUDE_DIR}/ble_gatts.h)

# Generate and add test file
test_runner_generate(src/unity_test.c)
target_sources(app PRIVATE src/unity_test.c)
11 changes: 11 additions & 0 deletions tests/unit/subsys/bluetooth/services/ble_lbs/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Redefine this symbol without dependencies, so that tests
# can enable it without having to enable the dependencies too.
config BLE_LBS
default y

# Redefine Kconfigs used by the tested module that are defined in
# other modules we do not want to enable.
config NRF_SDH_BLE_TOTAL_LINK_COUNT
default 1
Comment on lines +6 to +9
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not seem to be needed for this test.


source "Kconfig.zephyr"
1 change: 1 addition & 0 deletions tests/unit/subsys/bluetooth/services/ble_lbs/prj.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CONFIG_UNITY=y
Loading
Loading